ADLINK PCI-8102 User Manual

PCI-8102
Advanced 2-Axis Servo/Stepper
Motion Control Card
User’s Manual
Manual Rev. 3.00 Revision Date: Jan. 31, 2012 Part No: 50-11136-1020
Advance Technologies; Automate the World.
Revision Release Date Description of Change(s)
2.01 Feb 26, 2009 Initial release
3.00 Jan. 31, 2012 Updated spec for 2012 release
PCI-8102

Table of Contents

Revision History...................................................................... ii
List of Figures........................................................................ vi
Preface.................................................................................... ix
1 Introduction ........................................................................ 1
1.1 Features............................................................................... 4
1.2 Specifications....................................................................... 5
1.3 Supported Software ............................................................. 7
Programming Library ...................................................... 7
MotionCreatorPro ........................................................... 7
1.4 Available Terminal Board..................................................... 7
2 Installation .......................................................................... 9
2.1 Package Contents ............................................................... 9
2.2 PCI-8102 Outline Drawing ................................................. 10
2.3 PCI-8102 Hardware Installation......................................... 11
Hardware Configuration ................................................ 11
PCI Slot Selection ......................................................... 11
Installation Procedures ................................................. 11
Troubleshooting ............................................................ 12
2.4 Software Driver Installation................................................ 12
2.5 P1 Pin Assignments: Main connector ................................ 13
2.6 P2 Pin Assignment: Digital Inputs / Outputs ...................... 15
2.7 K1/K2 Pin Assignments: Simultaneous Start/Stop ............ 17
2.8 Jumper Settings for Pulse Output...................................... 17
2.9 CMP & EMG Interface Settings ......................................... 18
2.10 Switch Setting for card index ............................................. 19
3 Signal Connections.......................................................... 21
3.1 Pulse Output Signals OUT and DIR .................................. 21
3.2 Encoder Feedback Signals EA, EB and EZ....................... 23
3.3 EMG Emergency Stop ....................................................... 25
3.4 Origin Signal ORG ............................................................. 26
3.5 End-Limit Signals PEL and MEL........................................ 27
3.6 In-Position Signal INP........................................................ 28
3.7 Alarm Signal ALM .............................................................. 29
Table of Contents i
3.8 Deviation Counter Clear Signal ERC ................................. 29
3.9 General-Purpose Signal SVON ......................................... 30
3.10 General-Purpose Signal RDY ............................................ 31
3.11 Position Compare Output pin: CMP................................... 31
3.12 Multi-Functional Input Pin: LTC/SD/PCS/CLR ................... 33
3.13 Simultaneously Start/Stop Signals STA and STP.............. 33
3.14 General Purpose Digital Input/Output ................................ 35
Extended DSUB 37-pin Connector ............................... 36
4 Operations......................................................................... 39
4.1 Classifications of Motion Controller.................................... 39
Voltage Type Motion Control Interface ......................... 39
Pulse Type Motion Control Interface ............................ 39
Network Type Motion Control Interface ........................ 40
Software Real-time Motion Control Kernel ................... 40
DSP Based Motion Control Kernel ............................... 41
ASIC Based Motion Control Kernel .............................. 41
Compare Table of All Motion Control Types ................. 42
PCI-8102’s Motion Controller Type ............................... 42
4.2 Motion Control Modes........................................................ 42
Coordinate System ....................................................... 43
Absolute and Relative Position Move ........................... 44
Trapezoidal Speed Profile ............................................ 44
S-Curve and Bell-Curve Speed Profile ......................... 46
Velocity Mode ............................................................... 48
One Axis Position Mode ............................................... 48
Two Axes Linear Interpolation Position Mode .............. 49
Two Axes Circular Interpolation Mode .......................... 50
Continuous Motion ........................................................ 52
Home Return Mode ...................................................... 54
Home Search Function ................................................. 61
Manual Pulser Function ................................................ 62
Simultaneous Start Function ......................................... 63
Speed Override Function .............................................. 63
Position Override Function ........................................... 64
4.3 Motor Driver Interface ........................................................ 65
Pulse Command Output Interface ................................ 65
Pulse Feedback Input Interface .................................... 68
In Position Signal .......................................................... 70
Servo Alarm Signal ....................................................... 70
ii Table of Contents
PCI-8102
Error Clear Signal ......................................................... 71
Servo ON/OFF Switch .................................................. 71
Servo Ready Signal ...................................................... 71
Servo Alarm Reset Switch ............................................ 72
4.4 Mechanical Switch Interface .............................................. 72
Original or Home Signal ................................................ 72
End-Limit Switch Signal ................................................ 72
Slow Down Switch ........................................................ 73
Positioning Start switch ................................................. 73
Counter Clear switch .................................................... 73
Counter Latch Switch .................................................... 73
Emergency Stop Input .................................................. 74
4.5 Counters ............................................................................ 75
Command Position Counter .......................................... 75
Feedback Position Counter .......................................... 75
Command and Feedback Error Counter ....................... 76
General Purpose Counter ............................................. 76
Target Position Recorder .............................................. 76
4.6 Comparators ...................................................................... 77
Soft End-Limit Comparators ......................................... 77
Command and Feedback Error Counter Comparators . 77
General Comparator ..................................................... 78
Trigger Comparator ...................................................... 78
4.7 Other Motion Functions ..................................................... 79
Backlash Compensation and Slip Corrections .............. 79
Vibration Restriction Function ....................................... 79
Speed Profile Calculation Function ............................... 80
4.8 Interrupt Control................................................................. 81
4.9 Multiple Card Operation..................................................... 84
5 MotionCreatorPro............................................................. 85
5.1 Execute MotionCreatorPro ................................................ 85
5.2 About MotionCreatorPro .................................................... 85
5.3 MotionCreatorPro Form Introduction ................................. 87
Main Menu .................................................................... 87
Select Menu .................................................................. 88
Card Information Menu ................................................. 89
Configuration Menu ...................................................... 90
Single Axis Operation Menu ......................................... 96
Two-Axis Operation Menu .......................................... 103
Table of Contents iii
2D_Motion Menu ........................................................ 107
Help Menu .................................................................. 113
6 Function Library.............................................................. 115
6.1 List of Functions............................................................... 115
6.2 C/C++ Programming Library ............................................ 121
6.3 Initialization ...................................................................... 122
6.4 Pulse Input/Output Configuration..................................... 125
6.5 Velocity mode motion....................................................... 127
6.6 Single Axis Position Mode ............................................... 130
6.7 Linear Interpolated Motion ............................................... 134
6.8 Circular Interpolation Motion ............................................ 137
6.9 Home Return Mode.......................................................... 140
6.10 Manual Pulser Motion ...................................................... 143
6.11 Motion Status ................................................................... 145
6.12 Motion Interface I/O ......................................................... 147
6.13 Interrupt Control ............................................................... 154
6.14 Position Control and Counters ......................................... 158
6.15 Position Compare and Latch............................................ 162
6.16 Continuous Motion ........................................................... 166
6.17 Multiple Axes Simultaneous Operation ............................ 168
6.18 General-Purposed DIO .................................................... 171
6.19 Soft Limit .......................................................................... 173
6.20 Backlash Compensation / Vibration Suppression ............ 175
6.21 Speed Profile Calculation................................................. 177
6.22 Return Code..................................................................... 180
7 Connection Example ...................................................... 183
7.1 General Description of Wiring .......................................... 183
7.2 Wiring with DIN-68M-J3A................................................. 183
Pin Assignments: ........................................................ 185
Signal Connections of Interface Circuit ....................... 190
Mechanical Dimensions: ............................................. 193
Appendix.............................................................................. 195
8.1 Color code of Mitsubishi servo J3A cable ........................ 195
Important Safety Instructions............................................. 197
Getting Service.................................................................... 199
iv Table of Contents

List of Figures

Figure 1-1: PCI-8102 Block Diagram ........................................... 2
Figure 1-2: Flow Chart for Building an Application ....................... 3
Figure 2-1: PCB Layout of the PCI-8102 ................................... 10
vi List of Figures
This page intentionally left blank.
PCI-8102
List of Figures vii
viii List of Figures
PCI-8102

Preface

Copyright 2011 ADLINK Technology Inc.
This document contains proprietary information protected by copy­right. All rights are reserved. No part of this manual may be repro­duced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.
Disclaimer
The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer.
In no event will the manufacturer be liable for direct, indirect, spe­cial, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.
Environmental Responsibility
ADLINK is committed to fulfill its social responsibility to global environmental preservation through compliance with the Euro­pean Union's Restriction of Hazardous Substances (RoHS) direc­tive and Waste Electrical and Electronic Equipment (WEEE) directive. Environmental protection is a top priority for ADLINK. We have enforced measures to ensure that our products, manu­facturing processes, components, and raw materials have as little impact on the environment as possible. When products are at their end of life, our customers are encouraged to dispose of them in accordance with the product disposal and/or recovery programs prescribed by their nation or company.
Trademarks
Product names mentioned herein are used for identification pur­poses only and may be trademarks and/or registered trademarks of their respective companies.
Preface ix
Conventions
Take note of the following conventions used throughout this manual to make sure that users perform certain tasks and instructions properly.
Additional information, aids, and tips that help users perform tasks.
NOTE:
NOTE:
Information to prevent minor physical injury, component dam-
age, data loss, and/or program corruption when trying to com-
CAUTION:
WARNING:
plete a task.
Information to prevent serious physical injury, component
damage, data loss, and/or program corruption when trying to complete a specific task.
xPreface

1 Introduction

