8-ch 24-bit 192 ks/s
dynamic signal acquisition module (46 pages)
Summary of Contents for ADLINK Technology MPC-8164
Page 1
PCI-8164/MPC-8164/PXI-8164 Advanced 4-Axis Servo/Stepper Motion Control Card User’s Manual Manual Rev. 2.00 Revision Date: August 25, 2006 Part No: 50-11124-1050 Advance Technologies; Automate the World.
Page 2
Copyright 2006 ADLINK TECHNOLOGY INC. All Rights Reserved. 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.
Page 3
Getting service from ADLINK Customer satisfaction is top priority for ADLINK TECHNOLOGY INC. Please contact us should you require any service or assis- tance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City,...
Page 6
(PCI-8164 only)............57 3.15 General Purpose TTL Output (PCI-8164 only) ....59 3.16 Termination board.............. 60 3.17 General Purpose DIO (MPC-8164/PXI-8164 only) .... 61 Isolated input channels ..........62 Isolated output channels ..........62 Example of input connection ......... 63 Example of output connections ........
Page 7
S-curve profile motion ........... 75 Linear interpolation for 2-4 axes ........77 Circular interpolation for 2 axes ........82 Circular interpolation with Acc/Dec time ....... 84 Relationship between velocity and acceleration time ... 85 Continuous motion ............88 Home Return Mode ............95 Home Search Mode ............
Page 8
6.17 Continuous motion ............249 6.18 Multiple Axes Simultaneous Operation ......251 6.19 General-purposed TTL output (PCI-8164 Only)....257 6.20 General-purposed DIO (MPC-8164/PXI-8164 only) ..259 6.21 Card ID (PXI-8164 Only)..........261 6.22 PXI Trigger Bus (PXI-8164 Only)........262 7 Connection Example ............265 General Wiring Description ..........
Page 9
PIN Assignment: ............286 Wiring with DIN-814M-J3A ..........288 PIN Assignment: ............289 Wiring with DIN-814Y ............292 PIN Assignment: ............293 8 Appendix ................. 295 Color code of CN3 Cable (MPC-8164 Only)....295 Warranty Policy..............297 Table of Contents...
Introduction The PCI-/MPC-/PXI-8164 is an advanced 4-axis motion controller card that generates high frequency pulses (6.55 MHz) to drive stepper or servomotors, and provides a 2-axis circular interpola- tion, 4-axis linear interpolation, or continuous interpolation for con- tinual velocity. The PCI-/MPC-/PXI-8164 also changes position and/or speed on the fly with a single axis operation.
The MPC-8164 is an advanced 4-axis motion controller card with a PC104 interface. All features and specification are leveraged with the PCI-8164, except for some differences in the user I/O interfaces. Figure 1-2 shows the MPC-8164 card block diagram. Figure 1-2: MPC-8164 block diagram...
The PXI-8164 is an advanced 4-axis motion controller card with a PXI interface. All features and specification are the same with the PCI-8164, except for some differences in the user I/O interfaces. Figure 1-3 shows the PXI-8164 the block diagram. Figure 1-3: PXI-8164 block diagram Introduction...
Motion Creator is a Windows-based application development soft- ware package that comes with the card. Motion Creator 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 the card’s I/O signal status.
1.1 Features 1.1.1 PCI-8164 32-bit PCI bus, Plug and Play 4 axes of step and direction pulse output for controlling stepping or servomotor 6.55 MPPS maximum output frequency OUT/DIR, CW/CCW pulse output options Programmable acceleration and deceleration time for all modes Trapezoidal and S-curve velocity profiles for all modes Any 2 of 4 axes circular interpolation...
Page 19
Includes Motion Creator, a Microsoft Windows-based appli- cation development software ® Libraries and utilities support DOS, Windows 9X/NT/2000/ XP, and Linux Introduction...
8 channels of general purpose photo-isolated digital inputs 8 channels of general purpose open collector digital outputs Software supports a maximum of up to 4 MPC-8164 cards (16 axes) operation in one system Includes Motion Creator, a Microsoft Windows-based appli- cation development software ®...
1.1.3 PXI-8164 PXI specifications Rev. 2.0-compliant Multiple modules synchronized via PXI trigger bus 3U Eurocard form factor, CompactPCI compliant (PICMG 2.0 R2.1) 4-CH isolated digital I/O 4 axes of step and direction pulse output for controlling stepping or servomotor 6.55 MPPS maximum output frequency OUT/DIR, CW/CCW pulse output options Programmable acceleration and deceleration time for all modes...
Page 22
Includes Motion Creator, a Microsoft Windows-based appli- cation development software ® Libraries and utilities DOS, Windows 9x/NT/2000/XP, and Linux Introduction...
1.2 Specifications Applicable motors Stepping motors AC or DC servomotors with pulse train input servo drivers Performance 4 controllable axes 6.55MPPS maximum pulse output frequency, linear, trape- zoidal, or S-Curve velocity profile drive 19.66 MHz internal reference clock 28-bit up/down counter range: 0 to 268,435,455 or –134,217,728 to +134,217,727 Position pulse setting range (28-bit): -134,217,728 to +134,217,728...
STA and STP (PCI-8164/PXI-8164) simultaneous start/stop signal General-purpose output 6 TTL level digital outputs (PCI-8164 only) 8 digital inputs/8 digital outputs (MPC-8164 only) 4 digital inputs/4 digital outputs (PXI-8164 only) General specifications 100-pin SCSI-type connector Operating temperature: 0ºC - 50ºC Storage temperature: -20ºC - 80ºC...
Page 25
Dimensions PCI-8164: 185 mm (L) X 106.68 mm (W) MPC-8164: 152 mm (L) X 104.7 mm (W) PXI-8164: 3U Eurocard form factor, CompactPCI-compliant (PICMG 2.0 R2.1) Introduction...
3.1) and DLLs for Windows 95/98/NT/2000/XP come bundled with the PCI-8164/PXI-8164 card package. Support for Linux- based systems is also included. ® ® MPC-8164 supports DOS/Windows 98/NT/2000/XP, Windows ® XP/NT Embedded, Windows CE, and Linux. 1.3.2 Motion Creator This Windows-based utility sets up cards, motors, and systems. It...
Installation Follow these steps to install the PCI-/MPC-/PXI-8164 card. Check the card package contents (section 2.1) Check the card PCB and face plate/front panel layout (sec- tion 2.2) Install the card to the chassis (section 2.3) Install the drivers (section 2.4) Refer to the I/O signal connections (chapter 3) and their operation (chapter 4) Refer to the connector pin assignments (the remaining sec-...
2.1 Package contents Check the package contents for the following items: PCI-8164/MPC-8164/PXI-8164 card ADLINK All-in-one CD +24V power input cable (for CN1) accessories (PCI-8164 only) Optional terminal board for wiring purposes If any of these items are missing or damaged, contact your dealer immediately.
2.4 PXI-8164 layout Figure 2-5: PXI-8164 layout and front panel Switch setting for EL logic Card ID setting from 0-11 4-CH isolated digital Input/output 4-axis pulser input interface Installation...
2.5 PCI-8164/PXI-8164 hardware installation 2.5.1 Hardware configuration Since the PCI-8164/PXI-8164 card is Plug and Play, the memory allocation (I/O port locations) and the IRQ channel are automati- cally assigned by the system BIOS. The address assignment is done on a board-by-board basis for all PCI cards installed in the system.
Installation notes If your system doesn’t boot or if you experience erratic opera- tion 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.
2.6 MPC-8164 hardware installation 2.6.1 Hardware configuration The MPC-8164 card is PC104-compliant. The onboard DIP switches and jumpers assign the card’s I/O port locations and IRQ channels. A single-board setup has a default setting of 0x200 and IRQ5. In GEME systems, the default value varies depending on the location of the card.
Page 35
IRQ setting The JP1 setting assigns the IRQ channel. Installation note Make sure that the system has an aqvailable I/O address and IRQ channel for the card. If there are none available, adjust the card I/O address and IRQ channel to empty. Installation...
2. When the Autorun screen appears, select Driver Instal- lation > Motion Control > MPC-8164. 3. Launch the MPC-8164 Add/Remove utililty from the Start menu or installed directory to register the new card. The I/O address and IRQ channel must be the same with the settings on the board.
DC/DC is limited. DO NOT use this to drive several devices simultaneously, especially stepper mo- tors or external encoders. NOTE MPC-8164 and PXI-8164 do not have the CN1 for power input. Use the E_24V and EGND pins of CN2. L is an in- ductor for EMI use. Installation...
2.9 CN3 pin assignments: Manual Pulse Input (PCI-8164 only) CN3 is for the manual pulse input. No. Name Function (Axis) DGND Bus power ground Pulser B-phase signal input, Pulser A-phase signal input, Pulser B-phase signal input, Pulser A-phase signal input, Bus power, +5V DGND Bus power ground...
2.11 CN3 pin assignments: General Purpose DIO (MPC-8164 only) Pin No Signal Name Pin No Signal Name DOCOM DOCOM DOCOM DOCOM DICOM DICOM DICOM DICOM Installation...
2.12 J3 pin assignments: Isolated DIO (PXI-8164 only) No. Name Function Name Function DICOM Digital In Common DOCOM Digital Out Common Input Channel 0 Output Channel 0 Input Channel 1 Output Channel 1 DICOM Digital In Common DOCOM Digital Out Common Input Channel 2 Output Channel 2 Input Channel 3...
2.13 CN2 pin assignments: Main Connector CN2 is the major connector for the motion control I/O signals. Name Function (axis / ) Name Function (axis / ) +5V power supply output +5V power supply output EGND Ext. power ground EGND Ext.
Page 43
SD/PCS1 Ramp-down signal SD/PCS3 Ramp-down signal ORG1 Origin signal, ORG3 Origin signal, EGND Ext. power ground EGND Ext. power ground PEL2 End limit signal (+), PEL4 End limit signal (+), MEL2 End limit signal (-), MEL4 End limit signal (-), CMP2 Position compare output LTC4...
2.14 CN4 pin assignments: Simultaneous Start/Stop (PCI-8164 only) CN4 is for simultaneous start/stop signals for multiple axes or mul- tiple cards. No. Name Function (Axis) DGND Bus power ground Simultaneous stop signal input/output Simultaneous start signal input/output Simultaneous stop signal input/output Simultaneous start signal input/output Bus power output, +5V Note: +5V and GND pins are provided by the PCI Bus power.
2.15 CN5 pin assignment: TTL Output (PCI-8164 only) CN5 is for general-purposed TTL output signals. Pin No. Name Function DGND Digital ground DGND Digital ground Digital Output 0 Digital Output 1 Digital Output 2 Digital Output 3 Digital Output 4 Digital Output 5 VCC +5V N.C.
2.16 Jumper setting for pulse output (PCI-8164 only) J1 - J8 sets the type of pulse output signals (DIR and OUT). The output signal type may either be differential line driver or open col- lector output. Refer to section 3.1 for detailed jumper settings. The default setting is differential line driver mode.
OFF is the “normally closed” position (or “B” contact type). For safety reasons, you must set a type that will make the end- limit active when it is broken or disconnected. NOTE MPC-8164 uses a software function for this setting. Installation...
2.18 CN3 pin assignment: General Purpose DI/DO ports (MPC-8164 only) CN3 Pin No Signal Name CN3 Pin No Signal Name DOCOM DOCOM DOCOM DOCOM DICOM DICOM DICOM DICOM Installation...
2.19 S2 card ID switch setting (PXI-8164 only) Card ID Switch Setting (ON=1) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 NOTE Other settings are invalid. In order to enable this function, see section 6.21. Installation...
Signal Connections This chapter describes the signal connections of the card I/Os. Refer to the contents of this chapter before wiring any cables between the card and any motor drivers. This chapter contains the following sections: Section 3.1 Pulse Output Signals OUT and DIR Section 3.2 Encoder Feedback Signals EA, EB and EZ Section 3.3...
3.1 Pulse Output Signals OUT and DIR The PCI-/MPC-/PXI-8164 has 4 axis pulse output signals. Each axis has two pairs of OUT and DIR signals to transmit the pulse train and to indicate the direction. The OUT and DIR signals may also be programmed as CW and CCW signal pairs.
Page 53
For differential line driver For open collector out- Output Signal output, close breaks put, close breaks between 1 and 2 of: between 2 and 3 of: OUT1- DIR1- OUT2- DIR2- OUT3- DIR3- OUT4- DIR4- By default, the OUT and DIR are set to differential line driver mode.
Page 54
MPC-8164/PXI-8164 Non-differential type wiring example (MPC-8164/PXI-8164, or PCI-8164 when pin 2-3 of the jumper is shorted) Choose one of OUT/DIR+ and OUT/DIR- to connect to the driver’s OUT/DIR. WARNING The sink current must not exceed 20 mA to prevent dam-...
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.
Page 56
over driving the source. The differential signal pairs are converted to digital signals EA, EB, and EZ, then feed to the PCL6045 ASIC. Below are examples of input signal connection with an external circuit. The input circuit may be connected to an encoder or motor driver if it is equipped with a differential line driver or an open col- lector output.
Page 57
For more operation information on the encoder feedback signals, refer to section 4.4. Signal Connections...
3.3 Origin Signal ORG The origin signals (ORG1-ORG4) are used as input signals for the origin of the mechanism. The table below lists signal names, pin numbers, and axis numbers. CN2 Pin No Signal Name Axis # ORG1 ORG2 ORG3 ORG4 The input circuit of the ORG signals is shown below.
3.4 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.
3.5 Ramping-down and PCS There is a SD/PCS signal for each of the 4 axes. The signal names, pin numbers, and axis numbers are shown in the table below. CN2 Pin No Signal Name Axis # SD1/PCS1 SD2/PCS2 SD3/PCS3 SD4/PCS4 A circuit diagram is shown below.
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. CN2 Pin No Signal Name Axis # INP1 INP2...
3.7 Alarm Signal ALM The alarm signal ALM indicates the alarm status from the servo driver. The signal names, pin numbers, and axis numbers are shown in the table below. CN2 Pin No Signal Name Axis # ALM1 ALM2 ALM3 ALM4 The input alarm circuit diagram is provided.
3.8 Deviation Counter Clear Signal ERC The deviation counter clear signal (ERC) is active for the following 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) The signal names, pin numbers, and axis numbers are shown in the table below.
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 in the following table. CN2 Pin No Signal Name Axis # SVON1 SVON2 SVON3...
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 in the table below. CN2 Pin No Signal Name Axis # RDY1 RDY2 RDY3...
3.11 Position compare output pin: CMP The card provides 2 comparison output channels: CMP1 and CMP2, used by the first 2 axes, 1 and 2. The comparison output channel generates a pulse signal when the encoder counter reaches a pre-set value set by the user. The CMP channel is located on CN2.
3.12 Position latch input pin: LTC The card provides 2 position latch input channels: LTC3 and LTC4, used by the last 2 axes, 3 and 4. The LTC signal triggers the counter-value-capturing functions, which provides a precise posi- tion determination. The LTC channel is on CN2.
3.13 Pulser Input Signals PA and PB (PCI-8164 only) The PCI-8164 accepts input pulser signals through the CN3 pins listed below. The pulses behave like an encoder. The signals gen- erate the positioning information that guides the motor. CN3 Pin No Signal Name Axis # CN3 Pin No Signal Name Axis # The CN3 PA and PB pins are directly connected to PA and PB pins of the PCL6045.
3.14 Simultaneously Start/Stop Signals STA and STP (PCI-8164 only) The PCI-8164 provides STA and STP signals that enable simulta- neous start/stop of motions on multiple axes. The STA and STP signals are located on CN4. The diagram below shows the tied STA and STP signals of the four axes.
3.15 General Purpose TTL Output (PCI-8164 only) The PCI-8164 provides six general purpose TTL digital outputs. The TTL output is located on CN5. The signal names, pin num- bers, and axis numbers are listed below. Pin No. Name Function DGND Digital ground DGND Digital ground...
3.16 Termination board The card’s CN2 can be connected with a DIN-100M15, including the ACL-102100 — a 100-pin SCSI-II cable. The DIN-100M15 is a general purpose 100-pin, SCSI-II DIN socket. It has convenient wiring screw terminals and an easy-install DIN socket that can be mounted to the DIN rails.
3.17 General Purpose DIO (MPC-8164/PXI-8164 only) MPC-8164 has eight opto-isolated digital outputs and eight open collector digital inputs for general purpose use. Pin assignments are listed in the table below. CN3 Pin No Signal Name CN3 Pin No Signal Name...
Operation Theory This chapter describes the detailed operation of the 8164PCI-/ MPC-/PXI-8164 card via the following sections: Section 4.1: The motion control modes Section 4.2: The motor driver interface (INP, ERC, ALM, SVON, RDY) Section 4.3: The limit switch interface and I/O status (SD/ PCS, EL, ORG) Section 4.4: The counters (EA, EB, EZ)
4.1 Motion Control Modes This section describes the pulse output signal configuration and motion control modes. 4.1.1 Pulse command output 4.1.2 Velocity mode motion for one axis 4.1.3 Trapezoidal motion for one axis 4.1.4 S-Curve profile motion for one axis 4.1.5 Linear interpolation for 2-4 axes 4.1.6 Circular interpolation for 2 axes 4.1.7 Circular interpolation with acc/dec time...
4.1.1 Pulse Command Output The PCI-/MPC-/PXI-8164 uses pulse commands to control servo/ stepper motors via the drivers. A pulse command has two signals: OUT and DIR. There are two command types: (1) single pulse out- put mode (OUT/DIR), and (2) dual-pulse output mode (CW/CCW type pulse output).
Page 80
show the output waveform. It is possible to set the polarity of the pulse chain. 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.
Page 81
gram shows the output waveform of positive (+) commands and negative (-) commands. A/B Phase Pulse Output Mode (A/B phase Mode) In this mode, the waveform of the OUT and DIR pins represent A- phase and B-phase pulse output, respectively. Pulses output from the OUT pin leading makes the motor move in positive direction, whereas pulse output from the DIR pin leading makes the motor move in negative direction.
Page 82
put waveform of positive (+) commands and negative (-) com- mands. This mode is not available in older version boards. Related function: _8164_set_pls_outmode(): Refer to section 6.4. Operation Theory...
4.1.2 Velocity mode motion This mode is used to operate a one-axis motor with velocity mode motion. The output pulse accelerates from a starting velocity (StrVel) to a specified maximum velocity (MaxVel). The _8164_tv_move() function is used for constant linear accelera- tion while the _8164_sv_move() function is use for acceleration according to the S-curve.
4.1.3 Trapezoidal motion This mode moves a singe axis motor to a specified position (or distance) with a trapezoidal velocity profile. The single axis is con- trolled from point to point. An absolute or relative motion can be performed. In absolute mode, the target position is assigned. In relative mode, the target displacement is assigned.
Page 85
The StrVel and MaxVel parameters are given in units of pulses per second (PPS). The Tacc and Tdec parameters are in units of sec- ond to represent accel./decel. time respectively. You must know the physical meaning of “one pulse” to calculate the physical value of the relative velocity or acceleration parameters.
Page 86
ratio to 200/80=2.5 using the function _8164_set_move_ratio (axis, 2.5). If this ratio is not set before issuing the start moving command, it will cause problems when running in “Absolute Mode” because the 8164 won’t recognize the actual absolute position during motion. Related functions: _8164_start_ta_move(), _8164_start_tr_move(): Refer to section 6.6...
4.1.4 S-curve profile motion This mode moves a single-axis motor to a specified position (or distance) with an S-curve velocity profile. S-curve acceleration profiles are useful for both stepper and servomotors. The smooth transitions between the start of the acceleration ramp and transi- tion to constant velocity produce less wear and tear than a trape- zoidal profile motion.
Page 88
goes from StrVel to (StrVel + VSacc). In the second constant jerk region during acceleration, the velocity goes from (MaxVel – StrVel) to MaxVel. Between them, the linear region accelerates velocity from (StrVel + VSacc) to (MaxVel - VSacc) constantly. The deceleration period is similar in fashion.
Related functions: _8164_start_sr_move(),_8164_start_sa_move(): Refer to section 6.6 _8164_motion_done(): Refer to section 6.11 _8164_set_feedback_src(): Refer to section 6.4 _8164_set_move_ratio(): Refer to section 6.6 The following table shows the differences between all single axis motion functions, including preset mode (both trapezoidal and S- curve motion) and constant velocity mode.
Page 90
2 axes linear interpolation In the diagram below, 2-axis linear interpolation means to move the XY position (or any two of the four axis) from P0 to P1. The 2 axes start and stop simultaneously, and the path is a straight line.
Page 91
_8164_start_ta_move_xy(), _8164_start_ta_move_zu(), _8164_start_sr_move_xy(), _8164_start_sr_move_zu(), _8164_start_sa_move_xy(), _8164_start_sa_move_zu() (Refer to section 6.7) The second group allows you to freely assign the two target axes. _8164_start_tr_line2(), _8164_start_sr_line2(), _8164_start_ta_line2(), _8164_start_sa_line2() (Refer to section 6.7) The characters “t”, “s”, “r”, and “a” after _8164_start mean: t –...
Page 92
∆ ∆ The speed ratio along X-axis, Y-axis, and Z-axis is ( ∆ Z), respectively, and the vector speed is: When calling 3-axis linear interpolation functions, the vector speed is needed to define the start velocity, StrVel, and maxi- mum velocity, MaxVel. Both trapezoidal and S-curve profiles are available.
Page 93
a – Absolute motion 4-axis linear interpolation With 4-axis linear interpolation, the speed ratio along X-axis, Y- ∆ ∆ ∆ ∆ axis, Z-axis and U-axis is ( U), respectively, and the vector speed is: The following functions are used for 4-axis linear interpolation: _8164_start_tr_line4(), _8164_start_sr_line4() _8164_start_ta_line4(),_8164_start_sa_line4() (Refer to section 6.7)
4.1.6 Circular interpolation for 2 axes Any 2 of the 4 axes of the card can perform circular interpolation. In the example below, circular interpolation means XY (if axes 0, 1 are selected and assigned to be X, Y respectively) axes simulta- neously start from initial point, (0,0) and stop at end point,(1800,600).
Page 95
axis 1) and ZU (axis 2 and axis 3). By calling these functions, the target axes are already assigned. _8164_start_r_arc_xy(), _8164_start_r_ arc _zu(), _8164_start_a_ arc _xy(), _8164_start_a_ arc _zu(), (Refer to section 6.8) The second group allows user to freely assign any targeted two axes.
4.1.7 Circular interpolation with Acc/Dec time In section 4.1.6, the circular interpolation functions do not support acceleration and deceleration parameters. Therefore, they cannot perform a T or S curve speed profile during operation. However, sometimes the need for an Acc/Dec time speed profile will help a machine to make more accurate circular interpolation.
4.1.8 Relationship between velocity and acceleration time The maximum velocity parameter of a motion function will eventu- ally have a minimum acceleration value. This means that there is a range for acceleration time over one velocity value. Under this relationship, to obtain a small acceleration time, a higher maxi- mum velocity value to match the smaller acceleration time is required.
Page 98
_8164_start_tr_move(AxisNo,5000,0,5000,0.001,0.001), then use the following function: _8164_verify_speed(0,5000,&minAccT, &maxAccT,5000); The value miniAccT will be 0.0267sec and maxAccT will be 873.587sec. This minimum acceleration time does not meet the requirement of 1mS. To achieve such a low acceleration time the over speed value must be used. By changing the OverVelocity value to 140000, _8164_verify_speed(0,5000,&minAccT, &maxAccT,140000);...
Page 99
Example: User’s Desired Profile: (MaxV2, Target T) is not possible under MaxV2 according to the (MaxV, MiniT) relationship. So one must change the (MaxV, MiniT) relationship to a higher value, (MaxV1, MiniT1). Finally, the command would be: _8164_fix_speed_range(AxisNo, MaxV1); _8164_start_tr_move(AxisNo,Distance, 0 , MaxV2 , Target T, Tar- get T);...
4.1.9 Continuous motion The card allows you to perform continuous motion. Both single axis movement (section 4.1.3: Trapezoidal, section 4.1.4: S- Curve) and multi-axis interpolation (4.1.5: linear interpolation, 4.1.6: circular interpolation) can be extended to be continuous motion. For example, if a user calls the following function to perform a sin- gle axis preset motion: 1) _8164_set_continuous_move(0, 1) It enables the continuous move function by keeping current posi-...
Page 101
The following diagram shows the register data flow of the card. 1. The first motion is executed and the CPU writes corre- sponding values into Pre-Register2. _8164_start_ta_move(0,50000.0,100.0,30000.0,0.1,0.0) 2. Since Pre-Register1 and Register are empty, the data in pre-register 2 is automatically moved to the Register and executed immediately by the ASIC.
Page 102
ASIC. Data in Pre-Register2 is then moved to Pre- Register1. 7. The ASIC will inform the CPU generating an interrupt that a motion is completed. Users can then write the 4th motion command into Pre-Register2. Procedures for continuous motion (by interrupt) The following procedures are to help user making continuous motion.
Page 103
Restrictions of continuous motion Here are restrictions and suggestions for continuous motion: 1. When the Pre-Registers are full, you may not execute any more motion functions. Otherwise, the new function one will overwrite the existing function in Pre-Register2. 2. To get a continuity of velocity between two motions, the previous end velocity of and starting velocity of the next must be the same.
Page 104
Explanation of example: When these three motions ARE executed sequentially, the 1st occupies the Register and is executed immediately; the 2nd occu- pies Pre-Register1 and waits for completion of the 1st motion. The 3rd occupies Pre-Register2 and waits for completion of the 2nd motion.
Page 105
cuted at least once after home move. Refer to 4.1.8: Home return mode for more details. 5. INP enable could be set before any motion command. In continuous motion, normally you disable INP except final command, since you want velocity command to be con- tinuously sent without slowing down by INP between every motion.
Page 106
2. 2-axis continuous interpolation: This example demonstrates how to use continuous motion func- tion to achieve 2-axis continuous interpolation. In this application, the velocity continuity is the key. Refer to the previous example. The functions related to continuous motion are listed below: _8164_set_continuous_move(), _8164_check_continuous_buffer() Refer to section 6.17.
4.1.10 Home Return Mode In this mode, the card is allowed to continuously output pulses until the condition to complete the home return is satisfied after writing the command _8164_home_move(). There are 13 home moving modes provided by the 8164. The home_mode of function _8164_set_home_config() is used to select whichever mode is preferred.
Page 108
home_mode=0: ORG > Slow down > Stop When SD (Ramp-down signal) is inactive. When SD (Ramp-down signal) is active. Operation Theory...
4.1.11 Home Search Mode This mode adds auto searching function on normal home return mode described in section 4.1.10. After _8164_home_config() set, without calling _8164_home_move() _8164_home_search() to perform this function. The following illustration shows an example of home mode 2. The ORG offset must not be zero.
4.1.12 Manual Pulser Mode (PCI-8164 Only) For manual operation of a device, you may use a manual pulse such as a rotary encoder. The PCI-8164 can receive input signals from a pulser and output its corresponding pulses from the OUT and DIR pins, thereby allowing a simplified external circuit.
4.1.13 Synchronous starting modes Synchronous motion means more than one axes can be started by a synchronous signal. The has three kinds of this motion. 1. Simultaneously start/stop by externl signal (STA/STP). Example: 3 axes move simultaneously I16 AxisArray[3]={0,1,2}; I16 DistArray[3]={5000,6000,2000}; I16 StartV[3]={0,0,0};...
Page 118
4. Immediately start when other axis’ synchronous condition is sat- isfied. Example: Axis2 starts when Axis1’s acceleration ends. _8164_set_sync_option(2,0,0,2, 0); _8164_set_sync_signal_source(2, 1); _8164_set_sync_signal_mode(1, 9); _8164_start_tr_move(1, 1000, 0, 5000, 0.01, 0.01); _8164_start_tr_move(0, 500, 0, 1000, 0.01, 0.01); Related functions: _8164_set_sync_signal_mod(), _8164_set_sync_signal_source(), _8164_set_sync_option(), _8164_set_tr_move_all(), _8164_start_move_all(), Refer to section 6.18 Operation Theory...
4.2 The motor driver interface The card provides the INP, ALM, ERC, SVON, and RDY signals for a servomotor driver control interface. The INP and ALM are used for feedback of the servo driver status, ERC is used to reset the servo driver’s deviation counter under special conditions, VON is a general purpose output signal, and RDY is a general purpose input signal.
Page 120
_8164_set_inp(). The INP signal status can be monitored by software with the function: _8164_get_io_status(). Related functions: _8164_set_inp(): Refer to section 6.12 _8164_get_io_status(): Refer to section 6.13 _8164_motion_done(): Refer to section 6.11 Operation Theory...
4.2.2 ALM The processing of the ALM signal is a hardware built-in procedure, and it is designed to interact with the alarm signal of the servomo- tor driver. The ALM signal is an output signal from servomotor driver. Usu- ally, it is designated to indicate when something is wrong with the driver or motor.
4.2.3 ERC The ERC signal is an output from the 8164. The processing of the ERC signal is a hardware built-in procedure, and it is designed to interact with the deviation counter clear signal of the servomotor driver. The deviation counter clear signal is inserted in the following situa- tions: 1.
4.2.4 SVON and RDY All 864 axes are equipped with SVON and RDY signals, which are general purpose output and input channels, respectively. The SVON is used to interact with the servomotor drivers as a Servo ON command, and RDY to receive the Servo Ready signal. There are no built-in procedures for SVON and RDY.
4.3 The limit switch interface and I/O status In this section, the following I/O signal operations are described. SD/PCS: Ramping Down and Position Change sensor ± EL: End-limit sensor ORG: Origin position ± In any operation mode, if an EL signal is active during any mov- ing condition, it causes the 8164 to stop automatically outputting pulses.
Page 125
The PCS signal defines the starting point of current tr and sr motions. Refer to the chart below. The logic of PCS is configurable using _8164_set_pcs_logic() Related functions: _8164_set_sd_pin(),_8164_set_pcs_logic(): Refer to sec- tion 6.5 _8164_set_sd(): Refer to section 6.12 _8164_get_io_status(): Refer to section 6.13 Operation Theory...
Page 126
4.3.2 EL The end-limit signal is used to stop the control output signals (OUT and DIR) when the end-limit is active. There are two possible stop modes: stop immediately and decelerate to StrVel then stop. To select either mode, use _8164_set_el(). The PEL signal indicates the end-limit in the positive (plus) direc- tion.
4.3.3 ORG The ORG signal is used when the motion controller is operating in the home return mode. There are 13 home return modes (Refer to section 4.1.8), any one of 13 modes cam be selected using “home_mode” argument function _8164_set_home_config().
4.4 Counters There are four counters for each card axis: 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 com- mand and feedback pulse numbers. General purpose counter: The source can be configured as pulse output, feedback pulse, manual pulser, or CLK/2.
4.4.2 Feedback position counter The card has a 28-bit binary up/down counter managing the present position feedback for each axis. The counter counts signal inputs from the EA and EB pins. It accepts two kinds of pulse inputs: Plus and minus pulse inputs (CW/CCW mode), and;...
Page 130
The following diagram illustrates the waveform. The index input (EZ) signals of the encoders are used as the ZERO reference. This signal is common on most rotational motors. EZ can be used to define the absolute position of the mechanism. The input logic polarity of the EZ signals is program- mable using software function _8164_set_home_config().
4.4.3 Position error counter The position error counter is used to calculate the error between the command position and the feedback position. It will add one count when the card outputs one pulse and subtracts one count when the card receives one pulse (from EA, EB). This is useful in detecting step-loses (stalls) in situations of a stepping motor when an encoder is applied.
4.4.4 General purpose counter The general purpose counter is very versatile and may be any of the following: 1. Pulse output – as a command position counter 2. Pulse input – as a feedback position counter 3. Manual Pulse input – Default status. 4.
Page 133
Counter Function Counter Description Function Source description Set a new _8164_set_command value for com- Counts the mand position number of Command Pulse output output Read current pulses _8164_get_command command posi- tion Select the input _8164_set_pls_iptmo modes of EA/ Set the _8164_set_feedback counters input _src...
4.4.5 Target position recorder The target position recorder provides target position information. For example, if the 8164 is operating in continuous motion with absolute mode, the target position lets the next absolute motion know the target position of previous one. It is very important to understand how the software handles the target position recorder.
4.5 Multiple PCI-8164 Card Operation (PCI-8164 Only) The software function library can support a maximum of 12 PCI- 8164 cards. This means that up to 48 motors can be connected. Since the PCI-8164 is Plug-and-Play compatible, the base address and IRQ settings for card are are automatically assigned by the system BIOS when it is turned on.
4.6 Change position or speed on the fly The card provides the ability to change position or speed while an axis is moving. Changing speed/position on the fly means that the target speed/position can be altered after the motion has started. However, certain limitations do exist.
Page 137
necessary before _8164_fix_speed_range() function, _8164_v_change() _8164_unfix_speed_range() releases the speed range con- strained by _8164_fix_speed_range(). The function _8164_cmp_v_change() almost has the same function except _8164_v_change(), _8164_cmp_v_change() acts only when a general comparator comes into existence. Refer to section 4.4.4 for more details about the general comparator.
Page 138
Constraints of _8164_v_change(): In positioning mode, when changing to a higher velocity, there must be enough remaining pulses to decelereate after reaching new velocity, else the _8164_v_change() will return an error and the velocity remains unchanged. For example: A trapezoidal relative motion is applied: _8164_start_tr_move(0,10000,0,1000,0.1,0.1).
Page 139
2. During the acceleration or deceleration period, using _8164_v_change() is not recommended. Even if it does work in most cases, the acceleration and deceler- ation time is not guaranteed. Example: There are three speed change sensors during an absolute move for 200000 pulses.
Page 140
if((Sensor1==High) && (Sensor2==Low) && (Sensor3 == Low)) _8164_v_change(axis, 25000, 0.02); else if((Sensor1==Low) && (Sensor2==High) && (Sensor3 == Low)) _8164_v_change(axis, 50000, 0.02); else if((Sensor1==Low) && (Sensor2==Low) && (Sensor3 == High)) _8164_v_change(axis, 100000, 0.02); The information of the three sensors is acquired from another I/O card and the resulting velocity profile from experiment is shown below: Related functions:...
4.6.2 Change position on the fly When operating in single-axis absolute pre-set motion, it is possi- ble to change the target position during moving by using the func- tion _8164_p_change(). Theory of _8164_p_change(): only applicable _8164_p_change() _8164_start_ta_move(), and _8164_start_sa_move() functions. This function changes the target position, defined originally by these two functions.
Page 142
Constraints of _8164_p_change(): 1. _8164_p_change() is only applicable on single-axis absolute pre-set motion, i.e. _8164_start_ta_move(), _8164_start_sa_move() only. 2. Position change during the deceleration period is not allowed. 3. There must be enough distance between the new target position current position where _8164_p_change() is executed because the 8164 needs enough space to finish deceleration.
Page 143
NewPos CurrentPos OK / Error Note 5000 4000 5000 4501 Error 5000 5000 Error 5000 5499 Error 5000 6000 Go back 5000 9499 Go back 5000 9500 Error 5000 9999 Error Related function: _8164_p_change(): refer to section 6.6 Operation Theory...
4.7 Position compare and Latch The card provides position comparison functions on axes 0 and 1, and position latching functions on axes 2 and 3. The comparison function is used to output a trigger pulse when the counter reaches a preset value set by the user. CMP1 (axis 0) and CMP2 (axis 1) are used as a comparison trigger.
Page 145
Comparator 4 is a general purpose comparator, which will gener- ate an interrupt (default reaction) if the comparing condition comes into existence. The comparing source counter can be any counter. The compared value, source counter, comparing method, and reaction function _8164_set_general_comparator().
4.7.2 Position compare with trigger output The 5th comparator, whose comparing source can be feedback or command position counter, performs the position compare func- tion. Only the first 2 axes (0 and 1) can do a position comparison with trigger output. The position comparison function triggers a pulse output via the CMP pin, when the comparing condition comes into existence.
Page 147
Example: Using the continuous position comparison function. In this application, the table is controlled by the motion command, and the CCD camera is controlled by the position comparison out- put of the 8164. An image of the moving object is easily obtained. Working Spec: 34000 triggering points per stroke, trigger speed is 6000 pts/sec ) Program settings:...
Page 148
Users can use this function to check if auto-trigger is running. Results: Operation Theory...
Page 149
The Value block in this figure is the position where the comparison occurs, and where the data can be checked by using _8164_check_compare_data(). Note that at the final compared point, load an After-final point into the Value block. Fill a dummy point into the comparison table array at the final position.
4.7.3 Position Latch The position latch is different than the position compare function in the following way: the position compare function triggers a pulse output via the CMP, when the comparing condition comes into existence, the position latch function receives pulse inputted via the LTC, and then captures all data in all counters at that instant (refer to section 4.4).
4.8 Hardware backlash compensator and vibration suppression Whenever direction change has occurred, the card outputs a backlash corrective pulse before sending the next command. The function _8164_backlash_comp() sets the pulse number. In order to minimize vibration when a motor stops, the card can output a single pulse for a negative direction and then single pulse for a positive direction right after completion of a command move- ment.
4.9 Software Limit Function The card provides two software limits for each axis. The soft limit is extremely useful in protecting a mechanical system as it works like a physical limit switch when correctly set. The soft limits are built on comparators 1 and 2 (Refer to section 4.7.1) and the comparing source is the command position counter.
4.10 Interrupt Control The 8164 motion controller can generate an INT signal to the host parameter, “intFlag,” software function _8164_int_control(), can enable/disable the interrupt ser- vice. After a interrupt occurs, the function _8164_get_int_status() is used to receive the INT status, which contains information about the INT signal.
Page 154
event_int_status: can not be masked if interrupt service is acti- vated. Description Normal Stop Next command starts Command pre-register 2 is empty (Reserved) Acceleration Start Acceleration End Deceleration Start Deceleration End Position Soft Limit On Negative Soft Limit On Error Comparator Compared General Comparator compared Trigger Comparator compared (Reserved)
Page 155
Use Events to handle interrupts under Windows To detect an interrupt signal from the card in Windows, you must first create an events array, then use the functions provided by the card to obtain the interrupt status. A sample program is listed below: Steps: 1.
Page 156
8164 Interrupt Service Routine (ISR) with DOS A DOS function library is included with the card for developing applications under DOS environment. This library also includes a few functions to work with the ISR. It is highly recommended that programs be written according to the following example for applications working with the ISR.
Page 157
_8164_get_irq_status(0, &irq_status);// Check if this card’s int if(irq_status) for(i=0;i<4;i++) _8164_enter_isr(i);// enter ISR for(i=0;i<4;i++) _8164_get_int_type(i, &int_type); // check int type if( int_type & 0x1 ) _8164_get_error_int(i, &int_status1[i]); // Insert User’s Code in Error INT if( int_type & 0x2 ) _8164_get_event_int(i, &int_status2[i]); // Insert User’s Code in Event INT // end of for every axis on card0 for(i=0;i<4;i++) _8164_leave_isr(i);...
4.11 PXI Trigger Bus (PXI-8164 only) There are eight general trigger channels in PXI bus. They are called PXI_TRG[0] to PXI_TRG[7]. All channels can be pro- grammed as input or output. These trigger channels are for inter- board control synchronization. For example, if there are two PXI cards, card A and card B in one system, Card A will send a trigger signal through PXI_TRG to card B and card B is waiting for this signal to do some action.
Page 160
If you want to connect STA, STP, and CEMG to the PXI trigger bus, they can only set it to channel 5, 6, and 7, individually. STA may also be connected to PXI_START by function selection. Also, PXI_START’s status could be read back through this function. If you want to connect CMP1, CMP2 and AP6 to PXI trigger bus, they can set it to one of the PXI_TRG[7:0] by setting them as out- put.
Motion Creator 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 cards to verify correct operation. The Motion Creator software provides a simple yet powerful means to setup, configure, test, and debug a motion control sys- tem that uses the PCI-/MPC-/PXI-8164 cards.
5.1 Execute Motion Creator ® After installing the software drivers for the card in Windows 98/NT/2000/XP, the motion creator program is located at <chosen path>\PCI-Motion\MotionCreator. To launch the program, double- click on the executable file or click Start > Program Files > PCI- Motion >...
5.2 Notes on Motion Creator 1. Motion Creator is a program written in VB 5.0, and is ® available only for Windows 95/98/NT/2000/XP OS and a monitor with a screen resolution of 800x600 or higher. Motion Creator does not support DOS. 2.
5.3 Using Motion Creator 5.3.1 Main Menu The main menu appears after launching the Motion Creator. Refer to the illustration on the next page for the description of the main menu functions. 5.3.2 Interface I/O Configuration Menu This menu configures EL, ORG, EZ, ERC, ALM, INP, SD, and LTC.
Page 165
1. ALM Logic and Response mode: Selects the logic and response modes of ALM signal. The related function call is _8164_set_alm(). 2. INP Logic and Enable/Disable selection: Selects the logic, and enables/disables the INP signal. The related function call is _8164_set_inp() 3.
Page 166
8. LTC Logic: Selects the logic of the LTC signal. The related function call is _8164_set_ltc_logic(). 9. Buttons: Next Axis: Changes the operating axis. Save Config: Saves current configuration to 8164.ini. Operate: Go to the operation menu. Refer to section 5.3.4.
5.3.3 Pulse I/O and Interrupt Configuration Menu This menu configures the pulse input/output and move ratio and INT factor. 1. Pulse Output Mode: Selects the output mode of the pulse signal (OUT/ DIR). The related function call is _8164_set_pls_outmode(). 2. Pulse Input: Sets the configurations of the Pulse input signal(EA/EB).
5.3.4 Operation menu: This menu changes the settings for a selected axis, including velocity mode motion, preset relative/absolute motion, manual pulse move, and home return. 1. Position: Command: displays the value of the command counter. The related function is _8164_get_command(). Feedback: displays the value of the feedback position counter.
Page 169
fied value. The related functions are: _8164_set_position() _8164_set_command() _8164_reset_error_counter() _8164_reset_target_pos() 3. Motion Status: Displays the returned value of the _8164_motion_done function. The related function is _8164_motion_done(). 4. INT Status: Event: displays the event_int_status (in hexadecimal). The related function is _8164_get_int_status(). Error: displays the error_int_status (in hexadecimal).
Page 170
7. Operation Mode: Select operation mode. Absolute Mode: Sets the Position1 and Position2 as absolution target positions for motion. The related func- tions are _8164_start_ta_move(), _8164_start_sa_move(). Relative Mode: Uses Distance as relative displacement for motion. The related function is _8164_start_tr_move(), _8164_start_sr_move().
Page 171
ORG Distance: The length when ORG is ON 8. Position: Sets the absolute position for Absolute Mode. This is only available when the Absolute Mode is selected. 9. Distance: Sets the relative distance for Relative Mode. This is only available when Relative Mode is selected. 10.Repeat Mode: When you select On, the motion will become a repeat mode (forward<->backward or position1<->position2).
Page 172
100.0. In Cont. Move, both the value and sign are effec- tive. –100.0 means 100.0 in the minus direction. Maximum Velocity: Sets the maximum velocity of motion in units of PPS. In Absolute Mode or Relative Mode, only the value is effective. For example, -5000.0 is the same as 5000.0.
Page 173
In Manual Pulser Move, this causes the axis to go into pulse move. The speed limit is the value set by Maxi- mum Velocity. Right play button: Click this button to let the card start to outlet pulses according to previous setting. In Absolute Mode, this causes the axis to move to posi- tion.
Page 174
20.Buttons: Next Axis: Changes the operating axis. Save Config: Saves the current configuration to 8164.ini. Config Pulse & INT: Go to the Pulse IO and Interrupt Configuration menu. Refer to section 5.3.3 Config Interface I/O: Go to the Interface I/O Configura- tion menu.
Function Library This chapter describes the supporting software for the PCI-/MPC-/ PXI-8164 card. You can use these functions to develop programs in C, C++, or Visual Basic. If Delphi is used as the programming environment, you need to manually transform the header files 8164.h.
Page 176
Velocity mode motion Section 6.5 Function Name Description Accelerate an axis to a constant velocity with trape- _8164_tv_move zoidal profile Accelerate an axis to a constant velocity with S- _8164_sv_move curve profile _8164_v_change Change speed on the fly _8164_sd_stop Decelerate to stop _8164_emg_stop Immediately stop _8164_fix_speed_range...
Page 177
Linear Interpolated Motion Section 6.7 Function Name Description Begin a relative 2-axis linear interpolation for X & Y, _8164_start_tr_move_xy with trapezoidal profile Begin an absolute 2-axis linear interpolation for X & _8164_start_ta_move_xy Y, with trapezoidal profile Begin a relative 2-axis linear interpolation for X & Y, _8164_start_sr_move_xy with S-curve profile Begin an absolute 2-axis linear interpolation for X &...
Page 178
Function Name Description Begin a relative 4-axis linear interpolation with S- _8164_start_sr_line4 curve profile Begin an absolute 4-axis linear interpolation with _8164_start_ta_line4 trapezoidal profile Begin an absolute 4-axis linear interpolation with S- _8164_start_sa_line4 curve profile _8164_set_axis_option Choose interpolation speed mode Function Library...
Page 179
Circular Interpolation Motion Section 6.8 Function Name Description _8164_start_a_arc_xy Begin an absolute circular interpolation for X & Y _8164_start_r_arc_xy Begin a relative circular interpolation for X & Y _8164_start_a_arc_zu Begin an absolute circular interpolation for Z & U _8164_start_r_arc_zu Begin a relative circular interpolation for Z & U Begin an absolute circular interpolation for any 2 of _8164_start_a_arc2 the 4 axes...
Page 180
Home Return Mode Section 6.9 Function Name Description _8164_set_home_config Set the home/index logic configuration _8164_home_move Begin a home return action _8164_escape_home Escape Home Function _8164_home_search Auto-Search Home Switch Manual Pulser Motion Section 6.10 Function Name Description _8164_set_pulser_iptmode Set pulser input mode _8164_pulser_vmove Start pulser v move _8164_pulser_pmove...
Page 181
Motion I/O Monitoring Section 6.13 Function Name Description _8164_get_io_status Get all the motion I/O status of 8164 Interrupt Control Section 6.14 Function Name Description _8164_int_control Enable/Disable INT service _8164_int_enable Enable event (For Windows only) _8164_int_disable Disable event (For Windows only) _8164_get_int_status Get INT Status (For Windows only) Set link to interrupt call back function (For Windows...
Page 182
Position Control and Counters Section 6.15 Function Name Description _8164_get_position Get the value of the feedback position counter _8164_set_position Set the feedback position counter _8164_get_command Get the value of the command position counter _8164_set_command Set the command position counter _8164_get_error_counter Get the value of the position error counter _8164_reset_error_counter Reset the position error counter...
Page 183
Position Compare and Latch Section 6.16 Function Name Description _8164_set_ltc_logic Set the LTC logic _8164_get_latch_data Get latched counter data _8164_set_soft_limit Set soft limit _8164_enable_soft_limit Enable soft limit function _8164_disable_soft_limit Disable soft limit function _8164_set_error_counter_check Step-losing detection _8164_set_general_comparator Set general-purposed comparator _8164_set_trigger_comparator Set Trigger comparator _8164_set_trigger_type...
Page 184
General-purposed TTL Output Section 6.19 (PCI-8164 Only) Function Name Description _8164_d_output Digital Output _8164_get_dio_status Get DO status General-purposed DIO Section 6.20 (MPC-8164 Only) Function Name Description _8164_write_do Digital Output _8164_read_di Digital Input General-purposed DIO Section 6.20 (PXI-8164 Only) Function Name...
Page 185
Card ID Section 6.21 (PXI-8164 Only) Function Name Description _8164_enable_card_id Enable card ID’s function _8164_check_card Check if this Card ID exist PXI Trigger Bus Section 6.22 (PXI-8164 Only) Function Name Description _8164_get_pxi_trigger_value Digital Output _8164_set_pxi_trigger_value Digital Input _8164_enable_pxi_input Enable PXI input channel _8164_select_pxi_output Select PXI output channel Function Library...
This section discusses the functions in detail. The function proto- types and some common data types are declared in PCI-8164.H or MPC-8164.H. It is recommended that you use these data types in your application programs. The following table shows the data type names and their range.
Initializes the card without assigning the hardware resources. All 8164 cards must be initialized by this function before calling other functions. The card uses this function in all platforms because it is Plug and Play compatible. The MPC-8164 uses this function in ® Windows 98/NT/2000/XP.
Page 188
_8164_get_base_addr: Get the card’s base address. _8164_delay_time: Delays execution of program for specified time in units of ms. _8164_config_from_file: Loads the configuration of the card based on the specified file. By using Motion Creator, users can test and configure the card cor- rectly.
Page 189
I16 _8164_delay_time(I16 AxisNo, U32 MiniSec); I16 _8164_config_from_file(char *filename); I16 _8164_version_info(I16 CardNo, U16 *HardwareInfo, U16 *SoftwareInfo, U16 *DriverInfo); Note: In RTX environments, the type of information changes to Visual Basic (Windows 95/NT/2K/XP) B_8164_initial (existCards As Integer) As Integer B_8164_close () As Integer B_8164_get_irq_channel (ByVal CardNo As Integer, irq_no As Integer) As Integer B_8164_get_base_addr (ByVal CardNo As Integer,...
6.4 Pulse Input/Output Configuration @ Name _8164_set_pls_outmode – Set the configuration for pulse command output. _8164_set_pls_iptmode – Set the configuration for feedback pulse input. _8164_set_feedback_src – Enable/Disable the external feed- back pulse input @ Description _8164_set_pls_outmode: Configures the output modes of command pulses. There are six modes for command pulse output.
Page 192
Visual Basic (Windows 95/NT/2K/XP) B_8164_set_pls_outmode (ByVal AxisNo As Integer, ByVal pls_outmode As Integer) As Integer B_8164_set_pls_iptmode (ByVal AxisNo As Integer, ByVal pls_iptmode As Integer, ByVal pls_logic As Integer) As Integer B_8164_set_feedback_src (ByVal AxisNo As Integer, ByVal Src As Integer) As Integer @ Argument AxisNo: The designated axis number to configure pulse Input/ Output.
Page 193
Src: Counter source Value Meaning External Feedback Command pulse @ Return Code ERR_NoError Function Library...
6.5 Velocity mode motion @ Name _8164_tv_move – Accelerate an axis to a constant velocity with trapezoidal profile _8164_sv_move – Accelerate an axis to a constant velocity with S-curve profile _8164_v_change – Change speed on the fly _8164_sd_stop – Decelerate to stop _8164_emg_stop –...
Page 195
Note: The velocity profile is decided by an original motion profile. When using in S-curve, set the motion to pure S-curve. Refer to the function limitations on section 4.6.1 before using. _8164_sd_stop: Decelerates an axis to stop with a trapezoidal or S-curve profile. This function is also useful when a preset move (both trapezoidal and S-curve motion), manual move, or home return function is performed.
Page 196
F64 _8164_fix_speed_range(I16 AxisNo, F64 MaxVel); I16 _8164_unfix_speed_range(I16 AxisNo); I16 _8164_get_current_speed(I16 AxisNo, F64 *speed); F64 _8164_verify_speed(F64 StrVel,F64 MaxVel,F64 *minAccT,F64 *maxAccT, F64 MaxSpeed); Visual Basic (Windows 95/NT/2K/XP) B_8164_tv_move (ByVal AxisNo As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double) As Integer B_8164_sv_move (ByVal AxisNo As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal SVacc As Double)
Page 197
@ Argument AxisNo: Designated axis number to move or stop StrVel: Starting velocity in units of pulse per second MaxVel: Maximum velocity in units of pulse per second Tacc: Specified acceleration time in units of second SVacc: Specified velocity interval in which S-curve acceleration is performed.
6.6 Single Axis Position Mode @ Name _8164_start_tr_move – Begin a relative trapezoidal profile move _8164_start_ta_move – Begin an absolute trapezoidal profile move _8164_start_sr_move – Begin a relative S-curve profile move _8164_start_sa_move – Begin an absolute S-curve profile move _8164_set_move_ratio – Set the ratio of command pulse and feedback pulse.
Page 199
@ Description General: The moving direction is determined by the sign of the Pos or Dist parameter. If the moving distance is too short to reach the specified velocity, the controller automatically lowers the Max- Vel, and the Tacc, Tdec, VSacc, and VSdec become shorter while dV/dt(acceleration / deceleration) and d(dV/dt)/dt (jerk) remain unchanged.
Page 200
Configures the scale factors for the specified axis. Usually, the axes only need scale factors if their mechanical resolutions are dif- ferent. For example, if the resolution of feedback sensors is two times resolution of command pulse, then ratio is equal to 2. _8164_p_change: Changes the target position on the fly.
Page 201
_8164_set_idle_pulse: Delays acceleration from starting velocity. This outputs the counts of setting pulses at starting velocity then acceleration. _8164_dwell_move: Starts a dwell move that means the move does not cause real motion for a specific time. _8164_set_fa_speed: Sets the FA speed in home mode. If the FA speed is not set before home move, it will use 1/2 starting velocity as FA speed.
Page 202
Visual Basic (Windows 95/NT/2K/XP) B_8164_start_tr_move (ByVal AxisNo As Integer, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_ta_move (ByVal AxisNo As Integer, ByVal Pos As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_sr_move (ByVal AxisNo As Integer,...
Page 203
@ Argument AxisNo: Designated axis number to move or change position Dist: Specified relative distance to move Pos: Specified absolute position to move StrVel: Starting velocity of a velocity profile in units of pulse per second MaxVel: Starting velocity of a velocity profile in units of pulse per second Tacc: Specified acceleration time in units of seconds Tdec: Specified deceleration time in units of seconds...
Page 204
Idl_pulse: Idl_pulse=0 - 7 miniSecond: time of dwell move, the unit is in ms FA_Speed: the speed of FA @ Return Code ERR_NoError ERR_SpeedError ERR_PChangeSlowDownPointError ERR_MoveRatioError Function Library...
6.7 Linear Interpolated Motion @ Name _8164_start_tr_move_xy – Begin a relative 2-axis linear interpolation for X & Y, with trapezoidal profile, _8164_start_ta_move_xy – Begin an absolute 2-axis linear interpolation for X & Y, with trapezoidal profile, _8164_start_sr_move_xy – Begin a relative 2-axis linear interpolation for X &...
Page 206
_8164_start_sa_line3 – Begin an absolute 3-axis linear inter- polation with S-curve profile, _8164_start_tr_line4 – Begin a relative 4-axis linear interpo- lation with trapezoidal profile, _8164_start_sr_line4 – Begin a relative 4-axis linear interpo- lation with S-curve profile _8164_start_ta_line4 – Begin an absolute 4-axis linear inter- polation with trapezoidal profile _8164_start_sa_line4 –...
Page 209
B_8164_start_sr_move_xy (ByVal CardNo As Integer, ByVal Dist As Double, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_8164_start_sa_move_xy (ByVal CardNo As Integer, ByVal Pos As Double, ByVal Pos As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As...
Page 210
Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_sr_line2 (ByVal CardNo As Integer, AxisArray As Integer, ByVal DistX As Double, ByVal DistY As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_8164_start_sa_line2 (ByVal CardNo As Integer,...
Page 211
As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_ta_line4 (ByVal CardNo As Integer, ByVal PosX As Double, ByVal PosY As Double, ByVal PosZ As Double, ByVal PosU As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer...
Page 212
MaxVel: starting velocity of a velocity profile in units of pulse per second Tacc: specified acceleration time in units of seconds Tdec: specified deceleration time in units of seconds SVacc: specified velocity interval in which S-curve acceleration is performed. Note: SVacc = 0, for pure S-Curve SVdec: specified velocity interval in which S-curve deceleration is performed.
6.8 Circular Interpolation Motion @ Name _8164_start_r_arc_xy – Begin a relative circular interpolation for X & Y _8164_start_a_arc_xy – Begin an absolute circular interpola- tion for X & Y _8164_start_r_arc_zu – Begin a relative circular interpolation for Z & U _8164_start_a_arc_zu –...
Page 214
_8164_start_ta_arc2 – Begin a T-curve absolute circular interpolation _8164_start_sr_arc2 – Begin a S-curve relative circular inter- polation _8164_start_sa_arc2 – Begin a S-curve absolute circular interpolation _8164_start_tr_arc_xy – Begin a T-curve relative circular interpolation _8164_start_ta_arc_xy – Begin a T-curve absolute circular interpolation _8164_start_tr_arc_zu –...
Page 215
@ Description Relative / Speed Target Hardware Function Absolute Profile Axes version bit 12 _8164_start_r_arc_xy Flat Axes 0 & 1 0 or 1 _8164_start_a_arc_xy Flat Axes 0 & 1 0 or 1 _8164_start_r_arc_zu Flat Axes 2 & 3 0 or 1 _8164_start_a_arc_zu Flat Axes 2 &...
Page 218
Visual Basic (Windows 95/NT/2K/XP) B_8164_start_a_arc_xy (ByVal CardNo As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal MaxVel As Double) As Integer B_8164_start_r_arc_xy (ByVal CardNo As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy As Double, ByVal DIR As Integer,...
Page 219
Double, ByVal MaxVel As Double, ByVal Tacc As Double) As Integer B_8164_start_sr_arc_xyu (ByVal CardNo As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double) As Integer B_8164_start_sa_arc_xyu (ByVal CardNo As Integer, ByVal Cx As Double, ByVal Cy As Double,...
Page 220
As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_ta_arc2 (ByVal CardNo As Integer, AxisArray As Double, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer...
Page 221
OffsetEy As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8164_start_ta_arc_zu (ByVal CardNo As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer...
Page 222
@ Argument CardNo: Designated card number to perform linear interpolation OffsetCx: X-axis offset to center OffsetCy: Y-axis offset to center OffsetEx: X-axis offset to end of arc OffsetEy: Y-axis offset to end of arc Cx: Specified X-axis absolute position of center Cy: Specified Y-axis absolute position of center Ex: Specified X-axis absolute position end of arc Ey: Specified Y-axis absolute position end of arc...
6.9 Home Return Mode @ Name _8164_set_home_config – Set the configuration for home return. _8164_home_move – Perform a home return move. _8164_escape_home – Escape home _8164_home_search – Perform auto home search @ Description _8164_set_home_config: Configures the home return mode, origin and index signal (EZ) logic, EZ count, and ERC output options for the home_move() function.
Page 225
@ Argument AxisNo: Designated axis number to configure and perform home return home_mode: Stopping modes for home return, 0-12 (Please refer to section 4.1.8) org_logic: Action logic configuration for ORG org_logic=0, active low org_logic=1, active high EZ_logic: Action logic configuration for E EZ_logic=0, active low EZ_logic=1, active high ez_count: 0-15 (Refer to section 4.1.8)
6.10 Manual Pulser Motion @ Name _8164_set_pulser_iptmode - set the input signal modes of pulser _8164_pulser_vmove – manual pulser v_move _8164_pulser_pmove – manual pulser p_moce _8164_pulser_home_move – manual pulser home move _8164_set_pulser_ratio – Set manual pulser ratio for actual output pulse rate _8164_pulser_r_line2 –...
Page 227
_8164_set_pulser_ratio: Sets the manual pulse ratio for actual output pulse rate. The for- mula for manual pulse output rate is: Output Pulse Count = Input Pulse Count * (PMG+1) * [(PDV+1)/2048] The PDV=0-2047 Divide Factor The PMG=0-31 Multiplication Factor _8164_pulser_r_line2: Pulser mode for 2-axis linear interpolation (relative mode only).
Page 228
Visual Basic (Windows 95/NT/2K/XP) B_8164_set_pulser_iptmode (ByVal AxisNo As Integer, ByVal InputMode As Integer, ByVal Inverse As Integer) As Integer B_8164_pulser_vmove (ByVal AxisNo As Integer, ByVal SpeedLimit As Double) As Integer B_8164_pulser_pmove (ByVal AxisNo As Integer, ByVal Dist As Double, ByVal SpeedLimit As Double) As Integer B_8164_pulser_home_move (ByVal AxisNo As Integer, ByVal HomeType As Integer, ByVal SpeedLimit...
Page 229
For example, if SpeedLimit is set to be 100pps, then the axis can move at fastest 100pps , even the input pulser signal rate is more then 100pps Dist: specified relative distance to move HomeType: specified home move type HomeType =0, Command Origin.(that means axis stops when command counter becomes ‘0’) HomeType =1, ORG pin.
6.11 Motion Status @ Name _8164_motion_done – Return the motion status @ Description _8164_motion_done: Returns the motion status of the 8164. If the card is in stopped condition, check if it is in error stop status by reading error inter- rupt status in section 6.14.
Page 231
@ Return Value Under Stopped condition Reserved Wait CSTA (Synchronous start signal) Wait Internal sync. signal Wait for another axis to stop Wait ERC timer finished Wait DIR Change timer finished Backlash compensating Wait PA/PB input In FA speed motion In start velocity motion In acceleration In Max velocity motion...
6.12 Motion Interface I/O @ Name _8164_set_alm – Set alarm logic and operating mode _8164_set_el – Set EL stopping mode _8164_set_inp – Set Inp logic and operating mode _8164_set_erc – Set ERC logic and timing _8164_set_servo – Set state of general purpose output pin _8164_set_sd –...
Page 234
alm_mode: Reacting modes when receiving an ALARM signal alm_mode=0, motor immediately stops (default) alm_mode=1, motor decelerates then stops. el_mode: Reacting modes when receiving an EL signal el_mode=0, motor immediately stops (default) el_mode=1, motor decelerates then stops. inp_enable: INP function enabled/disabled inp_enable=0, Disabled (default) inp_enable=1, Enabled inp_logic: Set the active logic for the INP signal...
Page 235
sd_logic: Set the active logic for the SD signal sd_logic=0, active LOW sd_logic=1, active HIGH sd_latch: Set the latch control for the SD signal sd_latch=0, do not latch sd_latch=1, latch sd_mode: Set the reacting mode of the SD signal sd_mode=0, slow down only sd_mode=1, slow down then stop el_logic: Set EL as normal low (0) or normal high(1) @ Return Code...
6.13 Motion I/O Monitoring @ Name _8164_get_io_status – Get all the motion I/O statuses of each 8164 @ Description _8164_get_io_status: Obtains all the I/O statuses for each axis. The definition for each bit is as follows: Bit Name Description RDY pin input Alarm Signal Positive Limit Switch Negative Limit Switch...
Page 237
@ Argument AxisNo: Axis number for I/O control and monitoring *io_status: I/O status word. “1” is ON and “0” is OFF. ON/OFF state is read based on the corresponding set logic. @ Return Code ERR_NoError Function Library...
6.14 Interrupt Control @ Name _8164_int_control – Enable/Disable INT service _8164_set_int_factor – Set INT factor _8164_int_enable – Enable event (For Window only) _8164_int_disable – Disable event (For Window only) _8164_get_int_status – Get INT Status (For Window only) _8164_link_interrupt – Set link to interrupt call back function (For Window only) _8164_get_int_type –...
Page 239
The INT status of 8164 is composed of two independent parts: error_int_status event_int_status. event_int_status recordes the motion and comparator event under normal operation, and this kind of INT status can be masked by _8164_set_int_factor(). The error_int_status is for abnormal stop of the 8164, for example: EL, ALM …etc. This kind of INT cannot be masked.
Page 240
_8164_int_enable: (For Window only.) Enables the Windows INT event. _8164_int_disable: (For Window only.) Disables the Windows INT event. _8164_get_int_status: (For Window only.) Identifies the cause of the interrupt signal. After the value is obtained, the status register will be cleared to 0. The return value is two, 32-bit unsigned integers.
Page 241
The second is for event_int_status, which can be masked by _8164_set_int_factor(). See table below: event_int_status: masked function call _8164_int_factor() Description Normal Stop Next command Starts Command pre-register 2 is empty (Reserved) Acceleration Start Acceleration End Deceleration Start Deceleration End (Reserved) (Reserved) (Reserved) General Comparator compared...
Page 242
_8164_enter_isr: (DOS only) This function is used to inform the system that the process is now entering interrupt service routine. _8164_leave_isr: (DOS only) This function is used to inform the system that the process is now leaving interrupt service routine. _8164_get_event_int: (DOS only) This function is used to get event_int_status.
6.15 Position Control and Counters @ Name _8164_get_position – Get the value of feedback position counter _8164_set_position – Set the feedback position counter _8164_get_command – Get the value of command position counter _8164_set_command – Set the command position counter _8164_get_error_counter – Get the value of position error counter _8164_reset_error_counter –...
Page 247
@ Description _8164_get_position(): Reads the feedback position counter value. Note that this value has already been processed by the move ratio. If the move ratio is 0.5, than the value read will be twice as the counter value. The source of the feedback counter is selectable by the function _8164_set_feedback_src() to be external EA/EB or pulse output of 8164.
Page 248
Sets new value for the target position recorder. It is necessary to call this function when home return completes or when a new feedback counter value function _8164_set_position(). _8164_get_rest_command(): Reads the remaining pulse counts until the end of the current motion.
Page 249
Visual Basic (Windows 95/NT/2K/XP) B_8164_get_position (ByVal AxisNo As Integer, Pos As Double) As Integer B_8164_set_position (ByVal AxisNo As Integer, ByVal Pos As Double) As Integer B_8164_get_command (ByVal AxisNo As Integer, cmd As Long) As Integer B_8164_set_command (ByVal AxisNo As Integer, ByVal cmd As Long) As Integer B_8164_get_error_counter (ByVal AxisNo As Integer, error_counter As Integer) As...
6.16 Position Compare and Latch @ Name _8164_set_ltc_logic – Set the LTC logic _8164_get_latch_data – Get latched counter data _8164_set_soft_limit – Set soft limit _8164_enable_soft_limit – Enable soft limit function _8164_disable_soft_limit – Disable soft limit function _8164_set_error_counter_check – Step-losing detection setup _8164_set_general_comparator –...
Page 252
@ Description _8164_set_ltc_logic: Sets the logic of the latch input. This function is applicable only for last two axes in every 8164 card. _8164_get_latch_data: After the latch signal arrived, this function reads the latched value of counters. _8164_set_soft_limit: Sets the soft limit value . _8164_enable_soft_limit, _8164_disable_soft_limit: Enable/disable the soft limit function.
Page 253
_8164_set_trigger_type: Sets the trigger output mode In hardware version A2, it is used for setting the output pulse as a one shot or constant on. In hardware version A3, it is used for setting the output pulse as normal high or normal low. _8164_check_compare_data: Obtains the current comparing data of the designated comparator.
Page 254
compare data also _8164_set_general_comparator(), while the remain dis- tance, compare point’s velocity, new velocity, and acceleration time are set by _8164_cmp_v_change(). _8164_force_cmp_output: Ouputs trigger pulses from CMP without comparing position. Meanwhile, only axis 0 and axis 1 can use this function. _8164_set_rotary_counter: Sets the counter of axis as a rotary (ring) counter.
Page 256
B_8164_set_trigger_comparator (ByVal AxisNo As Integer, ByVal CmpSrc As Integer, ByVal CmpMethod As Integer, ByVal Data As Double) As Integer B_8164_set_trigger_type (ByVal AxisNo As Integer, ByVal TriggerType As Integer) As Integer B_8164_check_compare_data (ByVal AxisNo As Integer, ByVal CompType As Integer, Pos As Double) As Integer B_8164_check_compare_status (ByVal AxisNo As Integer, cmp_sts As Integer) As Integer...
Page 257
@ Argument AxisNo_2or3: Axis number, for last two axes in one card ltc_logic: 0 means active low, 1 means active high AxisNo: Axis number LatchNo: Specified Counter to latch LatchNo = 1 , Command counter LatchNo = 2 , Feedback counter LatchNo = 3 , Error Counter LatchNo = 4 , General Counter Pos: Latched counter value,...
Page 259
CompType: Selection of type of comparator CompType =1, + Soft Limit CompType =2, -Soft Limit CompType =3, Error Counter Comparator Value CompType =4, General Comparator Value CompType =5, Trigger Output Comparator Value cmp_sts: status of comparator Meaning +Softlimit On -SoftLimit On Error counter comparator On General comparator On Trigger comparator On (for 0 , 1 axis only)
Page 260
oldvel: Velocity at compare point. Must be specified manually. newvel: New velocity AccTime: Acceleration time reset_src: Reset source selection Value=0, disable Value=1, Latch pin ON Value=2, ORG pin ON Value=3, Comparator 4 ON Value=4, Comparator 5 ON @ Return Code ERR_NoError ERR_CompareNoError ERR_CompareMethodError...
6.17 Continuous motion @ Name _8164_set_continuous_move – toggle continuous motion sequence flags _8164_check_continuous_buffer – check if the command register buffer is empty @ Description _8164_set_continuous_move(): This function is needed before and after continuous motion com- mand sequences. _8164_check_continuous_buffer(): Detects whether the command pre-register is empty or not. Once the command pre-register is empty, you may write the next motion command into it.
Page 262
@ Argument AxisNo: Designated axis number conti_flag: Flag for continuous motion conti_flag = 0, declare continuous motion sequence is fin- ished conti_flag = 1, declare continuous motion sequence is started @ Return Value ERR_NoError Return value of _8164_check_continuous_buffer(): Hardware version bit 12=0 0: command register 2 is empty 1: command register 2 is in-use Return value of _8164_check_continuous_buffer():...
Page 264
@ Description These functions are related to simultaneous operations of multi- axes even in different cards. Simultaneous multi-axis operation means to start or stop moving specified axes at the same time. The axes moves are specified by the parameter AxisArray, and the number of axes are defined by parameter TotalAxes in _8164_set_tr_move_all().
Page 265
axis single motion to start at the same time, you can turn on this option before the command starts. This function may also be used when waiting for another command’s finish signal before starting. For example, axis1 must start after axis2 is done. _8164_set_sync_stop_mode(): Provides two options for stop types: immediately stop and slow down to stop.
Page 266
I16 _8164_set_sync_stop_mode(I16 AxisNo, I16 stop_mode); I16 _8164_set_sync_signal_source(I16 AxisNo, I16 Sync_axis); I16 _8164_set_sync_signal_mode(I16 AxisNo, I16 mode); Visual Basic (Windows 95/NT/2K/XP) B_8164_set_tr_move_all(ByVal TotalAxes As Integer, AxisArray As Integer, DistA As Double, StrVelA As double, MaxVelA As double, TaccA As double, TdecA As double); B_8164_set_sa_move_all(ByVal TotalAxes As Integer, AxisArray As Integer, PosA As Double, StrVelA As double, MaxVelA As...
Page 267
@ Argument TotalAxes: Number of axes for simultaneous motion, 1-48. *AxisArray: Specified axes number array designated to move. *DistA: Specified position array in units of pulse *StrVelA: Starting velocity array in units of pulse per second *MaxVelA: Maximum velocity array in units of pulse per second *TaccA: Acceleration time array in units of seconds *TdecA: Deceleration time array in units of seconds *SVaccA: Specified velocity interval array in which S-curve accel-...
Page 268
stop_mode: 0: immediate stop 1: slow down to stop mode: 0=Off 1-5=compare 1-5 active 8=Acc start 9=Acc end 10=Dec start 11=Dec end Sync_axis: 0-3, the axis index in the card. @ Return Code ERR_NoError ERR_SpeedError Function Library...
6.19 General-purposed TTL output (PCI-8164 Only) @ Name _8164_d_output – Digital Output _8164_get_dio_status – Get DIO status @ Description _8164_d_output(): Sets the on_off status for general-purposed TTL digital output pin. _8164_get_dio_status(): Reads the status of all digital output pins. @ Syntax C/C++ (DOS, Windows 95/NT/2K/XP) I16 _8164_d_output(I16 CardNo, I16 Ch_No, I16 value);...
Page 270
@ Argument CardNo: Designated card number Ch_No: Designated channel number 0 - 5 Value: On-Off Value for output Value =0, output OFF Value =1, output ON dio_status: Digital output status bit0-bit5 for channel 0 - 5, respectively @ Return Value ERR_NoError ERR_DioNoError Function Library...
6.20 General-purposed DIO (MPC-8164/PXI-8164 only) @ Name _8164_write_do – Digital Output (MPC-8164 only) _8164_read_di – Digital Input (MPC-8164 only) _8164_write_axis_do – Digital Output (PXI-8164 only) _8164_read_axis_di – Digital Input (PXI-8164 only) @ Description _8164_write_do(): Outputs an 8-bit value once to control eight output channels.
Page 272
CardNo: Designated card number AxisNo: Designated axis number Value: Value for output Bit value =0, output OFF Bit value =1, output ON @ Return Value ERR_NoError Digital Input Value for 8 channels in MPC-8164 Axis’ general digital input value in PXI-8164 Function Library...
6.21 Card ID (PXI-8164 Only) @ Name _8164_enable_card_id – Enable card ID’s function _8164_check_card – Check if this Card ID exist @ Description _8164_enable_card_id(): Makes the card ID settings valid. This line must be placed before _8164_initial() function _8164_check_card(): Checks if the card ID exists. You can use this function to search all the cards in the 0 - 11 range.
6.22 PXI Trigger Bus (PXI-8164 Only) @ Name _8164_get_pxi_trigger_value – Readback PXI_TRG’s sta- tus value _8164_set_pxi_trigger_value – Write PXI_TRG’s status value _8164_enable_pxi_input – Enable PXI input channel _8164_select_pxi_output – Select PXI output channel @ Description _8164_get_pxi_trigger_value(): Reads back the PXI TRG’s status value from bit0 to bit7. _8164_set_pxi_trigger_value(): Writes the PXI TRG’s status value from bit0 to bit7.
Page 275
@ Syntax C/C++ (DOS, Win32) I16 _8164_get_pxi_trigger_value(I16 CardNo, U16 *value); I16 _8164_set_pxi_trigger_value(I16 CardNo, U16 value); I16 _8164_enable_pxi_input(I16 CardNo, I16 STA, I16 STP, I16 CEMG); I16 _8164_select_pxi_output(I16 CardNo, I16 source, I16 pxi_channel); Visual Basic (Win32) B_8164_get_pxi_trigger_value(ByVal CardNo As Integer, value As Integer) As Integer B_8164_set_pxi_trigger_value(ByVal CardNo As Integer, ByVal value As Integer) As Integer B_8164_enable_pxi_input(ByVal CardNo As Integer,...
Page 276
@ Argument CardNo: Designated card number *value: PXI_TRG value bit0-7, PXI_STAR value in bit8 value: PXI_TRG value bit0-7 STA: 0=disable, 1=link to PXI_TRG[5], 2=link to PXI_STAR STP: 0=disable, 1=link to PXI_TRG[6] CEMG: 0=disable, 1=link to PXI_TRG[7] source: 0 = Software control 1 = AP6X 2 = AP6Y 3 = AP6Z...
Main connection between the PCI-8164 and the pulse input servo driver or stepping driver. CN3: Receives pulse commands from manual pulse in the PCI- 8164 card. General Purpose DIO for MPC-8164 CN4: Connector for simultaneously start or stop of multiple PCI- 8164 cards. CN5:...
7.2 Connection Example with Servo Driver This example illustrates the connection between a Panasonic Servo Driver and the card. Figure 7-2 shows the wiring diagram. NOTES: 1. For convenience, the drawing shows connections for single axis only. 2. Default pulse output mode is OUT/DIR. Default input mode is 1X AB phase.
Wiring of PCI-8164 with SANYO AC Servo PY2 PCI_8164 Axis 1 Servo Driver OUT1 + OUT1 - DIR + DIR - EX GND DC24V COM EX +24V DC24V EX +24V DC24V SVON 1 Servo ON ERC 1 NROT ALM 1 ALM1 INP 1 General Out...
The DIN-814M is used for wiring between Mitsubishi J2S series servo drivers / stepper with pulse trains input driver and ADLINK PCI-8134, PCI-8164, PXI-8164 or MPC-8164 motion controller card ONLY. Never use it with any other servo driver or cards.
When using PCI-8134, PSD is used as a positive slow down signal. When using PCI-8164/PXI-8164/ MPC-8164, PSD1/2 is for CMP1/2 of Axis0/Axis1 and PSD3/4 is for LTC3/4 of Axis3/Axis4. 4. Emergency Signal: This signal is defined by Mitsub- ishi’s servo driver (pin15 of CNB) as a normally closed input.
Page 284
CNB1-CNB4 (Mitsubishi AC Servo Driver CNB Interface) Name Function No. Name I/O Function Analog Torque Com- IGND Isolated Ground mand +24V Driver Voltage output ABS bit 0 Servo ON Servo On Limiting Torque Speed Selection 2 ABSM ABS transfer mode ABSR ABS request IGND...
Page 285
HD1-HD4 (Auxiliary. Servo I/O Interface) Name Function Name +24V Voltage output EX_EMG Servo ON O Servo On Servo Ready IGND Jumper (Mitsubishi AC Servo Driver EMG Signal Source Selection) J1-J4 1: GND 2: EMG4 3: EX_EMG TD1-TD4 (External AC Servo Driver Reset & ABS system Interface) Name Function...
7.3.2 Signal Connections 1. PEL, MEL, ORG, PSD, MSD (in IOIF#) 2. EX_EMG (both IOIF# and HD#) 3. CMP, LTC (in IOIF#’s PSD pin only for 8164 series) 4. CNA & CNB, CN2 5. CN1: This connector is parallel with on board CN1. 6.
7.4 Wiring with DIN-814P WARNING The DIN-814M is used for wiring between the Panasonic MINAS MSD series servo driver and ADLINK PCI-8134 or PCI-8164 motion controller cards ONLY. Do not try the DIN-814P to connect other servo drivers or cards. 4th Axis To stepping LED indecater...
2. A 36-pin cable (one-to-one) is required to connect the CNIF and the Panasonic MINAS MSD driver. Contact your local ADLINK representative for availability. 3. Depending on the PCI-8134/PCI-8164 card usage, some signals in the IOIF connector, such as PSD and MSD, will function differently.
7.4.2 PIN Assignment: CNIF1-CNIF4 No. Name I/O Function Name Function Encoder Z-phase (+) Encoder Z-phase (-) IGND Isolated Ground OUT+ Pulse Signal (+) OUT- Pulse Signal (-) DIR+ Direction Signal (+) DIR- Direction Signal (-) IGND Isolated Ground +24V Voltage output Servo ON Servo On Error counter Clear...
Page 291
SJ1-SJ4 Name Function Name Function OUT+ Pulse Signal (+) Servo Alarm OUT- Pulse Signal (-) Voltage output DIR+ Direction Signal (+) Servo ON Servo On DIR- Direction Signal (-) Voltage output Index Signal IGND Isolated Ground Name Function EX+24V External Power Supply Input (+24V DC ± 5%) EXGND External Power Supply Ground Connection Example...
7.4.3 How to wire PEL, MEL, ORG, SD, PSD, MSD (in IOIF): CMP, LTC (in IOIF) CMP is a TTL 5V or 0V output (vs. Ext GND) LTC is a TTL 5V or 0V input (vs. Ext. GND) CNA & CNB, CN2 SJ: Refer to PCI-8134/PCI-8164 user’s manual for wiring infor- mation.
7.5 Wiring with DIN-814PA WARNING The DIN-814PA is designed for Panasonic MINAS A-series servo drivers with ADLINK PCI-8134/PCI-8164 series motion control board. DO NOT use the DIN-814PA with other servo drivers and motion control boards. Mechanical I/O interface 4th axis to servo 3rd axis to servo driver driver...
Page 294
servo drivers. The signals at CNIF# and SJ# are con- nected together. DO NOT use them simultaneously. 2. A 50-pin cable is required to connect the Panasonic MINAS A-series servo driver with the CNIF# connector on the DIN-814PA. Contact your local ADLINK represen- tative for additional information.
7.5.3 PIN Assignment: CNIF1-CNIF4 Name Function Name Function OUT- Pulse Signal (-) OUT+ Pulse Signal (+) DIR- Direction Signal (-) DIR+ Direction Signal (+) +24V +24V Power supply IGND Isolated Ground IGND Isolated Ground IGND Isolated Ground Encoder A-phase (+) Encoder A-phase (-) Encoder Z-phase (+) Encoder Z-phase (-)
Page 299
SJ1-SJ4 Name Function Name Function OUT+ Pulse Signal (+) Servo Alarm OUT- Pulse Signal (-) +5V Power supply DIR+ Direction Signal (+) SVON Servo On DIR- Direction Signal (-) +5V Power supply Index Signal IGND Isolated Ground Name Function ± EX+24V External Power Supply Input (+24V DC EXGND...
7.6.1 PIN Assignment: CNIF1-CNIF4 Name I/O Function Name Function P15R 15VDC power supply Analog speed limit IGND Isolated Ground Encoder A-phase(+) Encoder A-phase(-) Encoder B-phase(+) Encoder B-phase(-) Encoder Z-phase(+) Encoder Z-phase(-) OUT+ Pulse Signal(+) OUT- Pulse Signal(-) SVON Servo ON Speed selection 2 ABSM Forward rotation...
Page 302
BH1-BH4 Name Function Name Function Reset Signal ABSM Forward rotation ABSR Reverse rotation ABSB0 Speed reached Zero Speed Limiting Torque Speed selection 2 P15R 15VDC power supply Analog speed limit Analog torque command +24V Voltage output Servo Alarm Signal EXEMG External EMG Signal IGND Isolated Ground...
Page 303
Name Function EX +24V External Power Supply Input (+24V DC+5%) EX GND External Power Supply Ground Connection Example...
Appendix 8.1 Color code of CN3 Cable (MPC-8164 Only) CN3 Pin No Signal Name Color CN3 Pin No Signal Name Color DOCOM Brown DOCOM Pink-Black DOCOM Grey DOCOM Blue-White Grey-Black White Purple-White Orange Light Green-Black Pink White-Blue Yellow DICOM Light Blue-Black...
Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the follow- ing carefully. 1. Before using ADLINK’s products please read the user man- ual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA appli- cation form which can be downloaded from: http:// rma.adlinktech.com/policy/.
Page 310
3. Our repair service is not covered by ADLINK's guarantee in the following situations: Damage caused by not following instructions in the User's Manual. Damage caused by carelessness on the user's part dur- ing product transportation. Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers.
Need help?
Do you have a question about the MPC-8164 and is the answer not in the manual?
Questions and answers