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.
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. In no event will the manufacturer be liable for direct, indirect, special, 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.
Getting service from ADLINK Customer satisfaction is top priority for ADLINK TECHNOLOGY INC. Please contact us should you require any service or assistance. 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, Taipei, 235 Taiwan Email or fax this completed service form for prompt and satisfactory service.
Table of Contents Table of Contents..................................................................... i List of Tables.......................................................................... vi List of Figures ....................................................................... vii 1 Introduction ........................................................................ 1 1.1 1.2 1.3 Features............................................................................... 6 PCI-8164 ..................
(PXI-8164 only)........................................................ 2.13 CN2 pin assignments: Main Connector ............................. 2.14 CN4 pin assignments: Simultaneous Start/Stop (PCI-8164 only)........................................................ 2.15 CN5 pin assignment: TTL Output (PCI-8164 only) ............ 2.16 Jumper setting for pulse output (PCI-8164 only) ............... 2.17 Switch setting for EL Logic................................................. 2.
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 ......................................................
5.1 5.2 5.3 Execute Motion Creator ................................................... 150 Notes on Motion Creator.................................................. 151 Using Motion Creator ....................................................... 152 Main Menu .................................................................. 152 Interface I/O Configuration Menu ................................ 152 Pulse I/O and Interrupt Configuration Menu ............... 155 Operation menu: ...............................
7.4 7.5 7.6 7.7 Wiring with DIN-814P ...................................................... 276 Mechanical Dimensions: ............................................. 277 PIN Assignment: ......................................................... 278 How to wire ................................................................. 280 Wiring with DIN-814PA .................................................... 281 Wiring Example: ..........................................................
List of Tables Table 2-1: GEME hardware configuration ................................ 22 Table 2-2: Base Addresses ......................................................
List of Figures Figure 1-1: Figure 1-2: Figure 1-3: Figure 1-4: Figure 2-1: Figure 2-2: Figure 2-3: Figure 2-4: Figure 2-5: Figure 7-1: Figure 7-2: Figure 7-3: List of Figures PCI-8164 block diagram ............................................ 2 MPC-8164 block diagram .......................................... 3 PXI-8164 block diagram ............................................ 4 Application building flow chart ................................... 5 PCI-8164 PCB layout ....................................
1 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 interpolation, 4-axis linear interpolation, or continuous interpolation for continual velocity. The PCI-/MPC-/PXI-8164 also changes position and/or speed on the fly with a single axis operation. Multiple PCI-/MPC-/PXI-8164 cards may be installed in one system.
Figure 1-1: PCI-8164 block diagram 2 Introduction
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.
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.
Motion Creator is a Windows-based application development software 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. DOS and Windows programming libraries for C++ and Visual Basic are included together with some sample programs to illustrate the operations of these functions.
1.1 Features 1.1.1 PCI-8164 X 32-bit PCI bus, Plug and Play X 4 axes of step and direction pulse output for controlling stepping or servomotor X 6.
X Includes Motion Creator, a Microsoft Windows-based application development software X Libraries and utilities support DOS, Windows® 9X/NT/2000/ XP, and Linux Introduction 7
1.1.2 X X X X X X X X X X X X X X X X X X X X X X X X X X 8 MPC-8164 16-bit PC104 bus 4 axes of step and direction pulse output for controlling stepping or servomotor 6.
1.1.3 PXI-8164 X PXI specifications Rev. 2.0-compliant X Multiple modules synchronized via PXI trigger bus X 3U Eurocard form factor, CompactPCI compliant (PICMG 2.0 R2.1) X 4-CH isolated digital I/O X 4 axes of step and direction pulse output for controlling stepping or servomotor X 6.
10 X Includes Motion Creator, a Microsoft Windows-based application development software X Libraries and utilities DOS, Windows® 9x/NT/2000/XP, and Linux Introduction
1.2 Specifications Applicable motors X Stepping motors X AC or DC servomotors with pulse train input servo drivers Performance X 4 controllable axes X 6.55MPPS maximum pulse output frequency, linear, trapezoidal, or S-Curve velocity profile drive X 19.66 MHz internal reference clock X 28-bit up/down counter range: 0 to 268,435,455 or –134,217,728 to +134,217,727 X Position pulse setting range (28-bit): -134,217,728 to +134,217,728 X Pulse rate setting ranges (pulse ratio = 1: 65535): Z 0.
I/O signals X Input/Output signals for each axis X Opto-isolated digital input with 2500Vrms isolation voltage X OUT and DIR command pulse output pins X EA and EB incremental encoder signals input pins X EZ encoder index signal input pin X ±EL, SD/PCS, and ORG mechanical limit/switch signal input pins X INP, ALM, and ERC servomotor interface I/O pins X LTC position latch input pin X CMP position compare output pin X SVON general-purposed digital output pin X RDY general-purposed digital
Dimensions X PCI-8164: 185 mm (L) X 106.68 mm (W) X MPC-8164: 152 mm (L) X 104.7 mm (W) X PXI-8164: 3U Eurocard form factor, CompactPCI-compliant (PICMG 2.0 R2.
1.3 Software support 1.3.1 Programming library Programming libraries for MS-DOS and Borland C/C++ (Version 3.1) and DLLs for Windows® 95/98/NT/2000/XP come bundled with the PCI-8164/PXI-8164 card package. Support for Linuxbased 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.
2 Installation Follow these steps to install the PCI-/MPC-/PXI-8164 card. X Check the card package contents (section 2.1) X Check the card PCB and face plate/front panel layout (section 2.2) X Install the card to the chassis (section 2.3) X Install the drivers (section 2.
2.1 Package contents Check the package contents for the following items: X PCI-8164/MPC-8164/PXI-8164 card X ADLINK All-in-one CD X +24V power input cable (for CN1) accessories (PCI-8164 only) X Optional terminal board for wiring purposes If any of these items are missing or damaged, contact your dealer immediately. Save the original packaging for future shipment.
2.
2.
2.
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 automatically assigned by the system BIOS. The address assignment is done on a board-by-board basis for all PCI cards installed in the system. 2.5.2 PCI slot selection The PCI-8164 card may be installed in any available PCI slot. The PXI-8164 card may be installed in any PXI slot. CAUTION 2.5.
Installation notes 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.5.
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.
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.
2.7 Driver installation PCI-8164/PXI-8164 1. Place the ADLINK All-In-One CD to the CD-ROM drive. 2. When the Autorun screen appears, select Driver Installation > Motion Control > PCI-8164/PXI-8164. 3. Follow screen procedures to install, then restart the system after installation is completed. NOTE When using MS-DOS, install the drivers from the \Motion Control\PCI-8164\DOS_BC directory of the CD. MPC-8164 1. Place the ADLINK All-In-One CD to the CR-ROM drive. 2.
2.8 CN1 pin assignments: External Power Input (PCI8164 only) CN1 Pin No 1 2 Name Description EGND External power ground CN1_24V +24V DC ± 5% External power supply NOTES X CN1 is a plug-in terminal board with no screws. X Use the external power supply. A +24V DC is used by external input/output signal circuits. The power circuit configuration is shown below. X Wires for connection to CN1: Z Solid wire: ϕ0.32 mm to ϕ0.65 mm (AWG28 to AWG22) Z Twisted wire: 0.08 mm2 to 0.
2.9 CN3 pin assignments: Manual Pulse Input (PCI-8164 only) CN3 is for the manual pulse input. No.
2.10 J4 pin assignments: Manual Pulse Input (PXI-8164 only) No. Name 1 3 5 7 Function DGND Bus power ground No.
2.
2.12 J3 pin assignments: Isolated DIO (PXI-8164 only) No. 1 Name DICOM Digital In Common 3 5 7 Function No.
2.13 CN2 pin assignments: Main Connector CN2 is the major connector for the motion control I/O signals. 30 No. Name I/O Function (axis / ) No. Name I/O Function (axis / ) 1 VPP O +5V power supply output 51 VPP O +5V power supply output 2 EGND Ext. power ground 52 EGND 3 OUT1+ O Pulse signal (+), 53 OUT3+ O Pulse signal (+), 4 OUT1- O Pulse signal (-), 54 OUT3- O Pulse signal (-), 5 DIR1+ O Dir. signal (+), 55 DIR3+ O Dir. signal (+), 6 DIR1- O Dir.
40 SD/PCS1 I Ramp-down signal 90 SD/PCS3 I 41 ORG1 I Origin signal, 91 ORG3 I 42 EGND Ext. power ground 92 EGND Ramp-down signal Origin signal, Ext. power ground 43 PEL2 I End limit signal (+), 93 PEL4 I 44 MEL2 I End limit signal (-), 94 MEL4 I End limit signal (-), 45 CMP2 O Position compare output 95 LTC4 I Position latch input, 46 SD/PCS2 I Ramp-down signal 96 SD/PCS4 I Ramp-down signal 47 ORG2 I Origin signal, 97 ORG4 I 48 EGND Ext.
2.14 CN4 pin assignments: Simultaneous Start/Stop (PCI-8164 only) CN4 is for simultaneous start/stop signals for multiple axes or multiple cards. No. Name Function (Axis) 1 DGND Bus power ground 2 STP Simultaneous stop signal input/output 3 STA Simultaneous start signal input/output 4 STP Simultaneous stop signal input/output 5 STA Simultaneous start signal input/output 6 VCC 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 Installation Function 1 DGND Digital ground 2 DGND Digital ground 3 ED0 Digital Output 0 4 ED1 Digital Output 1 5 ED2 Digital Output 2 6 ED3 Digital Output 3 7 ED4 Digital Output 4 8 ED5 Digital Output 5 9 VCC VCC +5V 10 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 collector output. Refer to section 3.1 for detailed jumper settings. The default setting is differential line driver mode.
2.17 Switch setting for EL Logic The S1 switch sets the EL limit switching type. By default the EL switch is set to ON, which is the “normally open” position (or "A" contact type), while OFF is the “normally closed” position (or “B” contact type). For safety reasons, you must set a type that will make the endlimit active when it is broken or disconnected. NOTE Installation MPC-8164 uses a software function for this setting.
2.
2.19 S2 card ID switch setting (PXI-8164 only) Card ID Switch Setting (ON=1) NOTE Installation 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 10 1010 11 1011 Other settings are invalid. In order to enable this function, see section 6.21.
38 Installation
3 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: X Section 3.1 X Section 3.2 Encoder Feedback Signals EA, EB and EZ X Section 3.3 Origin Signal ORG X Section 3.4 End-Limit Signals PEL and MEL X Section 3.5 Ramping-down & PCS signals X Section 3.6 In-position signals INP X Section 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. Refer to section 4.1.1 for details of the logical characteristics of the OUT and DIR signals. This section details the electrical characteristics of the OUT and DIR signals. Each signal consists of a pair of differential signals.
Output Signal For differential line driver output, close breaks between 1 and 2 of: For open collector output, close breaks between 2 and 3 of: OUT1- J1 J1 DIR1- J2 J2 OUT2- J3 J3 DIR2- J4 J4 OUT3- J5 J5 DIR3- J6 J6 OUT4- J7 J7 DIR4- J8 J8 By default, the OUT and DIR are set to differential line driver mode. The wiring diagram below illustrates the OUT and DIR signals on the 4 axes of PCI-8164 card.
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.
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. The following table shows the relative signal names, pin numbers, and axis numbers.
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 collector output. Connection to line driver output To drive the card encoder input, the driver output must provide at least 3.
For more operation information on the encoder feedback signals, refer to section 4.4.
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 # 41 ORG1 1 47 ORG2 2 91 ORG3 3 97 ORG4 4 The input circuit of the ORG signals is shown below. Usually, a limit switch is used to indicate the origin on one axis. The specifications of the limit switch should have contact capacity of +24 V @ 6 mA minimum.
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 indicates the end limit signal is in the minus direction. The signal names, pin numbers, and axis numbers are shown in the table below. CN2 Pin No Signal Name Axis # CN2 Pin No Signal Name Axis # 37 PEL1 1 87 PEL3 3 38 MEL1 1 88 MEL3 3 43 PEL2 2 93 PEL4 4 44 MEL2 2 94 MEL4 4 A circuit diagram is provided 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 # 40 SD1/PCS1 1 46 SD2/PCS2 2 90 SD3/PCS3 3 96 SD4/PCS4 4 A circuit diagram is shown below. Typically, the limit switch is used to generate a slow-down signal to drive motors operating at slower speeds. For more details on SD/PCS operation, refer to section 4.3.1.
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 position indicates zero. The signal names, pin numbers, and axis numbers are shown in the table below. CN2 Pin No Signal Name Axis # 10 INP1 1 28 INP2 2 60 INP3 3 78 INP4 4 The diagram below shows the input circuit of the INP signals.
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 # 9 ALM1 1 27 ALM2 2 59 ALM3 3 77 ALM4 4 The input alarm circuit diagram is provided. The ALM signal is usually generated by the servomotor driver and is ordinarily an open collector output signal. An external circuit must provide at least 5 mA current sink capabilities to drive the ALM signal.
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. CN2 Pin No Signal Name Axis # 8 ERC1 1 26 ERC2 2 58 ERC3 3 76 ERC4 4 The ERC signal clears the deviation counter of the servomotor driver.
3.9 General-purpose Signal SVON The SVON signal can be used as a servomotor-on control or general purpose output signal. The signal names, pin numbers, and its axis numbers are shown in the following table.
3.10 General-purpose Signal RDY The RDY signals can be used as motor driver ready input or general purpose input signals. The signal names, pin numbers, and axis numbers are shown in the table below. CN2 Pin No Signal Name Axis # 11 RDY1 1 29 RDY2 2 61 RDY3 3 79 RDY4 4 The input circuit of RDY signal is shown in this diagram.
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. The signal names, pin numbers, and axis numbers are shown below. CN2 Pin No Signal Name Axis # 39 CMP1 1 45 CMP2 2 The wiring diagram below shows the CMP on the first 2 axes.
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 position determination. The LTC channel is on CN2. The signal names, pin numbers, and axis numbers are shown below. CN2 Pin No Signal Name Axis # 89 LTC3 3 95 LTC4 4 The wiring diagram below shows the LTC of the last 2 axes.
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 generate the positioning information that guides the motor. CN3 Pin No Signal Name Axis # CN3 Pin No Signal Name Axis # 11 PA1 1 5 PA3 3 10 PB1 9 PA2 1 4 PB3 3 2 3 PA4 4 8 PB2 2 2 PB4 4 The CN3 PA and PB pins are directly connected to PA and PB pins of the PCL6045. The interface circuit is shown below.
3.14 Simultaneously Start/Stop Signals STA and STP (PCI-8164 only) The PCI-8164 provides STA and STP signals that enable simultaneous 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. Both STP and STA signals are input and output signals. To operate the start and stop action simultaneously, both software control and external control are needed.
58 Signal Connections
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 numbers, and axis numbers are listed below. Pin No. Name Function 1 DGND Digital ground 2 DGND Digital ground 3 ED0 Digital Output 0 4 ED1 Digital Output 1 5 ED2 Digital Output 2 6 ED3 Digital Output 3 7 ED4 Digital Output 4 8 ED5 Digital Output 5 9 VCC VCC +5V The diagram shows the LTC of the last 2 axes.
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.
3.17.1 Isolated input channels 3.17.
3.17.
3.17.
4 Operation Theory This chapter describes the detailed operation of the 8164PCI-/ MPC-/PXI-8164 card via the following sections: X Section 4.1: The motion control modes X Section 4.2: The motor driver interface (INP, ERC, ALM, SVON, RDY) X Section 4.3: The limit switch interface and I/O status (SD/ PCS, EL, ORG) X Section 4.4: The counters (EA, EB, EZ) X Section 4.5: Multiple card operation X Section 4.6: Change position or speed on the fly X Section 4.
4.1 Motion Control Modes This section describes the pulse output signal configuration and motion control modes. 66 X 4.1.1 Pulse command output X 4.1.2 Velocity mode motion for one axis X 4.1.3 Trapezoidal motion for one axis X 4.1.4 S-Curve profile motion for one axis X 4.1.5 Linear interpolation for 2-4 axes X 4.1.6 Circular interpolation for 2 axes X 4.1.7 Circular interpolation with acc/dec time X 4.1.8 Relationship between velocity and acceleration time X 4.1.
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 output mode (OUT/DIR), and (2) dual-pulse output mode (CW/CCW type pulse output). The software function, _8164_set_pls_outmode(), is used to program the pulse command mode. The modes vs. signal type of OUT and DIR pins are listed in the table below.
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. 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.
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 Aphase 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.
put waveform of positive (+) commands and negative (-) commands. This mode is not available in older version boards. Related function: X 70 _8164_set_pls_outmode(): Refer to section 6.4.
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 acceleration while the _8164_sv_move() function is use for acceleration according to the S-curve. The pulse output rate is kept at maximum velocity until another velocity command is set or a stop command is issued.
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 controlled 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. In both cases, the acceleration and deceleration may be different. The function _8164_motion_done() is used to check whether the movement is completed.
The StrVel and MaxVel parameters are given in units of pulses per second (PPS). The Tacc and Tdec parameters are in units of second 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.
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: 74 X _8164_start_ta_move(), _8164_start_tr_move(): Refer to section 6.6 X _8164_motion_done(): Refer to section 6.11 X _8164_set_feedback_src(): Refer to section 6.4 X _8164_set_move_ratio(): Refer to section 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 transition to constant velocity produce less wear and tear than a trapezoidal profile motion. The smoother performance increases the life of the motor and the mechanics of the system.
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. Special case: If you want to disable the linear region, the VSacc/VSdec must be assigned 0 rather than 0.5 (MaxVel-StrVel).
Related functions: X _8164_start_sr_move(),_8164_start_sa_move(): Refer to section 6.6 X _8164_motion_done(): Refer to section 6.11 X _8164_set_feedback_src(): Refer to section 6.4 X _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 Scurve motion) and constant velocity mode. 4.1.
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. The speed ratio along X-axis and Y-axis is (∆X: ∆Y), respectively, 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.
_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.
The speed ratio along X-axis, Y-axis, and Z-axis is (∆X: ∆Y: ∆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 maximum velocity, MaxVel. Both trapezoidal and S-curve profiles are available. Example _8164_start_tr_line3(….,1000.0 /*∆X */ , 2000.0/*∆Y */, 3000.0 / *DistZ*/, 100.0 /*StrVel*/, 5000.0 /* MaxVel*/, 0.1/*sec*/, 0.
a – Absolute motion 4-axis linear interpolation With 4-axis linear interpolation, the speed ratio along X-axis, Yaxis, Z-axis and U-axis is (∆X: ∆Y: ∆Z: ∆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.
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 simultaneously start from initial point, (0,0) and stop at end point,(1800,600). The path 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.
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. _8164_start_r_arc2(),_8164_start_a_arc2(): Refer to section 6.
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 time Relationship between velocity and acceleration The maximum velocity parameter of a motion function will eventually 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 maximum velocity value to match the smaller acceleration time is required. Function _8164_fix_speed_range() will provide such operation.
_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); The value miniAccT will be 0.
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, Target T); Related functions: X _8164_fix_speed_range(), _8164_unfix_speed_range(),_8164_verify_speed() Refer to section 6.
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: SCurve) 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 single axis preset motion: 1) _8164_set_continuous_move(0, 1) It enables the continuous move function by keeping current position in internal variable.
The following diagram shows the register data flow of the card. 1. The first motion is executed and the CPU writes corresponding 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. 3. The second function is called. The CPU writes the corresponding values into pre-register2. _8164_start_tr_move(0,20000.0,100.0,30000.0,0.0,0.2) 4.
ASIC. Data in Pre-Register2 is then moved to PreRegister1. 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. 1. (If under DOS): Enable the interrupt service using _8164_int_contol() (If under Windows): Enable the interrupt service using _8164_int_contol() and _8164_int_enable(). 2.
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. There are several methods to achieve this. The easiest way is to set the deceleration/ acceleration time to 0.
Explanation of example: When these three motions ARE executed sequentially, the 1st occupies the Register and is executed immediately; the 2nd occupies Pre-Register1 and waits for completion of the 1st motion. The 3rd occupies Pre-Register2 and waits for completion of the 2nd motion. Since the 1st motion has a 0 deceleration time and the 2nd motion is an arc of constant velocity, which is the same as the max_vel of the 1st, the 8164 will output a constant frequency at intersections between them. 1.
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 continuously sent without slowing down by INP between every motion. Examples of continuous motion The following are examples of continuous motion: 1. Single axes continuous motion: Changing velocity at preset points.
2. 2-axis continuous interpolation: This example demonstrates how to use continuous motion function 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: X _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. After completion of home move, it is necessary to keep in mind that all related position information should be reset to be 0.
home_mode=0: ORG > Slow down > Stop X When SD (Ramp-down signal) is inactive. X 96 When SD (Ramp-down signal) is active.
Operation Theory 97
98 Operation Theory
Operation Theory 99
100 Operation Theory
Operation Theory 101
Relative Functions: X 102 _8164_set_home_config(), _8164_home_move(), _8164_set_fa_speed(), _8164_escape_home(), Refer to section 6.9.
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() is set, without calling _8164_home_move() but use _8164_home_search() to perform this function. The following illustration shows an example of home mode 2. The ORG offset must not be zero. Suggested value is the double length of ORG area: .
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. This mode is effective when the _8164_pulser_vmove(), _8164_pulser_pmove(), or _8164_pulser_home_move() command has been called. To terminate the command use the _8164_sd_stop() or_8164_emg_stop() command.
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}; I16 MaxV[3]={10000,20000,50000}; I16 Tacc[3]={0.02, 0.02, 0.02}; I16 Tdec[3]={0.03, 0.03, 0.
4. Immediately start when other axis’ synchronous condition is satisfied. 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.
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. General purpose means that the processing of the signal is not a hardware built-in procedure.
_8164_set_inp(). The INP signal status can be monitored by software with the function: _8164_get_io_status(). Related functions: 108 X _8164_set_inp(): Refer to section 6.12 X _8164_get_io_status(): Refer to section 6.13 X _8164_motion_done(): Refer to section 6.
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 servomotor driver. The ALM signal is an output signal from servomotor driver. Usually, it is designated to indicate when something is wrong with the driver or motor. The ALM pin receives the alarm signal output from the servo driver. The signal immediately stops the card from generating any further pulses or stops it after deceleration.
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 situations: 1. Home return is completed 2. The end-limit switch is active 3. An alarm signal stops the OUT and DIR signals 4.
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. The SVON signal is controlled by the software function _8164_Set_Servo(). RDY pins are dedicated for digital input usage.
4.3 The limit switch interface and I/O status In this section, the following I/O signal operations are described. X SD/PCS: Ramping Down and Position Change sensor X ±EL: End-limit sensor X ORG: Origin position In any operation mode, if an ±EL signal is active during any moving condition, it causes the 8164 to stop automatically outputting pulses. If an SD signal is active during moving conditions, it causes the 8164 to decelerate.
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: X _8164_set_sd_pin(),_8164_set_pcs_logic(): Refer to section 6.5 X _8164_set_sd(): Refer to section 6.12 X _8164_get_io_status(): Refer to section 6.
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) direction. MEL signal indicates the end-limit in negative (minus) direction.
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 in the function _8164_set_home_config(). The logic polarity of the ORG signal level or latched input mode is also selectable using this function as well.
4.4 Counters There are four counters for each card axis: X Command position counter: counts the number of output pulses X Feedback position counter: counts the number of input pulses X Position error counter: counts the error between command and feedback pulse numbers. X General purpose counter: The source can be configured as pulse output, feedback pulse, manual pulser, or CLK/2. X Target position recorder, a software-maintained target position recorder, is discussed. 4.4.
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; 90° phase shifted signals (AB phase mode). The 90° phase shifted signals maybe multiplied by a factor of 1, 2 or 4. 4x AB phase mode is the most commonly used in incremental encoder inputs.
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 programmable using software function _8164_set_home_config(). The EZ signals status of the four axes can be monitored by get_io_status().
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. Clock – an accurate timer (9.8 MHz) The default setting of the general purpose counter is set to manual pulse. (Refer to section 4.1.9 for a detailed explanation of manual pulsing). To change the source type, use the function _8164_set_general_counter().
Counter Description Command Counts the number of output pulses Feedback Counter Source Pulse output counts the EA/EB or number of Pulse output input pulses Position error Counts the error between command and feedback pulse General Purpose General Purpose counter Operation Theory Function Function description Set a new _8164_set_command value for command position Read current _8164_get_command command position _8164_set_pls_iptmo de Select the input modes of EA/ EB _8164_set_feedback _src S
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. Every time a new motion command is executed, the displacement is automatically added to the target position recorder.
4.5 Multiple PCI-8164 Card Operation (PCI-8164 Only) The software function library can support a maximum of 12 PCI8164 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. The base address and IRQ settings assigned by the BIOS can view by using the Motion Creator Tool.
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. Carefully study all constraints before implementing the on-the-fly function. 4.6.1 Change speed on the fly The change speed on the fly function is only applicable for single axis motion.
_8164_fix_speed_range() is necessary before any _8164_v_change() function, and _8164_unfix_speed_range() releases the speed range constrained by _8164_fix_speed_range(). The function _8164_cmp_v_change() almost has the same function as _8164_v_change(), except _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. The last four functions are relatively easy to understand and use.
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). It causes axis 0 to move for 10000 pulses, and the maximum velocity is 1000 PPS. At 5000 pulses, _8164_v_change(0,NewVel,Tacc) is applied.
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 deceleration time is not guaranteed. Example: There are three speed change sensors during an absolute move for 200000 pulses. Initial maximum speed is 10000 pps. Change to 25000 pps if Sensor 1 is touched. Change to 50000 pps if Sensor 2 is touched. Change to 100000 pps if Sensor 3 is touched.
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.
4.6.2 Change position on the fly When operating in single-axis absolute pre-set motion, it is possible to change the target position during moving by using the function _8164_p_change(). Theory of _8164_p_change(): The _8164_p_change() is only applicable for the _8164_start_ta_move(), and _8164_start_sa_move() functions. This function changes the target position, defined originally by these two functions.
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(), and _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 and current position where _8164_p_change() is executed because the 8164 needs enough space to finish deceleration. For example: A trapezoidal absolute motion is applied: _8164_start_ta_move(0,10000,0,1000,0.
NewPos CurrentPos OK / Error Note 5000 4000 OK 5000 4501 Error 5000 5000 Error 5000 5499 Error 5000 6000 OK Go back 5000 9499 OK Go back 5000 9500 Error 5000 9999 Error Related function: X _8164_p_change(): refer to section 6.
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. The latch function is used to capture values on all 4 counters (refer to section 4.4) at the instant the latch signal is activated.
Comparator 4 is a general purpose comparator, which will generate 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 are set by the 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 function. 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. The comparing condition consists of two parts, the first is the value to be compared, and the second is the comparing mode.
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 output of the 8164. An image of the moving object is easily obtained.
Users can use this function to check if auto-trigger is running.
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. This value must be far enough from the table’s stroke. If using _build_compare_function(), a dummy “after-final” point is automatically loaded.
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 movement.
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 PC. The parameter, “intFlag,” of the software function _8164_int_control(), can enable/disable the interrupt service. After a interrupt occurs, the function _8164_get_int_status() is used to receive the INT status, which contains information about the INT signal. The INT status of the 8164 comprises of two independent parts: error_int_status and event_int_status.
event_int_status: can not be masked if interrupt service is activated.
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. Define a Global Value to deal with interrupt events. Each event is linked to an axis HANDLE hEvent[4]; 2.
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. Since the PCI bus has the ability to do IRQ sharing when multiple cards are installed, each card must have a corresponding ISR.
_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); } else _8164_not_my_irq
void void void void void void void interrupt interrupt interrupt interrupt interrupt interrupt interrupt _8164_isr5(void){} _8164_isr6(void){} _8164_isr7(void){} _8164_isr8(void){} _8164_isr9(void){} _8164_isra(void){} _8164_isrb(void){} Related functions: X _8164_int_control(), _8164_set_int_factor(), _8164_int_enable(), _8164_int_disable(), _8164_get_int_status(), _8164_link_interrupt(), X _8164_get_int_type(), _8164_enter_isr(), _8164_leave_isr() X _8164_get_event_int(), _8164_get_error_int(), _8
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 programmed as input or output. These trigger channels are for interboard 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.
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 output. There is no dedicated channel for these two signals. Any sources active will force all of the PXI_TRG output.
5 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 system that uses the PCI-/MPC-/PXI-8164 cards.
5.1 Execute Motion Creator After installing the software drivers for the card in Windows® 95/ 98/NT/2000/XP, the motion creator program is located at \PCI-Motion\MotionCreator. To launch the program, doubleclick on the executable file or click Start > Program Files > PCIMotion > MotionCreator.
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. Motion Creator enables you to save settings and configurations for the card(s). Saved configurations are automatically loaded the next time Motion Creator is launched. The 8164.ini and 8164MC.ini files in Windows root directory saves all settings and configurations. 3.
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.
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. ERC Logic and Active timing: Selects the Logic and Active timing of the ERC signal. The related function call is _8164_set_erc(). 4. EL Response mode: Selects the response mode of the EL signal.
8. LTC Logic: Selects the logic of the LTC signal. The related function call is _8164_set_ltc_logic(). 9. Buttons: 154 Z Next Axis: Changes the operating axis. Z Save Config: Saves current configuration to 8164.ini. Z Operate: Go to the operation menu. Refer to section 5.3.4. Z Config Pulse & INT: Go to the Pulse I/O and Interrupt Configuration menu. Refer to section 5.3.3. Z Back: Returns to the main menu.
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). The related function calls are _8164_set_pls_iptmode(), _8164_set_feedback_src(). 3. INT Factor: Selects factors to initiate the event int.
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: Z Command: displays the value of the command counter. The related function is _8164_get_command(). Z Feedback: displays the value of the feedback position counter. The related function is _8164_get_position() Z Pos Error: displays the value of the position error counter.
fied value. The related functions are: Z _8164_set_position() Z _8164_set_command() Z _8164_reset_error_counter() Z _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: Z Event: displays the event_int_status (in hexadecimal). The related function is _8164_get_int_status(). Z Error: displays the error_int_status (in hexadecimal). The related function is _8164_get_int_status().
7. Operation Mode: Select operation mode. 158 Z Absolute Mode: Sets the Position1 and Position2 as absolution target positions for motion. The related functions are _8164_start_ta_move(), _8164_start_sa_move(). Z Relative Mode: Uses Distance as relative displacement for motion. The related function is _8164_start_tr_move(), _8164_start_sr_move(). Z Cont. Move: Velocity motion mode. The related function is _8164_tv_move(), _8164_start_sv_move(). Z Manual Pulser Move: Manual Pulse motion.
Z 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). This is only available when Relative Mode or Absolute Mode is selected. 11. Vel.
100.0. In Cont. Move, both the value and sign are effective. –100.0 means 100.0 in the minus direction. Z 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. In Cont. Move, both the value and sign is effective. –5000.0 means 5000.0 in the minus direction. Z Accel. Time: Sets the acceleration time in units of second. Z Decel. Time: Sets the deceleration time in units of second.
Z In Manual Pulser Move, this causes the axis to go into pulse move. The speed limit is the value set by Maximum Velocity. Z Right play button: Click this button to let the card start to outlet pulses according to previous setting. Z In Absolute Mode, this causes the axis to move to position. Z In Relative Mode, this causes the axis to move backwards. Z In Cont. Move, this causes the axis to start to move according to the velocity setting, but in the opposite direction.
20.Buttons: 162 Z Next Axis: Changes the operating axis. Z Save Config: Saves the current configuration to 8164.ini. Z Config Pulse & INT: Go to the Pulse IO and Interrupt Configuration menu. Refer to section 5.3.3 Z Config Interface I/O: Go to the Interface I/O Configuration menu. Refer to section 5.3.2 Z Back: Return to the main menu.
6 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. 6.1 List of Functions Initialization Section 6.
Velocity mode motion Section 6.
Linear Interpolated Motion Section 6.
Function Name Description _8164_start_sr_line4 Begin a relative 4-axis linear interpolation with Scurve profile _8164_start_ta_line4 Begin an absolute 4-axis linear interpolation with trapezoidal profile _8164_start_sa_line4 Begin an absolute 4-axis linear interpolation with Scurve profile _8164_set_axis_option Choose interpolation speed mode 166 Function Library
Circular Interpolation Motion Section 6.
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.
Motion I/O Monitoring Section 6.13 Function Name _8164_get_io_status Description Get all the motion I/O status of 8164 Interrupt Control Section 6.
Position Control and Counters Section 6.
Position Compare and Latch Section 6.
Multiple Axes Simultaneous Operation Section 6.
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.
6.2 C/C++ Programming Library This section discusses the functions in detail. The function prototypes 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.
6.3 Initialization @ Name _8164_initial – Card Initialization _8164_initialx – Card Initialization with I/O base address and IRQ channel _8164_close – Card Close _8164_get_base_addr – Get the base address of 8164_ _8164_get_irq_channel – Get the 8164 card’s IRQ number _8164_delay_time – delay execution of program for specified time in units of ms. _8164_config_from_file – Configure 8164 card according to configuration file i.e. 8164.ini.
_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 correctly. After pressing the save config button, the configuration is saved as 8164.ini in the Windows directory. By specifying it in the parameter, the configuration is automatically loaded.
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 U32 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, base_addr As Integer) A
@ Return Code ERR_NoError ERR_NoCardFound ERR_PCIBiosNotExist ERR_ConigFileOpenError 178 Function Library
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 feedback pulse input @ Description _8164_set_pls_outmode: Configures the output modes of command pulses. There are six modes for command pulse output. _8164_set_pls_iptmode: Configures the input modes of external feedback pulses.
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.
Src: Counter source Value Meaning 0 External Feedback 1 Command pulse @ Return Code ERR_NoError Function Library 181
6.
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. Note: The velocity profile is decided by original motion profile.
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
@ 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. Note: SVacc = 0, for pure S-Curve NewVel: New velocity in units of pulse per second Tdec: specified deceleration time in units of second *Speed: Variable to save current speed 6553500).
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.
@ 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 MaxVel, and the Tacc, Tdec, VSacc, and VSdec become shorter while dV/dt(acceleration / deceleration) and d(dV/dt)/dt (jerk) remain unchanged.
Configures the scale factors for the specified axis. Usually, the axes only need scale factors if their mechanical resolutions are different. 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. Refer to the function limitations on section 4.6.2 before using. _8164_set_pcs_logic: Sets the logic of Position Change Signal (pcs). The PCS shares the same pin with the SD signal.
_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. The FA speed is also used in backlash compensation.
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, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Dou
@ 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 SVacc: Specified velocity interval in which S-curve acceleration is performed.
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 192 Function Library
6.
_8164_start_sa_line3 – Begin an absolute 3-axis linear interpolation with S-curve profile, _8164_start_tr_line4 – Begin a relative 4-axis linear interpolation with trapezoidal profile, _8164_start_sr_line4 – Begin a relative 4-axis linear interpolation with S-curve profile _8164_start_ta_line4 – Begin an absolute 4-axis linear interpolation with trapezoidal profile _8164_start_sa_line4 – Begin an absolute 4-axis linear interpolation with S-curve profile _8164_set_axis_option – Choose the interpolation speed
@ Syntax C/C++ (DOS, Windows 95/NT/2K/XP) I16 _8164_start_tr_move_xy(I16 CardNo, F64 DistX, F64 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8164_start_ta_move_xy(I16 CardNo, F64 PosX, F64 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8164_start_sr_move_xy(I16 CardNo, F64 DistX, F64 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8164_start_sa_move_xy(I16 CardNo, F64 PosX, F64 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8
I16 _8164_start_tr_line3(I16 CardNo, I16 *AxisArray, F64 DistX, F64 DistY, F64 DistZ, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8164_start_ta_line3(I16 CardNo, I16 *AxisArray, F64 PosX, F64 PosY, F64 PosZ, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8164_start_sr_line3(I16 CardNo, I16 *AxisArray, F64 DistX, F64 DistY, F64 DistZ, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8164_start_sa_line3(I16 CardNo, I16 *AxisArray, F64 PosX, F64 PosY, F64 PosZ, F64 StrVel, F64 M
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 Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_8164_start_tr_move_zu (ByV
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, AxisArray As Integer, ByVal PosX As Double, ByVal PosY As Double, ByVal StrVel As Double, ByVal MaxVel As Double
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 B_8164_start_sr_line4 (ByVal CardNo As Integer, ByVal DistX As Double, ByVal DistY As Double, ByVal DistZ As Double, ByVal DistU As Double, ByVal StrVel As Dou
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. X Note: SVacc = 0, for pure S-Curve SVdec: specified velocity interval in which S-curve deceleration is performed. X Note: SVdec = 0, for pure S-Curve AxisArray: Array of axis number to perform interpolation.
6.
_8164_start_ta_arc2 – Begin a T-curve absolute circular interpolation _8164_start_sr_arc2 – Begin a S-curve relative circular interpolation _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 – Begin a T-curve relative circular interpolation _8164_start_ta_arc_zu – Begin a T-curve absolute circular interpolation _8164_start_sr
@ Description Function Relative / Speed Absolute Profile Target Axes Hardware version bit 12 _8164_start_r_arc_xy R Flat Axes 0 & 1 0 or 1 _8164_start_a_arc_xy A Flat Axes 0 & 1 0 or 1 _8164_start_r_arc_zu R Flat Axes 2 & 3 0 or 1 _8164_start_a_arc_zu A Flat Axes 2 & 3 0 or 1 _8164_start_r_arc2 R Flat Any 2 of 4 0 or 1 _8164_start_a_arc2 A Flat Any 2 of 4 0 or 1 _8164_start_tr_arc_xyu R T-curve Axes 0 & 1 0 or 1 _8164_start_ta_arc_xyu A T-Curve Axes 0 & 1 0 or 1 _8
I16 _8164_start_r_arc2(I16 CardNo, I16 *AxisArray, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy, I16 DIR, F64 MaxVel); I16 _8164_start_a_arc2(I16 CardNo, I16 *AxisArray, F64 Cx, F64 Cy, F64 Ex, F64 Ey, I16 DIR, F64 MaxVel); I16 _8164_start_tr_arc_xyu(I16 CardNo, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy, I16 DIR, F64 StrVel, F64 MaxVel, F64 Tacc); I16 _8164_start_ta_arc_xyu(I16 CardNo, F64 Cx, F64 Cy, F64 Ex, F64 Ey, I16 DIR, F64 StrVel, F64 MaxVel, F64 Tacc); I16 _8164_start_sr_arc_x
I16 _8164_start_sr_arc2(I16 CardNo, I16 *AxisArray, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy, I16 DIR, F64 StrVel,F64 MaxVel, F64 Tacc,F64 Tdec,F64 SVacc,F64 SVdec); I16 _8164_start_sa_arc2(I16 CardNo, I16 *AxisArray, F64 Cx, F64 Cy, F64 Ex, F64 Ey, I16 DIR, F64 StrVel, F64 MaxVel, F64 Tacc,F64 Tdec,F64 SVacc,F64 SVdec); I16 _8164_start_tr_arc_xy(I16 CardNo, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy, I16 DIR, F64 StrVel,F64 MaxVel,F64 Tacc,F64 Tdec); I16 _8164_start_ta_arc_xy(I16
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, ByVal MaxVel As Double) As Integer B_8164_start_a_arc_zu (ByVal CardNo As Integer, ByVal Cx As Double, ByVal Cy As Dou
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, ByVal Ex As Double, ByVal Ey As Double, ByVal DIR As Integer, ByVal StrVel As Double, ByVal MaxVel A
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 B_8164_start_sr_arc2 (ByVal CardNo As Integer, AxisArray As Double, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByV
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 B_8164_start_sr_arc_xy (ByVal CardNo As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal Offset
@ 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 DIR: Specified direction of arc, CW:0 , CCW:1 StrVel: Starting velocity of a velocity profile in
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. Refer to Section 4.1.8 for the setting of home_mode control.
@ Syntax C/C++ (DOS, Windows 95/NT/2K/XP) I16 _8164_set_home_config(I16 AxisNo, I16 home_mode, I16 org_logic, I16 ez_logic, I16 ez_count, I16 erc_out); I16 _8164_home_move(I16 AxisNo, F64 StrVel, F64 MaxVel, F64 Tacc); I16 _8164_escape_home(I16 AxisNo, F64 SrVel,F64 MaxVel,F64 Tacc); I16 _8164_home_search(I16 AxisNo, F64 StrVel, F64 MaxVel, F64 Tacc, F64 ORGOffset); Visual Basic (Windows 95/NT/2K/XP) B_8164_set_home_config (ByVal AxisNo As Integer, ByVal home_mode As Integer, ByVal org_logic As Integer, By
@ Argument AxisNo: Designated axis number to configure and perform home return home_mode: Stopping modes for home return, 0-12 X (Please refer to section 4.1.8) org_logic: Action logic configuration for ORG X org_logic=0, active low X org_logic=1, active high EZ_logic: Action logic configuration for E X EZ_logic=0, active low X EZ_logic=1, active high ez_count: 0-15 (Refer to section 4.1.
6.
_8164_set_pulser_ratio: Sets the manual pulse ratio for actual output pulse rate. The formula for manual pulse output rate is: X Output Pulse Count = Input Pulse Count * (PMG+1) * [(PDV+1)/2048] X The PDV=0-2047 Divide Factor X The PMG=0-31 Multiplication Factor _8164_pulser_r_line2: Pulser mode for 2-axis linear interpolation (relative mode only).
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 As Double) As Integer B_8164_set_pulser_ratio(ByVal AxisNo As Integer, ByV
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 X HomeType =0, Command Origin.(that means axis stops when command counter becomes ‘0’) X 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 interrupt status in section 6.14.
@ Return Value 0 Under Stopped condition 1 Reserved 2 Wait CSTA (Synchronous start signal) 3 Wait Internal sync.
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 – Set SD logic and operating mode @ Description _8164_set_alm: Sets the active logic of the ALARM signal input from the servo driver. Two reacting modes are available when the ALARM signal is active.
@ Syntax C/C++ (DOS, Windows 95/NT/2K/XP) I16 _8164_set_alm(I16 AxisNo, I16 alm_logic, I16 alm_mode); I16 _8164_set_el(I16 AxisNo, I16 el_mode); I16 _8164_set_inp(I16 AxisNo, I16 inp_enable, I16 inp_logic); I16 _8164_set_erc(I16 AxisNo, I16 erc_logic, I16 erc_on_time); I16 _8164_set_servo(I16 AxisNo, I16 on_off); I16 _8164_set_sd(I16 AxisNo, I16 enable, I16 sd_logic, I16 sd_latch, I16 sd_mode); Visual Basic (Windows 95/NT/2K/XP) B_8164_set_alm (ByVal AxisNo As Integer, ByVal alm_logic As Integer, ByVal alm
alm_mode: Reacting modes when receiving an ALARM signal X alm_mode=0, motor immediately stops (default) X alm_mode=1, motor decelerates then stops. el_mode: Reacting modes when receiving an EL signal X el_mode=0, motor immediately stops (default) X el_mode=1, motor decelerates then stops.
sd_logic: Set the active logic for the SD signal X sd_logic=0, active LOW X sd_logic=1, active HIGH sd_latch: Set the latch control for the SD signal X sd_latch=0, do not latch X sd_latch=1, latch sd_mode: Set the reacting mode of the SD signal X sd_mode=0, slow down only X sd_mode=1, slow down then stop el_logic: Set EL as normal low (0) or normal high(1) @ Return Code ERR_NoError Function Library 223
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.
@ 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.
6.
The INT status of 8164 is composed of two independent parts: error_int_status and event_int_status. The 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. Below is the definition of these two int_status. By setting the relative bit as 1, the card can generate INT signal to the host computer.
_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. The first one is for error_int_status, which is not able to mask by _8164_set_int_factor().
The second is for event_int_status, which can be masked by _8164_set_int_factor().
_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. _8164_get_error_int: (DOS only) This function is used to get error_int_status.
@ Syntax C/C++ (DOS) I16 _8164_int_control(U16 cardNo, U16 intFlag ); I16 _8164_set_int_factor(I16 AxisNo, U32 int_factor ); I16 _8164_get_int_type(I16 AxisNo, U16 *int_type); I16 _8164_enter_isr(I16 AxisNo); I16 _8164_leave_isr(I16 AxisNo); I16 _8164_get_event_int(I16 AxisNo, U32 *event_int); I16 _8164_get_error_int(I16 AxisNo, U32 *error_int); I16 _8164_get_irq_status(U16 cardNo, U16 *sts); I16 _8164_not_my_irq(I16 CardNo); void interrupt _8164_isr0 (void); void interrupt _8164_isr1 (void); void interrupt
C/C++ (Windows 95/98/NT) I16 _8164_int_control(U16 cardNo, U16 intFlag ); I16 _8164_set_int_factor(I16 AxisNo, U32 int_factor ); I16 _8164_int_enable(I16 CardNo, HANDLE *phEvent); I16 _8164_int_disable(I16 CardNo); I16 _8164_get_int_status(I16 AxisNo, U32 *error_int_status, U32 *event_int_status ); I16 _8164_link_interrupt(I16 CardNo, void ( __stdcall *callbackAddr)(I16 IntAxisNoInCard)); I16 _8164_set_axis_stop_int(I16 AxisNo, I16 axis_stop_int); I16 _8164_mask_axis_stop_int(I16 AxisNo, I16 int_mask); Vis
@ Argument cardNo: card number 0,1,2,3… AxisNo: axis number 0,1,2,3,4… intFlag: int flag, 0 or 1 (0: Disable, 1:Enable) int_factor: interrupt factor, refer to previous table *int_type: Interrupt type, (1: error int, 2: event int, 3: both happened) *event_int: event_int_status, refer to previous table *error_int: error_int_status, refer to previous table *sts: (0: not this card’s IRQ, 1: this card’s IRQ) *phEvent: event handler (Windows) *error_int_status: refer to previous table *event_int_status: refer to
6.
@ 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. _8164_set_position(): Changes the feedback position counter to the specified value.
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 is set by function _8164_set_position(). _8164_get_rest_command(): Reads the remaining pulse counts until the end of the current motion. _8164_check_rdp(): Reads the ramping down point data. The ramping down point is the position where deceleration starts.
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 Integer B_8164_reset_error_counter (ByVal AxisNo As Integer) As Integer B_8164_get_general_counter (ByV
@ Argument AxisNo: Axis number Pos, *Pos: Feedback position counter value, X range: -134217728-134217727 cmd, *cmd: Command position counter value, X range: -134217728-134217727 error_counter, *error_counter: Position error counter value, X range: -32768-32767 T_pos, *T_pos: Target position recorder value, X T_range: -134217728-134217727 CntValue, *CntValue: General counter value, X range: -134217728-134217727 rest_command, *rest_command: Rest pulse count till end, X range: -134217728-134217727
6.
@ 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. Once enabled, the action of soft limit will be exactly the same as physical limit.
_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. _8164_check_compare_status: Obtains the status of all comparators. When some comparators come into existence, the relative bits of cmp_sts will become ‘1,’ otherwise 0.
The compare data is also set by _8164_set_general_comparator(), while the remain distance, 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. Once it is set as a rotary counter, the value will be reset upon the condition matched.
I16 _8164_cmp_v_change(I16 AxisNo, F64 Res_dist, F64 oldvel, F64 newvel, F64 AccTime) I16 _8164_force_comp_output(I16 AxisNo); I16 _8164_set_compare_mode(I16 AxisNo, I16 CompNo, I16 CmpSrc, I16 CmpMethod, I16 CmpAction); I16 _8164_set_compare_data(I16 AxisNo, I16 CompNo, F64 Pos); I16 _8164_set_rotary_counter(I16 AxisNo ,I16 reset_src); C/C++ (Windows 95/98/NT) I16 _8164_build_compare_function(I16 AxisNo, F64 Start, F64 End, F64 Interval, I16 Device); I16 _8164_build_compare_table(I16 AxisNo, F64 *TableArr
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 B_8164_set_auto_compare (ByVal AxisNo As Integer, ByVal SelectSrc As Integer) As Integer
@ 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 X LatchNo = 1 , Command counter X LatchNo = 2 , Feedback counter X LatchNo = 3 , Error Counter X LatchNo = 4 , General Counter Pos: Latched counter value, PLimit: Soft limit value, positive direction NLimit: Soft limit value, negative direction Action: The reacting method of soft limit X Action =0, INT only X Action =1, Immed
CmpSrc: The comparing source counter X CmpSrc =0, Command Counter X CmpSrc =1, Feedback Counter X CmpSrc =2, Error Counter X CmpSrc =3, General Counter CmpMethod: The comparing method X CmpMethod =0, No compare X CmpMethod =1, CmpValue=Counter (Directionless) X CmpMethod =2, CmpValue=Counter (+Dir) X CmpMethod =3, CmpValue=Counter (-Dir) X CmpMethod =4, CmpValue>Counter X CmpMethod =5, CmpValue
CompType: Selection of type of comparator X CompType =1, + Soft Limit X CompType =2, -Soft Limit X CompType =3, Error Counter Comparator Value X CompType =4, General Comparator Value X CompType =5, Trigger Output Comparator Value cmp_sts: status of comparator Bit Meaning 0 +Softlimit On 1 -SoftLimit On 2 Error counter comparator On 3 General comparator On 4 Trigger comparator On (for 0 , 1 axis only) SelectSrc: The comparing data source X SelectSrc =0, disable auto compare X SelectS
oldvel: Velocity at compare point. Must be specified manually.
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 command 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.
@ Argument AxisNo: Designated axis number conti_flag: Flag for continuous motion X conti_flag = 0, declare continuous motion sequence is finished X conti_flag = 1, declare continuous motion sequence is started @ Return Value ERR_NoError Return value of _8164_check_continuous_buffer(): X Hardware version bit 12=0 Z 0: command register 2 is empty Z 1: command register 2 is in-use Return value of _8164_check_continuous_buffer(): X 250 Hardware version bit 12=1 Z 0: all command registers are empty
6.18 Multiple Axes Simultaneous Operation @ Name _8164_set_tr_move_all – Multi-axis simultaneous operation setup. _8164_set_ta_move_all – Multi-axis simultaneous operation setup. _8164_set_sr_move_all – Multi-axis simultaneous operation setup. _8164_set_sa_move_all – Multi-axis simultaneous operation setup. _8164_start_move_all – Begin a multi-axis trapezoidal profile motion _8164_stop_move_all – Simultaneously stop Multi-axis motion _8164_set_sync_option – Other sync.
@ Description These functions are related to simultaneous operations of multiaxes 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().
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. When the _8164_stop_move_all() or CSTOP signal is used, the axes stop according to this setting.
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 double, TaccA As doubl
@ Argument TotalAxes: Number of axes for simultaneous motion, 1-48. *AxisArray: Specified axes number array designated to move.
stop_mode: X 0: immediate stop X 1: slow down to stop mode: X 0=Off X 1-5=compare 1-5 active X 8=Acc start X 9=Acc end X 10=Dec start X 11=Dec end Sync_axis: 0-3, the axis index in the card.
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.
@ Argument CardNo: Designated card number Ch_No: Designated channel number 0 - 5 Value: On-Off Value for output X Value =0, output OFF X Value =1, output ON dio_status: Digital output status X bit0-bit5 for channel 0 - 5, respectively @ Return Value ERR_NoError ERR_DioNoError 258 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. _8164_read_di(): Reads back an 8-bit value once from eight input channels. _8164_write_axis_do(): Controls the axis’ general digital output channel.
@ Argument CardNo: Designated card number AxisNo: Designated axis number Value: Value for output X Bit value =0, output OFF X 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 260 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 status 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.
@ 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
@ 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: X 0 = Software control X 1 = AP6X X 2 = AP6Y X 3 = AP6Z X 4 = AP6U X 5 = CMP1 X 6 = CMP2 pxi_channel: X PXI_TRG value bit0-7 X STAR_TRG bit8 @ Return Value ERR_NoError ERR_CardTypeWrong ERR_CardNoError ERR_PXISourceWrong ERR_PXICha
7 Connection Example This chapter illustrates connection examples between the PCI-/ MPC-/PXI-8164 card and servo drivers or stepping drivers. 7.1 General Wiring Description CN1: Receives +24V power from the external power supply. (PCI8164 only) CN2: Main connection between the PCI-8164 and the pulse input servo driver or stepping driver. CN3: Receives pulse commands from manual pulse in the PCI8164 card.
Figure 7-1 illustrates the integration of the PCI-8164 card with a physical system.
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. Other modes can be set using the available software functions. 3. Most general purpose servomotor drivers can operate in Torque Mode, Velocity Mode, or Position Mode.
Figure 7-2: Connection of PCI-8164 with Panasonic Driver 268 Connection Example
Wiring of PCI-8164 with SANYO AC Servo PY2 PCI_8164 Axis 1 3 4 5 6 98 99 100 7 8 9 10 11 12 13 14 15 16 17 18 19 20 37 38 39 40 41 Servo Driver CN1 OUT1 + OUT1 DIR + DIR EX GND EX +24V EX +24V SVON 1 ERC 1 ALM 1 INP 1 RDY 1 EX GND EA1 + EA1 EB1 + EB1 EZ1 + EZ1 EX +5V EX GND PEL1 MEL1 PSD1 MSD1 ORG1 PPC PPC NPC NPC DC24V COM DC24V DC24V Servo ON NROT ALM1 General Out PROT 26 27 28 29 25 23 49 37 33 43 39 32 Encoder A Encoder A Encoder B Encoder B Encoder C Encoder C 3 4 5 6 7 8 E M SANYO BL Super P
7.3 Wiring with DIN-814M WARNING 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. NOTES 1. Servo and stepper: The DIN-814M provides two connection methods for each axis: CNA and CNB connectors for Mitsubishi J2S series servo drivers, and an SJ connector for stepping drivers.
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 Mitsubishi’s servo driver (pin15 of CNB) as a normally closed input. Disable the signal by connecting jumpers J1-J4 of 1-2 to GND.
CNB1-CNB4 (Mitsubishi AC Servo Driver CNB Interface) No. Name 1 I/O Function IGND -- Isolated Ground 3 +24V -- 5 Servo ON I 7 SP2 I No.
HD1-HD4 (Auxiliary. Servo I/O Interface) Name I/O Function No. Name I/O +24V O Voltage output 4 EX_EMG I Servo On 5 ALM I Servo Ready 6 IGND -- Servo ON O RDY I 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) No. Name I/O Function No.
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. SJ1-4: For stepping driver, refer to the ADLINK user’s manual for wiring. 7. TD1-4: Refer to the Mitsubishi user’s manual for wiring. 8. TJ1-2: Refer to the Mitsubishi user’s manual for wiring.
7.3.
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.
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. When using PCI-8134, the PSD and MSD signals are for positive slow down and negative slow down signal, respectively. When using PCI8164, PSD is for CMP and LTC, and MSD is for SD.
7.4.2 PIN Assignment: CNIF1-CNIF4 No. Name I/O Function No.
SJ1-SJ4 No. Name I/O Function No Name I/O Function 1 OUT+ O Pulse Signal (+) 6 ALM I Servo Alarm 2 OUT- O Pulse Signal (-) 7 +5V O Voltage output 3 DIR+ O Direction Signal (+) 8 Servo ON O Servo On 4 DIR- O Direction Signal (-) 9 +5V O Voltage output 5 EZ+ I Index Signal 10 IGND -- Isolated Ground CN1 No.
7.4.3 How to wire PEL, MEL, ORG, SD, PSD, MSD (in IOIF): CMP, LTC (in IOIF) X CMP is a TTL 5V or 0V output (vs. Ext GND) X 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 information.
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.
servo drivers. The signals at CNIF# and SJ# are connected 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 representative for additional information. 3. Signals PSD# and MSD# at the connector IOIF# are assigned different names on the 8164-series motion control board. The PSD1, PSD2, PSD3, and PSD4 signals are renamed CMP1, CMP2, LTC3, and LTC4, respectively.
7.5.1 Wiring Example: PEL, MEL, ORG, SD, PSD, MSD, and Alarm Clear (at IOIF): CMP, LTC (at IOIF) Z CMP is a TTL 5V or 0V output (vs. Ext GND) Z LTC is a TTL 5V or 0V input (vs. Ext.
CNIF# and CN2 SJ: Refer to 8134/64 series user manual.
7.5.
7.5.3 PIN Assignment: CNIF1-CNIF4 No. Name I/O Function No.
SJ1-SJ4 No. Name I/O Function No. Name I/O Function 1 OUT+ O Pulse Signal (+) 6 ALM I Servo Alarm 2 OUT- O Pulse Signal (-) 7 +5V O +5V Power supply 3 DIR+ O Direction Signal (+) 8 SVON O Servo On 4 DIR- O Direction Signal (-) 9 +5V O +5V Power supply 5 EZ+ I Index Signal 10 IGND -- Isolated Ground CN1 No. Name I/O Function 1 2 EX+24V I External Power Supply Input (+24V DC ± 5%) EXGND -- External Ground.
7.
7.6.1 PIN Assignment: CNIF1-CNIF4 No. Name I/O Function No. 1 3 5 EA- I 7 EB- I Name I/O P15R -- 15VDC power supply IGND -- Isolated Ground Function 2 VLA O Analog speed limit 4 EA+ I Encoder A-phase(+) Encoder A-phase(-) 6 EB+ I Encoder B-phase(+) Encoder B-phase(-) 8 EZ+ I Encoder Z-phase(+) O Pulse Signal(+) 9 EZ- I Encoder Z-phase(-) 10 OUT+ 11 OUT- O Pulse Signal(-) 12 N.C 14 N.C 16 SP2 O Speed selection 2 Reverse rotation 13 N.
BH1-BH4 No. Name I/O Function No.
CN1 No.
7.
7.7.1 PIN Assignment: CNIF1-CNIF4 No. Name I/O 1 IGND -- Isolated Ground 2 IGND -- Isolated Ground 3 PL1 I Collector +12V Output 4 SEN I Reset Absolute Encoder 5 V-REF I Speed Command 6 IGND -- Isolated Ground 7 OUT+ O Pulse Signal (+) 8 OUT- O Pulse Signal (-) 9 T-REF I Torque Command 10 IGND -- Isolated Ground 11 DIR+ O Direction Signal (+) 12 DIR- O Direction Signal (-) 14 IGND -- Isolated Ground O Dev. ctr, clr.
BH1-BH4 No. Name I/O Function No.
8 Appendix 8.
296
Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the following carefully. 1. Before using ADLINK’s products please read the user manual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA application form which can be downloaded from: http:// rma.adlinktech.com/policy/. 2.
3. Our repair service is not covered by ADLINK's guarantee in the following situations: X Damage caused by not following instructions in the User's Manual. X Damage caused by carelessness on the user's part during product transportation. X Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers. X Damage caused by unsuitable storage environments (i.e. high temperatures, high humidity, or volatile chemicals).