The PCI-8102 is an advanced 2-axis motion controller card with a PCI interface. It can generate high frequency pulses (6.55MHz) to drive stepper or servomotors. As a motion controller, it can provide 2-axis linear and circular interpolation and continuous interpolation for continuous velocity. Also, changing position/speed on the fly is available with a single axis operation.
Multiple PCI-8102 cards can be used in one system. Incremental encoder interface on all four axes provide the ability to correct positioning errors generated by inaccurate mechanical transmis­sions. PCI-8102 features the position compare and trigger output function which users can put the comparing points with ADLINK library and sending the triggering pulse to other device. In addi­tion, a mechanical sensor interface, servo motor interface, and general-purposed I/O signals are provided for easy system inte­gration.
Figure 1-1 shows the functional block diagram of the PCI-8102 card. The motion control functions include trapezoidal and S-curve acceleration/deceleration, linear and circular interpolation between two axes and continuous motion positioning, and 13 home return modes. All these functions and complex computations are per­formed internally by the ASIC, thus it can save CPU loading.
The PCI-8102 also offers three user-friendly functions. The PCI-8102 can let users assign the card index with the DIP switch setting. The value is within 0 to 15. It is useful for machine makers to recognize the card index if the whole control system is very huge. The emergency input pin can let users wire the emergency button to trigger this board to stop sending pulse output once there is any emergency situation happened. For security protection design, users can set the 16-bit value into EEPROM. Users’ inter­face program can uses this EEPROM to secure the software and hardware in order to prevent piracy.
PCI-8102
Introduction 1
P
2
2
I B
VDD
DC/DC
ROM
PLX9 05
ASIC
+24V
Digital I/O Isolation
I
Figure 1-1: PCI-8102 Block Diagram
CPLD
VCC
P1
CardID S1
16 DI/O P2
STA/STP K1&
MotionCreatorPro is a Windows-based application development software package included with the PCI-8102. MotionCreatorPro is useful for debugging a motion control system during the design phase of a project. An on-screen display lists all installed axes information and I/O signal status of the PCI-8102.
Windows programming libraries are also provided for C++ com­piler and Visual Basic. Sample programs are provided to illustrate the operations of the functions.
Figure 1-2 illustrates a flow chart of the recommended process in using this manual in developing an application. Refer to the related chapters for details of each step.
2Introduction
PCI-8102
Figure 1-2: Flow Chart for Building an Application
Introduction 3

1.1 Features

The following list summarizes the main features of the PCI-8102 motion control system.
X 32-bit PCI bus Plug and Play
X 2 axes of step and direction pulse output for controlling
stepping or servomotor
X Maximum output frequency of 6.55 MPPS
X Pulse output options: OUT/DIR, CW/CCW
X Programmable acceleration and deceleration time for all
modes
X Trapezoidal and S-curve velocity profiles for all modes
X 2 axes linear / circular interpolation
X Continuous interpolation for contour following motion
X Change position and speed on the fly
X 13 home return modes with auto searching
X Hardware backlash compensator and vibration suppression
X 2 software end-limits for each axis
X 28-bit up/down counter for incremental encoder feedback
X Home switch, index signal (EZ), positive, and negative end
limit switches interface on all axes
X 2-axis high speed position latch input
X 2-axis position compare trigger output
X All digital input and output signals are 2500Vrms isolated
X Programmable interrupt sources
X Simultaneous start/stop motion on multiple axes
X Manual pulser input interface
X Card index selection
X Security protection on EERPOM
X Dedicated emergency input pin for wiring
X Software supports a maximum of up to 12 PCI-8102 cards
operation in one system
X Compact PCB design
X Includes MotionCreatorPro, a Microsoft Windows-based
4Introduction
application development software
X PCI-8102 libraries and utilities for Windows 2000/XP/7

1.2 Specifications

X Applicable Motors:
Z Stepping motors
Z AC or DC servomotors with pulse train input servo driv-
ers
X Performance:
Z Number of controllable axes: 2
Z Maximum pulse output frequency: 6.55MPPS, linear,
trapezoidal, or S-Curve velocity profile drive
Z Internal reference clock: 19.66 MHz
Z 28-bit up/down counter range: 0-268,435,455 or –
134,217,728 to +134,217,727
Z Position pulse setting range (28-bit): -134,217,728 to
+134,217,728
Z Pulse rate setting range (Pulse Ratio = 1: 65535):
PCI-8102
0.1 PPS to 6553.5 PPS. (Multiplier = 0.1)
1 PPS to 65535 PPS. (Multiplier = 1)
Introduction 5
100 PPS to 6553500 PPS. (Multiplier = 100)
X I/O Signals:
Z Input/Output signals for each axis
Z All I/O signal are optically isolated with 2500Vrms isola-
tion voltage
Z Command pulse output pins: OUT and DIR
Z Incremental encoder signals input pins: EA and EB
Z Encoder index signal input pin: EZ
Z Mechanical limit/switch signal input pins: ±EL, SD/PCS,
and ORG
Z Servomotor interface I/O pins: INP, ALM, and ERC
Z Position latch input pin: LTC
Z Position compare output pin: CMP
Z General-purposed digital output pin: SVON
Z General-purposed digital input pin: RDY
Z Pulse signal input pin: PA and PB (with isolation)
Z Simultaneous Start/Stop signal: STA and STP
Z Emergency input signal: EMG
X General-Purpose Output
Z 20 digital inputs / 18 digital outputs
X General Specifications
Z Connectors: 68-pin SCSI-type connector
Z Operating Temperature: 0°C - 50°C
Z Storage Temperature: -20°C - 80°C
Z Humidity: 5 - 85%, non-condensing
X Power Consumption
Z Slot power supply (input): +5V DC ±5%, 900mA max
Z External power supply (input): +24V DC ±5%, 500mA
max
Z External power supply (output): +5V DC ±5%, 500mA,
max
6Introduction
PCI-8102
X PCI-8102 Dimension (PCB size): 120mm(L) X 100mm(W)

1.3 Supported Software

Programming Library

Windows 2000/XP/7 (32bit/64bit) DLLs are provided for PCI-8102 users. These function libraries are shipped with the board.

MotionCreatorPro

This Windows-based utility is used to setup cards, motors, and systems. It can also aid in debugging hardware and software prob­lems. It allows users to set I/O logic parameters to be loaded in their own program. This product is also bundled with the card.
Refer to Chapter 5 for more details.

1.4 Available Terminal Board

ADLINK provides a variety of specific terminal boards for connec­tion to individual servos, such as Mitsubishi J2S, J3A, Panasonic MINAS A4, Yaskawa Sigma II, III and V, as well as a DIN-68S0 board for general purpose usage. Available terminal boards are available as follows.
PCI-1802 Terminal Board
DIN-68M-J2A0
DIN-68M-J3A0
Introduction 7
Corresponding Servo Driver
Mitsubishi J2S series
Mitsubishi J3A series
Board Appearance
PCI-1802 Terminal Board
Corresponding Servo Driver
Board Appearance
DIN-68P-A40
DIN-68Y-SGII0
DIN-68S0
Panasonic MINAS A4 and A5 series
Yaskawa Sigma II, III and V series
General Purpose
This page intentionally left blank.
8Introduction

2 Installation

This chapter describes how to install the PCI-8102 series. Please follow these steps below:
X Check what you have (section 2.1)
X Check the PCB (section 2.2)
X Install the hardware (section 2.3)
X Install the software driver (section 2.4)
X Understanding the I/O signal connections (chapter 3) and
their operation (chapter 4)
X Understanding the connector pin assignments (the remain-
ing sections) and wiring the connections

2.1 Package Contents

In addition to this User’s Guide, the package also includes the fol­lowing items:
X PCI-8102: advanced 2-Axis Servo / Stepper Motion Control
Card
X Extension cable: DB37FM-IDC44 flat cable
X ADLINK All-in-one Compact Disc
PCI-8102
If any of these items are missing or damaged, contact the dealer from whom you purchased the product. Save the shipping materi­als and carton to ship or store the product in the future.
Installation 9

2.2 PCI-8102 Outline Drawing

Figure 2-1: PCB Layout of the PCI-8102
P1: Input / Output Signal Connector (68-pin)
P2: 16 Digital Input / Output Signals Connector
K1 / K2: Simultaneous Start / Stop Connector
SW1: DIP switch for card index selection (0-15)
J8-J11: Pulse output selection jumper
J12/J13: CMP output interface selection jumper
J14: EMG input signal setting
10 Installation
PCI-8102

2.3 PCI-8102 Hardware Installation

2.3.1 Hardware Configuration

The PCI-8102 is fully Plug and Play compliant. Hence memory allocation (I/O port locations) and IRQ channel of the PCI card are assigned by the system BIOS. The address assignment is done on a board-by-board basis for all PCI cards in the system.

2.3.2 PCI Slot Selection

Your computer system may have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PCI-8102 can be used in any PCI slot.

2.3.3 Installation Procedures

1. Read through this manual and setup the jumper accord­ing to your application
2. Turn off your computer. Turn off all accessories (printer, modem, monitor, etc.) connected to computer. Remove the cover from your computer.
3. Select a 32-bit PCI/PXI expansion slot. PCI slots are shorter than ISA or EISA slots and are usually white or ivory.
4. Before handling the PCI-8102, discharge any static buildup on your body by touching the metal case of the computer. Hold the edge of the card and do not touch the components.
5. Position the board into the PCI slot you have selected.
6. Secure the card in place at the rear panel of the system unit using screws removed from the slot.
Installation 11

2.3.4 Troubleshooting

If your system doesn’t boot or if you experience erratic operation with your PCI board in place, it’s most likely caused by an interrupt conflict (possibly an incorrect ISA setup). In general, the solution, once determined it is not a simple oversight, is to consult the BIOS documentation that comes with your system.
Check the control panel of the Windows system if the card is listed by the system. If not, check the PCI settings in the BIOS or use another PCI slot.

2.4 Software Driver Installation

PCI-8102:
1. Auto run the ADLINK All-In-One CD. Choose Driver Installation -> Motion Control -> PCI-8102.
2. Follow the procedures of the installer.
3. After setup installation is completed, restart windows.
Suggestion: Please download the latest software from ADLINK website if necessary.
12 Installation

2.5 P1 Pin Assignments: Main connector

P1 is the major connector for the motion control I/O signals.
PCI-8102
No. Name I/O
1 VPP O
2EXGND-
3OUT0+O
4 OUT0- O Pulse signal (-) 38 OUT1- O Pulse signal (-)
5 DIR0+ O Dir. signal (+) 39 DIR1+ O Dir. signal (+)
6 DIR0- O Dir. signal (-) 40 DIR1- O Dir. signal (-)
7 SVON0 O Servo On/Off 41 SVON1 O Servo On/Off
8 ERC0 O
9 ALM0 I Alarm signal 43 ALM1 I Alarm signal
10 INP0 I
11 RDY0 I
12 EA0+ I
13 EA0- I
14 EB0+ I
15 EB0- I
16 EZ0+ I
17 EZ0- I
18 VPP O
Function Axis
0
Isolated +5V
Output
Ext. power
ground
Pulse signal
(+)
Dev. ctr, clr.
signal
In-position sig-
nal
Multi-purpose
input signal
Encoder A-
phase (+)
Encoder A-
phase (-)
Encoder B-
phase (+)
Encoder B-
phase (-)
Encoder Z-
phase (+)
Encoder Z-
phase (-)
Isolated +5V
Output
T able 2-1: P1 Pin Assignment
No. Name I/O
35 VPP O
36 EXGND -
37 OUT1+ O
42 ERC1 O
44 INP1 I
45 RDY1 I
46 EA1+ I
47 EA1- I
48 EB1+ I
49 EB1- I
50 EZ1+ I
51 EZ1- I
52 VPP O
Function Axis
1
Isolated +5V
Output
Ext. power
ground
Pulse signal
(+)
Dev. ctr, clr.
Signal
In-position sig-
nal
Multi-purpose
input signal
Encoder A-
phase (+)
Encoder A-
phase (-)
Encoder B-
phase (+)
Encoder B-
phase (-)
Encoder Z-
phase (+)
Encoder Z-
phase (-)
Isolated +5V
Output
Installation 13
No. Name I/O
19 N/C 53 EXGND -
20 PEL0 I
21 MEL0 I
22 EXGND -
LTC/SD/
23
PCS0/
CLR0
24 ORG0 I Origin signal 58 ORG1 I Origin signal
25 N/C 59 EXGND -
26 PA+_ISO I
27 PA-_ISO I
28 PB+_ISO I
29 PB-_ISO I
30 CMP0 O
31 CMP1 O
32 EXGND -
33 EXGND -
34 EX+24V I
Function Axis
0
End limit signal
(+)
End limit signal
(-)
Ext. power
ground
Composite
I
Funtion
(Default: LTC)
Manual Pulser
Input A
Manual Pulser
Input A
Manual Pulser
Input B
Manual Pulser
Input B
TTL Compare
Output 0
TTL Compare
Output 1
Ext. power
ground
Ext. power
ground
+24V isolation
power input
Table 2-1: P1 Pin Assignment
No. Name I/O
54 PEL1 I
55 MEL1 I
56 EXGND -
57
60 EMG I
61 DIN0 I Digital Input 0
62 DIN1 I Digital Input 1
63 DIN2 I Digital Input 2
64 DIN3 I Digital Input 3
65 DOUT0 O
66 DOUT1 O
67 EXGND -
68 EX+24V I
LTC/SD/
PCS1/
CLR1
Function Axis
Ext. power
ground
End limit signal
End limit signal
Ext. power
ground
Composite
I
Funtion
(Default: LTC)
Ext. power
ground
Emergency
Input
Digital Output
0,SVO RST
Digital Output
1,SVO RST
Ext. power
ground
+24V isolation
power input
1
(+)
(-)
14 Installation
PCI-8102

2.6 P2 Pin Assignment: Digital Inputs / Outputs

P2 is the second connector for the additional 16 DI/O signals.
No. Name I/O Function No. Name I/O Function
1EX_GND--
3DI0I
5DI2I
7DI4I
9VDDO
11 DI6 I
13 DI8 I
15 DI10 I
17 EX_GND --
19 DI12 I
21 DI14 I
23 DO0 O
25 DO2 O
27 EX_GND --
29 DO4 O
31 DO6 O
External Power
Ground
Discrete Input
Channel 0
Discrete Input
Channel 2
Discrete Input
Channel 4
External +5V
Power
Discrete Input
Channel 6
Discrete Input
Channel 8
Discrete Input
Channel 10
External Power
Ground
Discrete Input
Channel 12
Discrete Input
Channel 14
Discrete Output
Channel 0
Discrete Output
Channel 2
External Power
Ground
Discrete Output
Channel 4
Discrete Output
Channel 6
T able 2-2: P2 Pin Assignment
2 EX_GND --
4DI1I
6DI3I
8DI5I
10 EX_GND --
12 DI7 I
14 DI9 I
16 DI11 I
18 EX_GND --
20 DI13 I
22 DI15 I
24 DO1 O
26 DO3 O
28 EX_GND --
30 DO5 O
32 DO7 O
External Power
Ground
Discrete Input
Channel 1
Discrete Input
Channel 3
Discrete Input
Channel 5
External Power
Ground
Discrete Input
Channel 7
Discrete Input
Channel 9
Discrete Input
Channel 11
External Power
Ground
Discrete Input
Channel 13
Discrete Input
Channel 15
Discrete Output
Channel 1
Discrete Output
Channel 3
External Power
Ground
Discrete Output
Channel 5
Discrete Output
Channel 7
Installation 15
No. Name I/O Function No. Name I/O Function
33 DO8 O
35 EX_GND --
37 DO10 O
39 DO12 O
41 DO14 O
43 EX_GND --
Discrete Output
Channel 8
External Power
Ground
Discrete Output
Channel 10
Discrete Output
Channel 12
Discrete Output
Channel 14
External Power
Ground
Table 2-2: P2 Pin Assignment
34 DO9 O
36 VDD O
38 DO11 O
40 DO13 O
42 DO15 O
44 EX_GND --
Discrete Output
Channel 9
External +5V
Power
Discrete Output
Channel 11
Discrete Output
Channel 13
Discrete Output
Channel 15
External Power
Ground
16 Installation
PCI-8102
2.7 K1/K2 Pin Assignments: Simultaneous Start/
Stop
CN4 is for simultaneous start/stop signals for multiple axes or mul­tiple cards.
No. Name Function (Axis)
1 +5V PCI Bus power Output (VCC)
2 STA Simultaneous start signal input/output
3 STP Simultaneous stop signal input/output
4 GND PCI Bus power ground
Note: +5V and GND pins are provided by the PCI Bus power.

2.8 Jumper Settings for Pulse Output

J8-J11 are used to set the type of pulse output signals (DIR and OUT). The output signal type can either be differential line driver or open collector output. Refer to section 3.1 for detail jumper set­tings. The default setting is differential line driver mode. The default setting is differential line driver mode. J8 & J9 are for axis 0; J10 & J11 are for axis 1.
Installation 17

2.9 CMP & EMG Interface Settings

Jumpers J12 and J13 identify the CMP signal output interface as Pull-Up or OPEN-Collector, with the latter requiring pull up of the CMP signal.
To reduce evaluation and debugging, the PCI-8102 provides the jumper J14 to enable or disable EMG function as the following set­ting.
EMG disabled (Debug)
EMG enabled (Normal)
18 Installation
PCI-8102

2.10 Switch Setting for card index

The SW1 switch is used to set the card index. For example, if you turn 1 to ON and others are OFF. It means the card index as 1. The value is from 0 to 15. Refer to the following table for details.
Card
ID
0 0000
1 0001
2 0010
30011
4 0100
5 0101
60110
70111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 111 0
15 1111
Switch Setting
(ON=1)
Installation 19
This page intentionally left blank.
20 Installation

3 Signal Connections

Signal connections of all I/O’s are described in this chapter. Refer to the contents of this chapter before wiring any cables between the 8102 and any motor drivers.

3.1 Pulse Output Signals OUT and DIR

There are 2 axis pulse output signals on the PCI-8102. For each axis, two pairs of OUT and DIR signals are used to transmit the pulse train and to indicate the direction. The OUT and DIR signals can also be programmed as CW and CCW signal pairs. Refer to section 4.1 for details of the logical characteristics of the OUT and DIR signals. In this section, the electrical characteristics of the OUT and DIR signals are detailed. Each signal consists of a pair of differential signals. For example, OUT0 consists of OUT0+ and OUT0- signals. The following table shows all pulse output signals on P1.
P1 Pin No. Signal Name Description Axis #
3 OUT0+ Pulse signals (+) 1
4 OUT0- Pulse signals (-) 1
5 DIR0+ Direction signal (+) 1
6 DIR0- Direction signal (-) 1
37 OUT1+ Pulse signals (+) 2
38 OUT1- Pulse signals (-) 2
39 DIR1+ Direction signal (+) 2
40 DIR1- Direction signal (-) 2
PCI-8102
The output of the OUT or DIR signals can be configured by jump­ers as either differential line drivers or open collector output. Users
Signal Connections 21
can select the output mode either by shorting pins 1 and 2 or 2
K
and 3 of jumpers J8-J11 as follows:
Output Signal
For differential line driver
output, short pins 1 and 2
of:
For open collector output,
short pins 2 and 3 of:
OUT0- J8 J8
DIR0- J9 J9
OUT1- J10 J10
DIR1- J11 J11
The default setting of OUT and DIR is set to differential line driver mode. The following wiring diagram is for OUT and DIR signals on the 2 axes.
PCI-8102:
J8-J11
VDD
2
3
1
OUT+/DIR+
OUT-/DIR­EXGND
OUT/DIR
VCC
4.7
26LS31
NOTE: If the pulse output is set to open collector output mode, OUT- and DIR- are used to transmit OUT signals. The sink current must not exceed 20mA on the OUT- and DIR- pins. The default setting of jumper is 1-2 shorted. The default setting is 1-2 shorted.
Suggest Usage: Jumper 2-3 shorted and connect OUT+/DIR+ to a 470 ohm pulse input interface’s COM of driver. See the following figure.
VDD (+5V)
Warning: The sink current must not exceed 20mA or the 26LS31 will
be damaged.
22 Signal Connections
PCI-8102
m

3.2 Encoder Feedback Signals EA, EB and EZ

The encoder feedback signals include EA, EB, and EZ. Every axis has six pins for three differential pairs of phase-A (EA), phase-B (EB), and index (EZ) inputs. EA and EB are used for position counting, and EZ is used for zero position indexing. Its relative sig­nal names, pin numbers, and axis numbers are shown as follows:
P1 Pin No
12 EA0+ 1 13 EA0- 1
14 EB0+ 1 15 EB0- 1
46 EA1+ 2 47 EA1- 2
48 EA1+ 2 49 EA1- 2
P1 Pin No
16 EZ0+ 1 17 EZ0- 1
50 EZ1+ 2 51 EZ1- 2
Signal
Name
Signal
Name
Axis
#
Axis
#
P1 Pin No
P1 Pin No
Signal
Name
Signal
Name
Axis
#
Axis
#
The input circuit of the EA, EB, and EZ signals is shown as fol­lows:
Motion IC
EA, EB, EZ
HP0631
Inside 8102
R = 330 Oh
C = 100 p
P1
EA+, EB+, EZ+
EA-, EB­EZ-
Please note that the voltage across each differential pair of encoder input signals (EA+, EA-), (EB+, EB-), and (EZ+, EZ-) should be at least 3.5V. Therefore, the output current must be observed when connecting to the encoder feedback or motor driver feedback as not to over drive the source. The differential signal pairs are converted to digital signals EA, EB, and EZ; then feed to the motion control ASIC.
Below are examples of connecting the input signals with an exter­nal circuit. The input circuit can be connected to an encoder or
Signal Connections 23
motor driver if it is equipped with: (1) a differential line driver or (2) an open collector output.
Connection to Line Driver Output
To drive the PCI-8102 encoder input, the driver output must pro­vide at least 3.5V across the differential pairs with at least 6mA driving capacity. The grounds of both sides must be tied together. The maximum frequency will be 6.5Mhz or more depends on wir­ing distance and signal conditioning.
Inside 8102
EA+,EB+,EZ+ EA-, EB-, EZ-
EGND GND
External Encoder / Driver With line driver output
A,B phase signals Index signal
Connection to Open Collector Output
To connect with an open collector output, an external power sup­ply is necessary. Some motor drivers can provide the power source. The connection between the PCI-8102, encoder, and the power supply is shown in the diagram below. Note that an external current limiting resistor R is necessary to protect the PCI-8102 input circuit. The following table lists the suggested resistor values according to the encoder power supply.
Encoder Power (V) External Resistor R
+5V
+12V
+24V
Ω(None)
0
1.8kΩ
4.3k
Ω
If max power = 6mA
24 Signal Connections
PCI-8102
Inside PCI-8102
EA+, EB+, EZ+
EA-, EB-, EZ-
R
V
GND
Motor Encoder / Driver With Open Collector Output
External Power for Encoder
A, B phase signals
Index signal
For more operation information on the encoder feedback signals, refer to section 4.4.

3.3 EMG Emergency Stop

An emergency stop input channel is provided, as shown. When the EMG signal is active, all motion pulse output command is rejected until the EMG is deactivated. The emergency stop switch is set to B-type (Normal-Closed), requiring normal connection to ground.
P1 Pin No Signal Name Axis #
60 EMG 1 & 2
Inside 8102
P1
Signal Connections 25

3.4 Origin Signal ORG

The origin signals (ORG0~ORG1) are used as input signals for the origin of the mechanism. The following table lists signal names, pin numbers, and axis numbers:
P1 Pin No Signal Name Axis #
24 ORG0 1
58 ORG1 2
The input circuit of the ORG signals is shown below. Usually, a limit switch is used to indicate the origin on one axis. The specifi­cations of the limit switch should have contact capacity of +24V @ 6mA minimum. An internal filter circuit is used to filter out any high frequency spikes, which may cause errors in the operation.
Inside 8102
P1
When the motion controller is operated in the home return mode, the ORG signal is used to inhibit the control output signals (OUT and DIR). For detailed operations of the ORG signal, refer to sec­tion 4.3.
26 Signal Connections
PCI-8102

3.5 End-Limit Signals PEL and MEL

There are two end-limit signals PEL and MEL for each axis. PEL indicates the end limit signal is in the plus direction and MEL indi­cates the end limit signal is in the minus direction. The signal names, pin numbers, and axis numbers are shown in the table below:
P1 Pin No
20 PEL0 1 21 MEL0 1
54 PEL1 2 55 MEL1 2
Signal
Name
Axis
#
P1 Pin No
Signal
Name
Axis
#
A circuit diagram is shown in the diagram below. The external limit switch should have a contact capacity of +24V @ 8mA minimum. Either ‘A-type’ (normal open) contact or ‘B-type’ (normal closed) contact switches can be used. To set the active logic of the exter­nal limit signal, please refer to the explanation of _8102_set_limit_logic function.
Inside 8102
P1
Signal Connections 27

3.6 In-Position Signal INP

The in-position signal INP from a servo motor driver indicates its deviation error. If there is no deviation error then the servo’s posi­tion indicates zero. The signal names, pin numbers, and axis num­bers are shown in the table below:
P1 Pin No Signal Name Axis #
10 INP0 1
44 INP1 2
The input circuit of the INP signals is shown in the diagram below:
P1
Inside 8102
VDD (+5V)
The in-position signal is usually generated by the servomotor driver and is ordinarily an open collector output signal. An external circuit must provide at least 8mA current sink capabilities to drive the INP signal.
P1
28 Signal Connections
PCI-8102

3.7 Alarm Signal ALM

The alarm signal ALM is used to indicate the alarm status from the servo driver. The signal names, pin numbers, and axis numbers are shown in the table below:
P1 Pin No Signal Name Axis #
9ALM01
43 ALM1 2
The input alarm circuit is shown below. The ALM signal usually is generated by the servomotor driver and is ordinarily an open col­lector output signal. An external circuit must provide at least 8mA current sink capabilities to drive the ALM signal.
Inside 8102
VDD (+5V)
P1

3.8 Deviation Counter Clear Signal ERC

The deviation counter clear signal (ERC) is active in the following 4 situations:
1. Home return is complete
2. End-limit switch is active
3. An alarm signal stops OUT and DIR signals
4. An emergency stop command is issued by software
(operator)
Signal Connections 29
The signal names, pin numbers, and axis numbers are shown in the table below:
P1 Pin No Signal Name Axis #
8 ERC0 1
42 ERC1 2
The ERC signal is used to clear the deviation counter of the servo­motor driver. The ERC output circuit is an open collector with a maximum of 35V at 50mA driving capacity.
Inside 8102
P1

3.9 General-Purpose Signal SVON

The SVON signal can be used as a servomotor-on control or gen­eral purpose output signal. The signal names, pin numbers, and its axis numbers are shown as follows:
P1 Pin No Signal Name Axis #
7 SVON0 1
41 SVON1 2
30 Signal Connections
The output circuit for the SVON signal is shown below:
PCI-8102
Inside 8102
P1

3.10 General-Purpose Signal RDY

The RDY signals can be used as motor driver ready input or gen­eral purpose input signals. The signal names, pin numbers, and axis numbers are shown as follows:
P1 Pin No Signal Name Axis #
11 RD Y0 1
45 RDY1 2
The input circuit of RDY signal is shown in the following diagram:
Inside 8102
VDD (+5V)
P1

3.11 Position Compare Output pin: CMP

The PCI-8102 provides 2 comparison output channels, CMP0 and CMP1, which refer to axes 0 and 1 respectively. The comparison output channel will generate a pulse signal when the encoder counter reaches a pre-set value set by the user.
Signal Connections 31
The CMP channel is located on P1. The signal names, pin num­bers, and axis numbers are shown below:
P1 Pin No Signal Name Axis #
30 CMP0 1
31 CMP1 2
The following wiring diagram is of the CMP on the first 2 axes:
From Motion ASIC
Note: CMP trigger type can be set as normal low (rising edge) or normal high (falling edge). Default setting is normal high. Refer to function_8102_set_trigger_comparator for details.
32 Signal Connections
PCI-8102
p

3.12 Multi-Functional Input Pin: LTC/SD/PCS/CLR

The PCI-8102 provides 2 multi-functional input pins. Each of the 2 pins can be configured either as LTC(Latch) or SD(Slow down) or PCS(Target position override) or CLR(Counter clear). To select the pin function, please refer to 6.12. The default value is LTC and the relavant functions are as follows:
I16 _8102_select_pin23_input(I16 card_id, U16 Select );
I16 _8102_select_pin57_input(I16 card_id, U16 Select );
The multi-functional input pins are on P1. The signal names, pin numbers, and axis numbers are shown as follows:
P1 Pin No Signal Name Axis #
23 LTC/SD/PCS/CLR_0 1
57 LTC/SD/PCS/CLR_1 2
The multi-functional input pin wiring diagram is as followed:
P1
EX24V+
Inside 8102
=2.2K Ohm
R
VCC
To CPLD
Multi-Functional In
ut
HP0631
DGND

3.13 Simultaneously Start/Stop Signals STA and STP

The PCI-8102 provides STA and STP signals, which enable simul­taneous start/stop of motions on multiple axes. The STA and STP signals are on K1 and K2.
Signal Connections 33
The diagram below shows the onboard circuit. The STA and STP signals of the two axes are tied together respectively.
The STP and STA signals are both input and output signals. To operate the start and stop action simultaneously, both software control and external control are needed. With software control, the signals can be generated from any one of the PCI-8102. Users can also use an external open collector or switch to drive the STA/ STP signals for simultaneous start/stop.
If there are two or more PCI-8102 cards, connect the K2 connector on the previous card to K1 connector on the following card. The K1 and K2 connectors on a same PCI-8102 are connected inter­nally.
User can also use external start and stop signals to issue a cross­card simultaneous motor operation. Just connect external start and stop signals to STA and STP pins on the K1 connector of the first PCI-8102 card.
34 Signal Connections
PCI-8102

3.14 General Purpose Digital Input/Output

The PCI-8102 provides 20 isolated digital input channels and 18 isolated digital output channels which were set into P1 and P2
connectors accordingly as following pin assignment table
.::
Pin No.
Name Function
61 DIN0 Digital IN0
62 DIN1 Digital IN1
63 DIN2 Digital IN2
64 DIN3 Digital IN3
65 DOUT0 Digital Out0
66 DOUT1 Digital Out1
Signal Connections 35

3.14.1 Extended DSUB 37-pin Connector

16 digital inputs and 16 digital outputs are conveniently connected with the included cable that connects to PCI-8102 P2 connector and DSUB-37p.
Pin assignment of the DSUB-37p connector is as follows.
Pin Name Function Pin Name Function
1 EX_GND
2DI0
36 Signal Connections
External Power Ground
Discrete Input Channel 0
20 EX_GND
21 DO0
External Power Ground
Discrete Output Channel 0
Pin Name Function Pin Name Function
3DI1
4DI2
5DI3
6DI4
7DI5
8DI6
9DI7
10 DI8
11 DI 9
12 DI10
13 DI11
14 DI12
15 DI13
16 DI14
17 DI15
18 EX_GND
19 VDD External +5V Power - - -
Discrete Input Channel 1
Discrete Input Channel 2
Discrete Input Channel 3
Discrete Input Channel 4
Discrete Input Channel 5
Discrete Input Channel 6
Discrete Input Channel 7
Discrete Input Channel 8
Discrete Input Channel 9
Discrete Input Channel 10
Discrete Input Channel 11
Discrete Input Channel 12
Discrete Input Channel 13
Discrete Input Channel 14
Discrete Input Channel 15
External Power Ground
22 DO1
23 DO2
24 DO3
25 DO4
26 DO5
27 DO6
28 DO7
29 DO8
30 DO9
31 DO10
32 DO11
33 DO12
34 DO13
35 DO14
36 DO15
37 EX_GND
Discrete Output Channel 1
Discrete Output Channel 2
Discrete Output Channel 3
Discrete Output Channel 4
Discrete Output Channel 5
Discrete Output Channel 6
Discrete Output Channel 7
Discrete Output Channel 8
Discrete Output Channel 9
Discrete Output Channel 10
Discrete Output Channel 11
Discrete Output Channel 12
Discrete Output Channel 13
Discrete Output Channel 14
Discrete Output Channel 15
External Power Ground
PCI-8102
1.Digital I/O type
Signal Connections 37
-N NPN Sinking Inputt:
3
To C PLD
VCC
Inside 8102
R = 330
P2
E5V
DGN D
-N NPN Sinking Output
From CP L D
VCC
PS2802
PS2805
0.5V Max.
Inside 8102
5V @ 50mA Maximum
DI
P2
DO
EGND
38 Signal Connections

4 Operations

This chapter describes the detail operation of the motion controller card.

4.1 Classifications of Motion Controller

At the beginning of servo/stepper driver come to the world, people start to talk about motion control widely instead of motor control. They separate motor control into two layers: one is motor control and the other is motion control. Motor control talks much about on the PWM, power stage, closed loop, hall sensors, vector space, and so on. Motion control talks much about on the speed profile generating, trajectory following, multi-axes synchronization, and coordinating.

4.1.1 Voltage Type Motion Control Interface

The interfaces between motion and motor control are changing rapidly. From the early years, people use voltage signal as a com­mand to motor controller. The amplitude of the signal means how fast a motor rotating and the time duration of the voltage changes means how fast a motor acceleration from one speed to the other speed. Voltage signal as a command to motor driver is so called “analog” type motion controller. It is much easier to integrate into an analog circuit of motor controller but sometimes noise is a big problem for this type of motion control. Besides, if people want to do positioning control of a motor, the analog type motion controller must have a feedback signal of position information and use a closed loop control algorithm to make it possible. This increased the complexity of motion control and not easy to use for a begin­ner.
PCI-8102

4.1.2 Pulse Type Motion Control Interface

The second interface of motion and motor control is pulses train type. As a trend of digital world, pulse trains type represent a new concept to motion control. The counts of pulses show how many steps of a motor rotates and the frequency of pulses show how fast a motor runs. The time duration of frequency changes repre­sent the acceleration rate of a motor. Because of this interface,
Operations 39
users can control a servo or stepper motor more easier than ana­log type for positioning applications. It means that motion and motor control can be separated more easily by this way.
Both of these two interfaces need to take care of gains tuning. For analog type position controller, the control loops are built inside and users must tune the gain from the controller. For pulses type position controller, the control loops are built outside on the motor drivers and users must tune the gains on drivers.
For more than one axes’ operation, motion control seems more important than motor control. In industrial applications, reliable is a very important factor. Motor driver vendors make good perfor­mance products and a motion controller vendors make powerful and variety motion software. Integrated two products make our machine go into perfect.

4.1.3 Network Type Motion Control Interface

Recently, there is a new control interface come into the world. That’s network type motion controller. The command between motor driver and motion controller is not analog or pulses signal any more. It is a network packet which contents position informa­tion and motor information. This type of controller is more reliable because of digitized and packetized. Because a motion controller must be real-time, the network must have real-time capacity around a cycle time below 1 mini-second. This means that not commercial network can do this job. It must have a specific net­work like Mitsubishi SSCNET. The network may have opto-fiber type to increase communication reliability.

4.1.4 Software Real-time Motion Control Kern el

For motion control kernel, there are three ways to accomplish it. They are DSP-based, ASIC based, and software real-time based.
A motion control system needs an absolutely real-time control cycle and the calculation on controller must provide a control data at the same cycle. If not, the motor will not run smoothly. Many machine makers will use PC’s computing power to do this. They can use simply a feedback counter card and a voltage output or pulse output card to make it. This method is very low-end and
40 Operations
PCI-8102
takes much software effort. For sure their real-time performance, they will use a real-time software on the system. It increases the complexity of the system too. But this method is the most flexible way for a professional motion control designers. Most of these methods are on NC machines.

4.1.5 DSP Based Motion Control Kernel

A DSP-based motion controller kernel solves real-time software problem on computer. DSP is a micro-processer itself and all motion control calculations can be done on it. There is no real-time software problem because DSP has its own OS to arrange all the procedures. There is no interruption from other inputs or context switching problem like Windows based computer. Although it has such a perfect performance on real-time requirements, its calcula­tion speed is not as fast as PC’s CPU at this age. Besides, the software interfacing between DSP based controller’s vendors and users are not easy to use. Some controller vendors provide some kind of assembly languages for users to learn and some controller vendors provide only a handshake documents for users to use. Both ways are not easy to use. DSP-based controllers provide a better way than software kernel for machine makers to build they applications.

4.1.6 ASIC Based Motion Control Kernel

An ASIC-base motion control kernel is a fair way between soft­ware kernel and DSP kernel. It has no real-time problem because all motion functions are done via ASIC. Users or controller’s ven­dors just need to set some parameters which ASIC requires and the motion control will be done easily. This kind of motion control separates all system integration problems into 4 parts: Motor driver’s performance, ASIC outputting profile, vendor’s software parameters to ASIC, and users’ command to vendors’ software. It makes motion controller co-operated more smoothly between devices.
Operations 41

4.1.7 Compare Table of All Motion Control Types

Software ASIC DSP
Price Fair Cheap Expensive
Functionality Highest Low Normal
Maintenance Hard Easy Fair
Analog Pulses Network
Price High Low Normal
Signal Quality Fair Good Reliable
Maintenance Hard Easy Easy

4.1.8 PCI-8102’s Motion Controller Type

The PCI-8102 is an ASIC based, pulse type motion controller. We make this card into three blocks: motion ASIC, PCI card, software motion library. Users can access motion ASIC via our software motion library under Windows 2000/XP/7, Linux, and RTX driver. Our software motion library provides one-stop-function for control­ling motors. All the speed parameters’ calculations are done via our library.
For example, if users want to perform a one-axis point to point motion with a trapezoidal speed profile, they just only fill the target position, speed, and acceleration time in one function. Then the motor will run as the profile. It takes no CPU’s resource because every control cycle’s pulses generation is done by ASIC. The pre­cision of target position depends on motor drivers’ closed loop control performance and mechanical parts, not on motion control­ler’s command because the motion controller is only responsible for sending correct pulses counts via a desired speed profile. So it is much easier for programmers, mechanical or electrical engi­neers to find out problems.

4.2 Motion Control Modes

Not like motor control is only for positive or negative moving, motion control make the motors run according to a specific speed profile, path trajectory and synchronous condition with other axes.
42 Operations
PCI-8102
The following sections describe the motion control modes of this motion controller could be performed.

4.2.1 Coordinate System

We use Cartesian coordinate and pulses for the unit of length. The physical length depends on mechanical parts and motor’s resolu­tion. For example, if users install a motor on a screw ball. The pitch of screw ball is 10mm and the pulses needed for a round of motor are 10,000 pulses. We can say that one pulse’s physical unit is equal to 10mm/10,000p =1 micro-meter.
Just set a command with 15,000 pulses for motion controller if we want to move 15mm. How about if we want to move 15.0001mmΔ Don’t worry about that, the motion controller will keep the residue value less than 1 pulse and add it to next command.
The motion controller sends incremental pulses to motor drivers. It means that we can only send relative command to motor driver. But we can solve this problem by calculating the difference between current position and target position first. Then send the differences to motor driver. For example, if current position is
1000. We want to move a motor to 9000. User can use an abso-
lute command to set a target position of 9000. Inside the motion controller, it will get current position 1000 first then calculate the difference from target position. It gets a result of +8000. So, the motion controller will send 8000 pulses to motor driver to move the position of 9000.
Sometimes, users need to install a linear scale or external encoder to check machine’s position. But how do you to build this coordinate system Δ If the resolution of external encoder is 10,000 pulses per 1mm and the motor will move 1mm if the motion con­troller send 1,000 pulses, It means that when we want to move 1 mm, we need to send 1,000 pulses to motor driver then we will get the encoder feedback value of 10,000 pulses. If we want to use an
Operations 43
absolute command to move a motor to 10,000 pulses position and current position read from encoder is 3500 pulses, how many pulses will it send to motor driver Δ The answer is (10000 – 3500 ) / (10,000 / 1,000)=650 pulses. The motion controller will calculate it automatically if users set “move ratio” already. The “move ratio” means the (feedback resolution/command resolution).

4.2.2 Absolute and Relative Position Move

In the coordinate system, we have two kinds command for users to locate the target position. One is absolute and the other is rela­tive. Absolute command means that user give the motion control­ler a position, then the motion controller will move a motor to that position from current position. Relative command means that user give the motion controller a distance, then the motion controller will move motor by the distance from current position. During the movement, users can specify the speed profile. It means user can define how fast and at what speed to reach the position.

4.2.3 Trapezoidal Speed Profile

Trapezodial speed profile means the acceleration/deceleration area follows a 1st order linear velocity profile (constant accelera­tion rate). The profile chart is shown as below:
Velocity
(pps)
StrVel
Tacc
44 Operations
MaxVel
Tdec
StrVel
Time (second)
PCI-8102
The area of the velocity profile represents the distance of this motion. Sometimes, the profile looks like a triangle because the desired distance from user is smaller than the area of given speed parameters. When this situation happens, the motion controller will lower the maximum velocity but keep the acceleration rate to meet user’s distance requirement. The chart of this situation is shown as below:
Velocity
(pps)
MaxVel
Tdec
StrVel
Time (second)
StrVel
Tacc
This kind of speed profile could be applied on velocity mode, posi­tion mode in one axis or multi-axes linear interpolation and two axes circular interpolation modes.
Operations 45

4.2.4 S-Curve and Bell-Curve Speed Profile

S-curve means the speed profile in accelerate/decelerate area fol­lows a 2nd order curve. It can reduce vibration at the beginning of motor start and stop. In order to speed up the acceleration/decel­eration during motion, we need to insert a linear part into these areas. We call this shape as “Bell” curve. It adds a linear curve between the upper side of s-curve and lower side of s-curve. This shape improves the speed of acceleration and also reduces the vibration of acceleration.
For a bell curve, we define its shape’s parameter as below:
Velocity
(PPS)
MaxVel
StrVel
X Tacc: Acceleration time in second
X Tdec: Deceleration time in second
X StrVel: Starting velocity in PPS
X MaxVel: Maximum velocity in PPS
X VSacc: S-curve part of a bell curve in deceleration in PPS
X VSdec: S-curve part of a bell curve in deceleration in PPS
VSacc
VSacc
Tacc Tdec
VSdec
VSdec
Time
(Second)
46 Operations
PCI-8102
If VSacc or VSdec=0, it means acceleration or deceleration use pure S-curve without linear part. The Acceleration chart of bell curve is shown below:
The S-curve profile motion functions are designed to always pro­duce smooth motion. If the time for acceleration parameters com­bined with the final position don’t allow an axis to reach the maximum velocity (i.e. the moving distance is too small to reach MaxVel), then the maximum velocity is automatically lowered (see the following Figure).
The rule is to lower the value of MaxVel and the Tacc, Tdec, VSacc, VSdec automatically, and keep StrVel, acceleration, and jerk unchanged. This is also applicable to Trapezoidal profile motion.
This kind of speed profile could be applied on velocity mode, posi­tion mode in one axis or multi-axes linear interpolation and two axes circular interpolation modes.
Operations 47

4.2.5 V elocity Mode

Veloctiy mode means the pulse command is continuously output until a stop command is issued. The motor will run without a target position or desired distance unless it is stopped by other reasons. The output pulse accelerates from a starting velocity to a specified maximum velocity. It can be follow a linear or S-curve acceleration shape. The pulse output rate is kept at maximum velocity until another velocity command is set or a stop command is issued. The velocity could be overridden by a new speed setting. Notice that the new speed could not be a reversed speed of original run­ning speed. The speed profile of this kind of motion is shown as below:

4.2.6 One Axis Position Mode

Position mode means the motion controller will output a specific amount of pulses which is equal to users’ desired position or dis­tance. The unit of distance or position is pulse internally on the motion controller. The minimum length of distance is one pulse. But in PCI-8102, we provide a floating point function for users to transform a physical length to pulses. Inside our software library, we will keep those distance less than one pulse in register and apply them to the next motion function. Besides positioning via pulse counts, our motion controller provides three types of speed profile to accomplish positioning. There are 1st order trapezoidal, 2nd order S-curve, and mixed bell curve. Users can call respective functions to perform that. The following char shows the relation­ship between distance and speed profile. We use trapezoidal shape to show it.
48 Operations
(pps)
StrVel
PCI-8102
Velocity
MaxVel
Distance
StrVel
Tacc
Tdec
Time (second)
The distance is the area of the V-t diagram of this profile.

4.2.7 Two Axes Linear Interpolation Position Mode

“Interpolation between multi-axes” means these axes start simul­taneously, and reach their ending points at the same time. Linear means the ratio of speed of every axis is a constant value. Assume that we run a motion from (0,0) to (10,4). The linear inter­polation results are shown as below.
Operations 49
The pulses output from X or Y axis remains 1/2 pulse difference according to a perfect linear line. The precision of linear interpola­tion is shown as below:
If users want to stop an interpolation group, just call a stop func­tion on first axis of the group.
As in the diagram below, 2-axis linear interpolation means to move the XY position from P0 to P1. The 2 axes start and stop simulta­neously, and the path is a straight line.
The speed ratio along X-axis and Y-axis is ( and the vector speed is:
When calling 2-axis linear interpolation functions, the vector speed needs to define the start velocity, StrVel, and maximum velocity, MaxVel.
ΔX: ΔY), respectively,

4.2.8 Two Axes Circular Interpolation Mode

Circular interpolation means XY axes simultaneously start from ini­tial point, (0,0) and stop at end point,(1800,600). The path
50 Operations
PCI-8102
between them is an arc, and the MaxVel is the tangential speed. Notice that if the end point of arc is not at a proper position, it will move circularly without stopping.
Y
(1800,600)
(0,0)
Center
(1000,0)
X
The motion controller will move to the final point user desired even this point is not on the path of arc. But if the final point is not at the location of the shadow area of the following graph, it will run circu­larly without stopping.
Operations 51
The command precision of circular interpolation is shown below. The precision range is at radius ±1/2 pulse.

4.2.9 Continuous Motion

Continuous motion means a series of motion command or position can be run continuously. Users can set a new command right after previous one without interrupting it. The motion controller can make it possible because there are three command buffers (pre­registers) inside.
When first command is executing, users can set second command into first buffer and third command into second buffer. Once the first command is finished, the motion controller will push the sec­ond command to the executing register and the third command to first buffer. Now, the second buffer is empty and user can set the 4th command into 2nd buffer. Normally, if users have enough time to set a new command into 2nd buffer before executing register is finished, the motion can run endlessly. The following diagram shows this architecture of continuous motion.
Besides position command, the speed command should be set correctly to perform a speed continuous profile. For the following example, there are three motion command of this continuous
52 Operations
PCI-8102
motion. The second one has high speed than the others. The interconnection of speed between these three motion functions should be set as the following diagram:
If the 2nd command’s speed value is lower than the others, the settings would be like as following diagram:
For 2-axis continuous arc interpolation is the same concept. User can set the speed matched between two command’s speed set­ting.
Operations 53
If the INP checking is enabled, the motion will have some delayed between each command in buffers. INP check enabled make the desired point be reached but reduce the smoothing between each command. If users don’t need this delay and meed the smoothing, please turn INP checking off.

4.2.10 Home Return Mode

Home return means searching a zero position point on the coordi­nate. Sometimes, users use a ORG, EZ or EL pin as a zero posi­tion on the coordinate. At the beginning of machine power on, the program needs to find a zero point of this machine. Our motion controller provides a home return mode to make it.
We have many home modes and each mode contents many con­trol phases. All of these phases are done by ASIC. No software efforts or CPU loading will be taken. After home return is finished, the target counter will be reset to zero at the desired condition of home mode. For example, a raising edge when ORG input. Some­times, the motion controller will still output pulses to make machine show down after resetting the counter. When the motor stops, the counter may not be at zero point but the home return
54 Operations
PCI-8102
procedure is finished. The counter value you see is a reference position from machine's zero point already.
The following figures show the various home modes: R means counter reset ( command and position counter ). E means ERC signal output.
Operations 55
Home mode=0: ( ORG Turn ON then reset counter )
Home mode=1: (Twice ORG turn ON then reset counter)
56 Operations
PCI-8102
Home mode=2: (ORG ON then Slow down to count EZ num­bers and reset counter)
Home mode=3: (ORG ON then count EZ numbers and reset counter)
Operations 57
Home mode=4: (ORG On then reverse to count EZ number and reset counter)
Home mode=5: (ORG On then reverse to count EZ number and reset counter, not using FA Speed)
58 Operations
PCI-8102
Home mode=6: (EL On then reverse to leave EL and reset counter)
Home mode=7: (EL On then reverse to count EZ number and reset counter)
Home mode=8: (EL On then reverse to count EZ number and reset counter, not using FA Speed)
Operations 59
Home mode=9: (ORG On then reverse to zero position, an extension from mode 0)
Home mode=10: (ORG On then counter EZ and reverse to zero position, an extension from mode 3)
60 Operations
PCI-8102
Home mode=11: (ORG On then reverse to counter EZ and reverse to zero position, an extension from mode 5)
Home mode=12: (EL On then reverse to count EZ number and reverse to zero position, an extension from mode 8)

4.2.11 Home Search Function

This mode is used to add auto searching function on normal home return mode described in previous section no matter which posi­tion the axis is. The following diagram is shown the example for home mode 2 via home search function. The ORG offset can’t be zero. Suggested value is the double length of ORG area.
Operations 61

4.2.12 Manual Pulser Function

Manual pulser is a device to generate pulse trains by hand. The pulses are sent to motion controller and re-directed to pulse output pins. The input pulses could be multiplied or divided before send­ing out.
The motion controller receives two kinds of pulse trains from man­ual pulser device: CW/CCW and AB phase. If the AB phase input mode is selected, the multiplier has additional selection of 1, 2, or
4.
The following figure shows pulser ratio block diagram.
62 Operations
PCI-8102

4.2.13 Simultaneous Start Function

Simultaneous motion means more than one axis can be started by a Simultaneous signal which could be external or internal signals. For external signal, users must set move parameters first for all axes then these axes will wait an extern start/stop command to start or stop. For internal signal, the start command could be from a software start function. Once it is issued, all axes which are in waiting synchronous mode will start at the same time.

4.2.14 Speed Override Function

Speed override means that users can change command’s speed during the operation of motion. The change parameter is a per­centage of original defined speed. Users can define a 100% speed value then change the speed by percentage of original speed when motion is running. If users didn’t define the 100% speed value. The default 100% speed is the latest motion command’s maximum speed. This function can be applied on any motion func­tion. If the running motion is S-curve or bell curve, the speed over­ride will be a pure s-curve. If the running motion is t-curve, the speed override will be a t-curve.
Operations 63

4.2.15 Position Override Function

Position override means that when users issue a positioning com­mand and want to change its target position during this operation. If the new target position is behind current position when override command is issued, the motor will slow down then reverse to new target position. If the new target position is far away from current position on the same direction, the motion will remain its speed and run to new target position. If the override timing is on the deceleration of current motion and the target position is far away from current position on the same direction, it will accelerate to original speed and run to new target position. The operation exam­ples are shown as below. Notice that if the new target position’s relative pulses are smaller than original slow down pulses, this function can’t work properly.
64 Operations
PCI-8102

4.3 Motor Driver Interface

We provide several dedicated I/Os which can be connected to motor driver directly and have their own functions. Motor drivers have many kinds of I/O pins for external motion controller to use. We classify them to two groups. One is pulse I/O signals including pulse command and encoder interface. The other is digital I/O sig­nals including servo ON, alarm, INP, servo ready, alarm reset and emergency stop inputs. The following sections will describe the functions these I/O pins.

4.3.1 Pulse Command Output Interface

The motion controller uses pulse command to control servo/step­per motors via motor drivers. Please set the drivers to position mode which can accept pulse trains as position command. The pulse command consists of two signal pairs. It is defined as OUT and DIR pins on connector. Each signal has two pins as a pair for differential output. There are two signal modes for pulse output command: (1) single pulse output mode (OUT/DIR), and (2) dual pulse output mode (CW/CCW type pulse output). The mode must
Operations 65
be the same as motor driver. The modes vs. signal type of OUT and DIR pins are listed in the table below:
Mode
Dual pulse output (CW/CCW)
Single pulse output (OUT/DIR) Pulse signal
Output of OUT
pin
Pulse signal in
plus (or CW)
direction
Output of DIR
pin
Pulse signal in
minus (or CCW)
direction
Direction signal
(level)
Single Pulse Output Mode (OUT/DIR Mode)
In this mode, the OUT pin is for outputing command pulse chain. The numbers of OUT pulse represent distance in pulse. The fre­quency of the OUT pulse represents speed in pulse per second. The DIR signal represents command direction of positive (+) or negative (-). The diagrams below show the output waveform. It is possible to set the polarity of the pulse chain.
66 Operations
PCI-8102
Dual Pulse Output Mode (CW/CCW Mode)
In this mode, the waveform of the OUT and DIR pins represent CW (clockwise) and CCW (counter clockwise) pulse output respectively. The numbers of pulse represent distance in pulse. The frequency of the pulse represents speed in pulse per sec­ond. Pulses output from the CW pin makes the motor move in positive direction, whereas pulse output from the CCW pin makes the motor move in negative direction. The following dia-
Operations 67
gram shows the output waveform of positive (+) commands and negative (-) commands.
The command pulses are counted by a 28-bit command counter. The command counter can store a value of total pulses outputting from controller.

4.3.2 Pulse Feedback Input Interface

Our motion controller provides one 28-bit up/down counter of each axis for pulse feedback counting. This counter is called position counter. The position counter counts pulses from the EA and EB signal which have plus and minus pins on connector for differential signal inputs. It accepts two kinds of pulse types. One is dual pulses input (CW/CCW mode) and the other is AB phase input. The AB phase input can be multiplied by 1, 2 or 4. Multiply by 4 AB phase mode is the most commonly used in incremental encoder inputs.
For example, if a rotary encoder has 2000 pulses per rotation, then the counter value read from the position counter will be 8000 pulses per rotation when the AB phase is multiplied by four.
If users don’t use encoder for motion controller, the feedback source for this counter must be set as pulse command output or the counter value will always be zero. If it is set as pulse command output, users can get the position counter value from pulse com-
68 Operations
PCI-8102
mand output counter because the feedback pulses are internal counted from command output pulses.
The following diagrams show these two types of pulse feedback signal.
The pattern of pulses in this mode is the same as the Dual Pulse Output Mode in the Pulse Command Output section except that the input pins are EA and EB.
In this mode, pulses from EA pin cause the counter to count up, whereas EB pin caused the counter to count down.
90° phase difference signals Input Mode (AB phase Mode)
In this mode, the EA signal is a 90° phase leading or lagging in comparison with the EB signal. “Lead” or “lag” of phase difference between two signals is caused by the turning direction of the motor. The up/down counter counts up when the phase of EA sig­nal leads the phase of EB signal.
The following diagram shows the waveform.
The index input (EZ) signal is as the zero reference in linear or rotary encoder. The EZ can be used to define the mechanical zero
Operations 69
position of the mechanism. The logic of signal must also be set correctly to get correct result.

4.3.3 In Position Signal

The in-position signal is an output signal from motor driver. It tells motion controllers a motor has been reached a position within a predefined error. The predefined error value is in-position value. Most motor drivers call it as INP value. After motion controller issues a positioning command, the motion busy status will keep true until the INP signal is ON. Users can disable INP check for motion busy flag. If it is disabled, the motion busy wll be FALSE when the pulses command is all sent.

4.3.4 Servo Alarm Signal

The alarm signal is an output signal from motor driver. It tells motion controller that there has something error inside servo motor or driver. Once the motion controller receives this signal, the pulses command will stop sending and the status of ALM signal will be ON. The reasons of alarm could be servo motor’s over speed, over current, over loaded and so on. Please check motor driver’s manual about the details.
The logic of alarm signal must be set correctly. If the alarm logic’s setting is not the same as motor driver’s setting, the ALM status
70 Operations
PCI-8102
will be always ON and the pulse command can never be output­ted.

4.3.5 Error Clear Signal

The ERC signal is an output from the motion controller. It tells motor driver to clear the error counter. The error counter is counted from the difference of command pulses and feedback pulses. The feedback position will always have a delay from the command position. It results in pulse differences between these two positions at any moment. The differences are shown in error counter. Motor driver uses the error counter as a basic control index. The large the error counter value is, the faster the motor speed command will be set. If the error counter is zero, it means that zero motor speed command will be set.
At following four situations, the ERC signal will be outputted auto­matically from motion controller to motor driver in order to clear error counter at the same time.
1. Home return is complete
2. The end-limit switch is touched
3. An alarm signal is active
4. An emergency stop command is issued

4.3.6 Servo ON/OFF Switch

The servo on/off switch is a general digital output signal on motion controller. We define it as SVON pin on the connector. It can be used for switching motor driver’s controlling state. Once it is turned on, the motor will be held because the control loop of driver is active. Be careful that when the axis is vertically installed and the servo signal is turned off, the axis will be in uncontrolled state. Some situations like servo alarm and emergency signal ON will result in the same trouble.

4.3.7 Servo Ready Signal

The servo ready signal is a general digital input on motion control­ler. It has no relative purpose to motion controller. Users can con­nect this signal to motor driver’s RDY signal to check if the motor
Operations 71
driver is in ready state. It lets users to check something like the motor driver’s power has been input or not. Or users can connect this pin as a general input for other purpose. It doesn’t affect motion control.

4.3.8 Servo Alarm Reset Switch

The servo driver will raise an alarm signal if there is something wrong inside the servo driver. Some alarm situations like servo motor over current, over speed, over loading and so on. Power reset can clear the alarm status but users usually don’t want to power off the servo motor when operating. There is one pin from servo driver for users to reset the alarm status.Our motion control­ler provides one general output pin for each axis. Users can use this pin for resetting servo alarm status.

4.4 Mechanical Switch Interface

We provide some dedicated input pins for mechanical switches like original switch (ORG), plus and minus end-limit switch ( slow down switch (SD), positioning start switch (PCS), counter
latch switch (LTC), emergency stop input (EMG) and counter clear switch (CLR). These switches’ response time is very short, only a few ASIC clock times. There is no real-time problem when using these signals. All functions are done by motion ASIC. The soft­ware can just do nothing and only need to wait the results.
±EL),

4.4.1 Original or Home Signal

Our controller provides one original or home signal for each axis. This signal is used for defining zero position of this axis. The logic of this signal must be set properly before doing home procedure. Please refer to home mode section for details.

4.4.2 End-Limit Switch Signal

The end-limit switches are usually installed on both ending sides of one axis. We must install plus EL at the positive position of the axis and minus EL at the negative position of the axis. These two signals are for safety reason. If they are installed reversely, the protection will be invalid. Once the motor’s moving part touches
72 Operations
PCI-8102
one of the end-limit signal, the motion controller will stop sending pulses and output an ERC signal. It can prevent machine crash when miss operation.

4.4.3 Slow Down Switch

The slow down signals are used to force the command pulse to decelerate to the starting velocity when it is active. This signal is used to protect a mechanical moving part under high speed move­ment toward the mechanism’s limit. The SD signal is effective for both plus and minus directions.

4.4.4 Positioning Start switch

The positioning start switch is used to move a specific position when it is turned on. The function is shown as below.

4.4.5 Counter Clear switch

The counter clear switch is an input signal which makes the coun­ters of motion controller to reset. If users need to reset a counter according to external command, use this pin as controlling source.

4.4.6 Counter Latch Switch

The counter latch switch is an input signal which makes counter value to be kept into a register when this input active. If users need to know counter value at the active moment of one input, they can connect this pin to catch that.
Operations 73

4.4.7 Emergency Stop Input

Our motion controller provides a global digital input for emergency situation. Once the input is turned on, our motion controller will stop all axes’ motion immediately to prevent machine’s damage. Usually, users can connect an emergency stop button to this input on their machine. We suggest this input as normal closed type for safety.
74 Operations
PCI-8102

4.5 Counters

There are four counters for each axis of this motion controller. They are described in this section.
Command position counter: counts the number of output pulses
Feedback position counter: counts the number of input pulses
Position error counter: counts the error between command and feedback pulse numbers.
General purpose counter: The source can be configured as com­mand position, feedback position, manual pulser, or half of ASIC clock.
Target position recorder: A software-maintained target position value of latest motion command.

4.5.1 Command Position Counter

The command position counter is a 28-bit binary up/down counter. Its input source is the output pulses from the motion controller. It provides the information of the current command position. It is useful for debugging the motion system.
Our motion system is an open loop type. The motor driver receives pulses from motion controller and drive the motor to move. When the driver is not moving, we can check this command counter and see if there is an update value on it. If it is, it means that the pulses have seen sent and the problem could be on the motor driver. Try to check motor driver’s pulse receiving counter when this situation is happened.
The unit of command counter is in pulse. The counter value could be reset by a counter clear signal or home function completion. Users can also use a software command counter setting function to reset it.

4.5.2 Feedback Position Counter

The feedback position counter is a 28-bit binary up/down counter. Its input source is the input pulses from the EA/EB pins. It counts the motor position from motor’s encoder output. This counter
Operations 75
could be set from a source of command position for an option when no external encoder inputs.
The command output pulses and feedback input pulses will not always be the same ratio in mini-meters. Users must set the ratio if these two pulses are not 1:1.
Because our motion controller is not a closed-loop type, the feed­back position counter is just for reference after motion is moving. The position closed-loop is done by servo motor driver. If the servo driver is well tuned and the mechanical parts are well assembled, the total position error will remain in acceptable range after motion command is finished.

4.5.3 Command and Feedback Error Counter

The command and feedback error counter is used to calculate the error between the command position and the feedback position. The value is calculated from command subtracting feedback posi­tion.
If the ratio between command and feedback is not 1:1, the error counter is meaningless.
This counter is a 16-bit binary up/down counter.

4.5.4 General Purpose Counter

The source of general purpose counter could be any of the follow­ing:
1. Command position output – the same as a command position counter
2. Feedback position input – the same as a feedback posi­tion counter
3. Manual Pulser input – Default setting
4. Clock Ticks – Counter from a timer about 9.8 MHz

4.5.5 Target Position Recorder

The target position recorder is used for providing target position information. It is used in continuous motion because motion con­troller need to know the previous motion command’s target posi-
76 Operations
PCI-8102
tion and current motion command’s target position in order to calculate relative pulses of current command then send results into pre-register. Please check if the target position is the same with current command position before continuous motion. Espe­cially after the home function and stop function.

4.6 Comparators

There are 5 counter comparators of each axis. Each comparator has dedicated functions. They are:
1. Positive soft end-limit comparator to command counter
2. Negative soft end-limit comparator to command counter
3. Command and feedback error counter comparator
4. General comparator for all counters
5. Trigger comparator for all command and feedback coun-
ters

4.6.1 Soft End-Limit Comparators

There are two comparators for end-limit function of each axis. We call them for the soft end-limit comparators. One is for plus or pos­itive end-limit and the other is for minus or negative end-limit. The end-limit is to prevent machine crash when over traveling. We can use the soft limit instead of a real end-limit switch. Notice that these two comparators only compare the command position coun­ter. Once the command position is over the limited set inside the positive or negative comparators, it will stop moving as it touches the end-limit switch.
4.6.2 Command and Feedback Error Counter Compara-
tors
This comparator is only for command and feedback counter error. Users can use this comparator to check if the error is too big. It can be set a action when this condition is met. The actions include generating interrupt, immediately stop, and deceleration to stop.
Operations 77

4.6.3 General Comparator

The general comparator let users to choose the source to com­pare. It could be chosen from command, feedback position coun­ter, error counter or general counter. The compare methods could be chosen by equal, greater than or less than with directional or directionless. Also the action when condition is met can be chosen from generating interrupt, stop motion or others.

4.6.4 Trigger Comparator

The trigger comparator is much like general comparator. It has an additional function, generating a trigger pulse when condition is met. Once the condition is met, the CMP pin on the connector will output a pulse for specific purpose like triggering a camera to catch picture. Not all of axes have this function. It depends on the existence of CMP pin of the axis. The following diagram shows the application of triggering.
v
v
1 2 3 4 5 6
1 2 3 4 5 6
t
t
CCD
CCD
Camera
Camera
Trigger Output
In this application, the table is controlled by the motion command, and the CCD Camera is controlled by CMP pin. When the compar­ing position is reached, the pulse will be outputted and the image is captured. This is an on-the-fly image capture. If users want to get more images during the motion path, try to set a new compar-
78 Operations
PCI-8102
ing point right after previous image is captured. It can achieve con­tinuous image capturing by this method.

4.7 Other Motion Functions

We provide many other functions on the motion controller. Such as backlash compensation, slip correction, vibration restriction, speed profile calculation and so on. The following sections will describe these functions.

4.7.1 Backlash Compensation and Slip Corrections

The motion controller has backlash and slip correction functions. These functions output the number of command pulses in FA speed. The backlash compensation is performed each time when the direction changes on operation. The slip correction function is performed before a motion command, regardless of the direction. The correction amount of pulses can be set by function library.

4.7.2 Vibration Restriction Function

The method of vibration restriction of the motion controller is by adding one pulse of reverse direction and then one pulse of for­ward direction shortly after completing a motion command. The timing of these two dummy pulses are shown below: (RT indicates reverse time and FT forward time)
Operations 79

4.7.3 Speed Profile Calculation Function

Our motion function needs several speed parameters from users. Some parameters are conflict in speed profile. For example, if users input a very fast speed profile and a very short distance to motion function, the speed profile is not exist for these parame­ters. At this situation, motion library will keep the acceleration and deceleration rate. It tries to lower the maximum speed from users automatically to reform a speed profile feasible. The following dia­gram shows this concept.
Distance insufficient
Our motion library has a series of functions to know the actual speed profile of the command from users.
80 Operations
PCI-8102

4.8 Interrupt Control

The motion controller can generate an interrupt signal to the host PC. It is much useful for event-driven software application. Users can use this function _8102_int_control() to enable ir disable the interrupt service.
There are three kinds of interrupt sources on PCI-8102. One is motion interrupt source and the other is error interrupt source and another is GPIO interrupt sources. Motion and GPIO interrupt sources can be maskable but error interrupt sources can’t. Motion interrupt sources can be maskable by _8102_set_motion_int_factor(). Its mask bits are shown as follow­ing table:
Motion Interrupt Source Bit Settings
Bit Description
0 Normally Stop
1 Next command in buffer starts
Command pre-register 2 is empty and allow new command to
2
30
4 Acceleration Start
5 Acceleration End
6 Deceleration Start
7 Deceleration End
8 +Soft limit or comparator 1 is ON
9 -Soft limit or comparator 2 is ON
10 Error comparator or comparator 3 is ON
11 General comparator or comparator 4 is ON
12 Trigger comparator or comparator 5 is ON
13 Counter is reset by CLR input
14 Counter is latched by LTC input
15 Counter is latched by ORG Input
16 SD input turns on
17 0
18 0
write
Operations 81
Bit Description
19 CSTA input or _8102_start_move_all() turns on
20~31 0
The error interrupt sources are non-maskable but the error num­ber of situation could be get from _8102_wait_error_interrupt()’s return code if it is not timeout.
Error Interrupt return codes
Value Description
0 +Soft Limit is ON and axis is stopped
1 -Soft Limit is ON and axis is stopped
2 Comparator 3 is ON and axis is stopped
3 General Comparator or comparator 4 is ON and axis is stopped
4 Trigger Comparator or comparator 5 is ON and axis is stopped
5 +End Limit is on and axis is stopped
6 -End Limit is on and axis is stopped
7 ALM is happened and axis is stop
8 CSTP is ON or _8102_stop_move_all is on and axis is stopped
9 CEMG is on and axis is stopped
10 SD input is on and axis is slowed down to stop
11 0
12 Interpolation operation error and stop
13 axis is stopped from other axis’s error stop
14 Pulse input buffer overflow and stop
15 Interpolation counter overflow
16 Encoder input signal error but axis is not stopped
17 Pulse input signal error but axis is not stopped
11~ 3 1 0
The GPIO interrupt sources are maskable. The mask bits table is shown below:
82 Operations
GPIO Interrupt Source Bit Settings (1=Enable,0=Disable)
Bit Description
0 DI0 falling edge
1 DI1 falling edge
2 DI2 falling edge
3 DI3 falling edge
4 DI0 raising edge
5 DI1 raising edge
6 DI2 raising edge
7 DI3 raising edge
8 Pin23 input interrupt
9 Pin57 input interrupt
10 Pin23/57 interrupt mode selection (0=falling, 1=raising)
11~ 14 0
15 GPIO interrupt switch (Always=1)
The steps for using interrupts:
1. Use _8102_int_control(CARD_ID, Enable=1/Disable=0);
2. Set interrupt sources for Event or GPIO interrupts.
3. _8102_set_motion_int_facor(AXIS0, 0x01); // Axis0 nor-
mally stop
PCI-8102
4. _8102_set_gpio_int_factor(CARD0, 0x01); // DI0 falling
edge
5. _8102_wait_motion_interrupt(AXIS0, 0x01, 1000) // Wait
1000ms for normally stop interrupt
6. _8102_wait_gpio_interrupt(CARD0, 0x01, 1000) // Wait
1000ms for DI0 falling edge interrupt
7. I16 ErrNo=_8102_wait_error_interrupt(AXIS0, 2000); //
Wait 2000ms for error interrupts
Operations 83

4.9 Multiple Card Operation

The motion controller allows more than one card in one system. Since the motion controller is plug-and-play compatible, the base address and IRQ setting of the card are automatically assigned by the PCI BIOS at the beginning of system booting. Users don’t need and can’t change the resource settings.
When multiple cards are applied to a system, the number of card must be noted. The card number depends on the card ID switch setting on the board. The axis number is depends on the card ID. For example, if three motion controller cards are plugged in to PCI slots, and the corresponding card ID is set, then the axis number on each card will be:
card_id.
0
1
2
X0X
Physical
Axis
00
11
02
13
04
15
Axis No
Notice that if there has the same card ID on multiple cards, the function will not work correctly.
84 Operations

5 MotionCreatorPro

After installing the hardware (Chapters 2 and 3), it is necessary to correctly configure all cards and double check the system before running. This chapter gives guidelines for establishing a control system and manually testing the PCI-8102 cards to verify correct operation. The MotionCreatorPro software provides a simple yet powerful means to setup, configure, test, and debug a motion con­trol system that uses PCI-8102 cards.
Note that MotionCreatorPro is only available for Windows 2000/ XP/7 with a screen resolution higher than 1024x768. It does not run under a DOS environment.

5.1 Execute MotionCreatorPro

After installing the software drivers for the 8102 in Windows 2000/ XP/7, the MotionCreatorPro program can be located at <chosen path >\PCI-Motion\MotionCreatorPro. To execute the program, double click on the executable file or use Start>Program Files>PCI-Motion>MotionCreatorPro.

5.2 About MotionCreatorPro

PCI-8102
Before Running MotionCreatorPro, the following issues should be kept in mind.
1. MotionCreatorPro is a program written in VB.NET 2003,
and is available only for Windows 2000/XP/7 with a screen resolution higher than 1024x768. It cannot be run under DOS.
2. MotionCreatorPro allows users to save settings and con-
figurations for PCI-8102 cards. Saved configurations will be automatically loaded the next time MotionCreatorPro is executed. Two files, 8102.ini and 8102MC.ini, in the
MotionCreatorPro 85
windows root directory are used to save all settings and configurations.
3. To duplicate configurations from one system to another, copy 8102.ini and 8102MC.ini into the windows root directory.
4. If multiple PCI-8102 cards use the same MotionCreator­Pro saved configuration files, the DLL function call _8102_config_from_file() can be invoked within a user developed program. This function is available in a DOS environment as well.
86 MotionCreatorPro
PCI-8102

5.3 MotionCreatorPro Form Introduction

5.3.1 Main Menu

The main menu appears after running MotionCreatorPro. It is used to:
MotionCreatorPro 87

5.3.2 Select Menu

The select menu appears after running MotionCreatorPro. It is used to:
88 MotionCreatorPro

5.3.3 Card Information Menu

In this menu, it show some Information about this card.
PCI-8102
MotionCreatorPro 89
Loading...