PCI -8 1 3 4 / PCI -8 1 3 4 A 4-Axis Servo / Stepper Motion Control Card User’s Guide M anual Rev.: Revision Date: Part N o: 3 .
© Copyright 2012 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 always the most important thing for ADLINK Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. Web Site http://www.adlinktech.com Sales & Service service@adlinktech.com Technical NuDAQ nudaq@adlinktech.com Support Automation automation@adlinktech.com NuIPC nuipc@adlinktech.com NuPRO/EBC nupro@adlinktech.com TEL +886-2-82265877 FAX Address 9F, No.
Suggestions for ADLINK
Table of Contents Introduction ....................................................................1 1.1 1.2 1.3 Features ................................................................................. 4 Specifications ......................................................................... 4 Software Support ................................................................... 6 1.3.1 1.3.2 1.4 Programming Library ............................................................... 6 Motion Creator .......
3.11 Pulser Input Signals PA and PB .......................................... 28 3.12 Simultaneously Start/Stop Signals STA and STP .............. 29 Operations....................................................................31 4.1 Motion Control Modes.......................................................... 31 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.2 Motor Drive Interface ........................................................... 53 4.2.1 4.2.2 4.2.3 4.3 INP .............................
6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.16 6.17 C/C++ Programming Library ................................................ 78 Initialization .......................................................................... 79 Pulse Input / Output Configuration ...................................... 80 Continuously Motion Move .................................................. 82 Trapezoidal Motion Mode .................................................... 84 S-Curve Profile Motion..........
Appendix B: 8134.DLL vs. 8134A.DLL .....................157 Warranty Policy .........................................................
About This Guide The PCI-8134 was EOL in May, 2011. ADLINK offers the new PCI8134A as a line replacement. While most PCI-8134A functions are fully compatible with legacy PCI-8134 functions, certain differences require changes in application, as outlined in this document. Chapter1, "Introduction", gives an overview of the product features, applications, and specifications. Chapter2, "Installation", describes how to install the PCI-8134/PCI8134A.
1 Introduction The PCI-8134/PCI-8134A is a 4-axis motion control card with PCI interface. It can generate high frequency pulses to drive stepping motors and servo motors. Multiple PCI-8134/PCI-8134A cards can be used in one system. Incremental encoder interface on all four axes provide the ability to correct for positioning errors generated by inaccurate mechanical transmissions.
PCI Bus PCI Bus Controller CN3 Pulser . Input: PA,PB CN4 PCL 5023 for axes X&Y PCL 5023 for axes Z&U Simultaneousl y Ext+24V Input CN1 Isolation DC/DC Ext +5V out Pulse I/O Mechanical Interface OUT, DIR, EA, EB, EZ +EL, -EL, +SD,-SD, ORG Servo Driver Interface General Purpose I/O INP, ALM ERC SVON RDY CN2 Figure 1.
Figure 1.
1.1 • • • • • • • • • • • • • • • • Features The following lists summarize the main features of the PCI-8134 motion control system. 32-bit PCI-Bus, plug and play. 4 axes of step and direction pulse output for controlling stepping or servomotor. Maximum output frequency of 2.4 Mpps Pulse output options: OUT/DIR, CE/CCW Pulse input options: CW/CCW, AB phase x1, x2, x4 2-axis linear interpolation. 28-bit up/down counter for incremental encoder feedback.
I/O Signals: Pulse rate setting steps: 0 to 2.4Mpps. Input/Output Signals for each axis All I/O signal are optically isolated with 2500Vrms isolation voltage Command pulse output pins: OUT and DIR. Incremental encoder signals input pins: EA and EB. Encoder index signal input pin: EZ. Mechanical limit/switch signal input pins: ±EL, SD and ORG. Servomotor interface I/O pins: INP, ALM and ERC. General purpose digital output pin: SVON. General purpose digital input pin: RDY.
1.3 Software Support 1.3.1 Programming Library ® Windows XP/7 DLLs are provided for the PCI-8134 and PCI-8134A. These function libraries are shipped with the board. 1.3.2 Motion Creator This Windows-based utility, also bundled with the product, is used to set up cards, motors, and systems, and can aid in debugging hardware and software. It allows users to set I/O logic parameters for their own programs. 1.
2 Installation This chapter describes how to install the PCI-8134/PCI-8134A, according to the following procedure. • • • • • • 2.1 Check Package Contents (Section 2.1) Check the PCB (Section 2.2) Install the hardware (Section 2.3) Install the software driver (Section 2.
2.2 PCI-8134/PCI-8134A Outline Drawing Figure 2.
CN1 S1 CN3 CN4 CN2 J1 | J8 Figure 2.2 PCB Layout of the PCI-8134A CN1: External Power Input Connector CN2: Input / Output Signal Connector CN3: Manual Pulser Signal Connector CN4: Simultaneous Start / Stop Connector J1-J8: Pulse output type selection S1: Polarity of end-limited switch selection 2.3 Hardware Installation 2.3.1 Hardware configuration The PCI-8134/PCI-8134A has a plug and play PCI controller on board. The memory usage (I/O port locations) of the PCI card is assigned by system BIOS.
2.3.3 Installation Procedures Read through this manual, and setup the jumper according to your application Turn off your computer, Turn off all accessories (printer, modem, monitor, etc.) connected to computer. Remove the cover from your computer. Select a 32-bit PCI expansion slot. PCI slots are short than ISA or EISA slots and are usually white or ivory. Before handling the PCI-8134/PCI-8134A, discharge any static buildup on your body by touching the metal case of the computer.
Programming Guide Installation 2.5 1) From the ADLINK All-In-One CD Choose Driver Installation>Motion Control>PCI-8134/PCI-8134A Follow the procedures of the installer. After installation is completed, restart Windows. 2) 3) Note: Please download the latest software from the ADLINK website if necessary. 2.6 CN1 Pin Assignments: External Power Input CN1 Pin No 1 2 Note: 1. 2. 3. Name EXGND EX+24V Description Grounds of the external power.
2.7 CN2 Pin Assignments: Main connector The CN2 is the major connector for the motion control I/O signals. No. Name I/O 1 EX+5V O 2 EXGND 3 OUT1+ O 4 OUT1- 5 Function(axis/) No. Name I/O 51 EX+5V Ext. power ground 52 EXGND Pulse signal (+), 53 OUT3+ O Pulse signal (+), O Pulse signal (-), 54 OUT3- O Pulse signal (-), DIR1+ O Dir. signal (+), 55 DIR3+ O Dir. signal (+), 6 DIR1- O Dir. signal (-), 56 DIR3- O Dir.
35 EZ2+ I Encoder Z-phase (+), 85 EZ4+ I Encoder Z-phase (+), 36 EZ2- I Encoder Z-phase (-), 86 EZ4- I Encoder Z-phase (-), 37 PEL1 I End limit signal (+), 87 PEL3 I End limit signal (+), 38 MEL1 I End limit signal (-), 88 MEL3 I End limit signal (-), 39 PSD1 I Ramp-down signal (+), 89 PSD3 I Ramp-down signal (+), 40 MSD1 I Ramp-down signal (-), 90 MSD3 I Ramp-down signal (-), 41 ORG1 I I 42 EXGND Origin signal, 91 ORG3 Ext.
2.9 CN4 Pin Assignments: Simultaneous Start/Stop The signals on CN3 is for simultaneously start/stop signals for multiple axes and multiple cards. No. 1 2 3 4 5 6 Name GND STP STA STP STA +5V Function(Axis ) Bus power ground Simultaneous stop signal input/output Simultaneous start signal input/output Simultaneous stop signal input/output Simultaneous start signal input/output Bus power, +5V Note: +5V and GND pins are directly given by the PCI Bus power. 2.
Line Driver Open Collector J4 J3 J8 J7 3 2 1 J6 J5 J2 J1 Figure 2.4 Illustration of PCI-8134A jumpers 2.11 Switch Setting The switch S1 is used to set the EL limit switch’s type. The default setting of EL switch type is “normal open” type limit switch (or “A” contact type). The switch on is to use the “normal closed” type limit switch (or “B” contact type). The default setting is set as normal open type.
ON Select ‘a’ Contact EL Switch (Normal Open) Select ‘b’ Contact EL Switch (Normal Close) 1 2 3 4 Figure 2.
3 Signal Connections The signal connections of all the I/O signals are described in this chapter. Please refer the contents of this chapter before wiring the cable between the PCI-8134/PCI-8134A and the motor drivers. This chapter contains the following sections: Section 3.1 Section 3.2 Section 3.3 Section 3.4 Section 3.5 Section 3.6 Section 3.7 Section 3.8 Section 3.9 Section 3.10 Section 3.11 Section 3.
3.1 Pulse Output Signals OUT and DIR There are 4-axis pulse output signals on PCI-8134/PCI-8134A. For every axis, two pairs of OUT and DIR signals are used to send the pulse train and to indicate the direction. The OUT and DIR signals can also be programmed as CW and CCW signals pair, refer to section 4.1.1 for details of the logical characteristics of the OUT and DIR signals. In this section, the electronic characteristics of the OUT and DIR signals are shown.
For differential line driver output, close a break between 1 and 2 of J1 J2 J3 J4 J5 J6 J7 J8 Output Signal OUT1DIR1OUT2DIR2OUT3DIR3OUT4DIR4- For open collector output, close a break between 2 and 3 of: J1 J2 J3 J4 J5 J6 J7 J8 Inside PCI-8134/PCI-8134A EX+5V VCC J1~J8 CN2 3 R 2 OUT+, DIR+ 1 OUT DIR OUT-, DIR2631 EXGND from Motion ASIC The default setting of OUT and DIR signals are the as differential line driver mode. The following wiring diagram is for the OUT and DIR signals of the 4 axes.
3.2 Encoder Feedback Signals EA, EB and EZ The encoder feedback signals include the EA, EB, and EZ. Every axis has six pins for three differential pairs of phase-A (EA), phase-B (EB) and index (EZ) input. The EA and EB are used for position counting; the EZ is used for zero position index. The relative signal names, pin numbers and the axis number are shown in the following tables.
differential signal pairs will be converted to digital signal EA, EB and EZ to connect to Motion ASIC. Here are two examples of connecting the input signals with the external circuits. The input circuits can connect to the encoder or motor driver, which are equipped with: (1) differential line driver or (2) open collector output. Connection to Line Driver Output To drive the PCI-8134/PCI-8134A encoder input, the driver output must provide at least 3.
PCI-8134/PCI-8134A VDD GND EA+, EA-, R EB+, External Power for Encoder Motor Encoder / Driver With Open Collector Output EB-, A, B phase signals 3.3 Origin Signal ORG The origin signals (ORG1∼ORG4) are used as input signals for origin of the mechanism. The following table lists the relative signal name, pin number, and the axis number. CN2 Pin No 41 47 91 97 Signal Name ORG1 ORG2 ORG3 ORG4 Axis # The input circuits of the ORG signals are shown as following.
When the motion controller is operated at the home return mode, the ORG signal is used to stop the control output signals (OUT and DIR). For the detail operation of the ORG, please refer to section 4.3.3 3.4 End-Limit Signals PEL and MEL There are two end-limit signals PEL and MEL for one axis. PEL indicates end limit signal in plus direction and MEL indicates end limit signal in minus direction. The relative signal name, pin number and axis number are shown in the following table.
3.5 Ramping-down Signals PSD and MSD There are two ramping-down (Slow−Down) signals PSD and MSD for one axis. The relative signal name, pin number and axis number are shown in the following table. CN2 Pin No 39 40 45 46 89 90 95 96 Signal Name PSD1 MSD1 PSD2 MSD2 PSD3 MSD3 PSD4 MSD4 Axis # The signals connection and relative circuit diagram is shown in the following diagram. Usually, limit switches are used to generate the slow−down signals to make motor operating in a slower speed.
CN2 Pin No 10 28 60 78 Axis # Signal Name INP1 INP2 INP3 INP4 The input circuit of the INP signals are shown in the following diagram. Inside PCI-8134/PCI-8134A EX+5V CN2 R If=12mA Max. If=5mA Min. Motion ASIC INP The in-position signals are usually from servomotor drivers, which usually provide open collector output signals. The external circuit must provide at least 5 mA current sink capability to drive the INP signal active.
collector output signals. The external circuit must provide at least 5 mA current sink capability to drive the ALM signal active. For more details of the ALM operation, please refer to section 4.2.2. Inside PCI-8134/.PCI-8134A EX+5V CN2 R Motion ASIC If=12mA Max. If=5mA Min. ALM Deviation Counter Clear Signal ERC 3.8 The deviation counter clear signal (ERC) is active in the following 4 situations: 1. home return is complete; 2. the end-limit switch is active; 3.
power at 50mA driving capability. please refer to section 4.2.3. For more details of the ERC operation, Inside PCI-8134/PCI-8134A 35V 50mA Maximum CN2 ERC Motion ASIC EXGND 3.9 General-purpose Signal SVON The SVON signals can be used as servomotor-on control or generalpurpose output signals. The relative signal name, pin number and axis number are shown in the following table.
CN2 Pin No 11 29 61 71 Signal Name RDY1 RDY2 RDY3 RDY4 Axis # The input circuit of RDY signal is shown in the following diagram Inside PCI-8134/PCI-8134A EX+5V CN2 R If=12mA Max. If=5mA Min. Motion ASIC RDY 3.11 Pulser Input Signals PA and PB The PCI-8134/PCI-8134A can accept the input signals from pulser signals through the following pins of connector CN3. The pulser’s behavior is as an encoder.
VCC PA, PB PA,PB Motion ASIC If the signal voltage of pulser is not +5V or if the pulser is distantly placed, it is recommended to put a photo coupler or line driver in between. Also, +5V and GND power lines of CN3 are direct from the PCI bus. Please carefully use these signals because they are not isolated. 3.12 Simultaneously Start/Stop Signals STA and STP The PCI-8134/PCI-8134A provides the STA and STP signals, which enable simultaneous start/stop of motions on multiple axes.
PCI-8134/PCI-8134A #1 CN4 STP STA STP STA 30 • Signal Connections PCI-8134/PCI-8134A #2 CN4 STP STA STP STA PCI-8134/PCI-8134A #3 CN4 STP STA STP STA
4 Operations This chapter describes detailed operation of the PCI-8134/PCI-8134A card. Contents of the following sections are as following. Section 4.1: The motion control modes Section 4.2: The motor driver interface (INP, ERC, ALM, SVON, RDY) Section 4.3: The limit switch interface and I/O status (SD, EL, ORG) Section 4.4: The encoder feedback signals (EA, EB, EZ) Section 4.5: Multiple PCI-8134/PCI-8134A cards operation. Section 4.6: Change Speed on the Fly Section 4.7: Interrupt Control 4.
4.1.1 Pulse Command Output The PCI-8134/PCI-8134A uses pulse command to control the servo / stepper motors via the drivers. The pulse command consists of 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: set_pls_outmode() is used to program the pulse command type. The modes vs.
following diagram shows the output waveform of positive (plus,+) command OUT DIR Positive Command and negative (minus,-) command. OUT DIR Negative Command Relative Function: set_pls_optmode(): Refer to section 6.4 4.1.2 Constant Velocity Motion This mode is used to operate one axis motor at constant velocity motion. The output pulse accelerates from a starting velocity (str_vel) to the specified constant velocity (max_vel).
Velocity(pps) max_vel str_vel Time(second) Tacc v_move() 4.1.3 Tdec v_stop() Trapezoidal Motion This mode is used to move one axis motor to a specified position (or distance) with a trapezoidal velocity profile. 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.
The following diagram shows the trapezoidal profile. There are 9 relative functions. In the a_move(), ta_move() and start_a_move(), start_ta_move() functions, the absolute target position must be given in the unit of pulse. The physical length or angle of one movement is dependent on the motor driver and the mechanism (includes the motor). Since absolute move mode needs the information of current actual position, so “External encoder feedback (EA, EB pins)” must be enabled in set_cnt_src() function.
Answer: max_vel = 3600/60*2000*4 = 48000pps The reason why *4 is because there are four states per AB phase (See Figures in Section 4.4). Velocity (pps) max_vel str_vel str_vel Time (second) Tacc Tdec Usually, the axes need to set the move ratio if their mechanical resolution is different from the resolution of command pulse. For example, if an incremental type encoder is mounted on the working table to measure the actual position of moving part.
Moving part Table Motor Gear Encoder If this ratio is not set before issuing the start moving command, it will cause problems when running in “Absolute Mode”. Because the PCI-8134/PCI8134A can’t recognize the actual absolute position during motion. Relative Functions: a_move(), r_move(), t_move(), ta_move(), start_a_move(), start_r_move(), start_t_move(), start_ta_move() Refer to section 6.6. motion_done(): Refer to section 6.13. set_cnt_src(): Refer to section 6.4.
(constant jerk). Tldec: specify the time for linear deceleration section (constant deceleration). Tsdec: specify the time for S-curve deceleration section Tlacc Tsacc Tsacc Tldec Tsdec Tsdec ( constant jerk). Total time of acceleration is: Tlacc+2Tsacc. The following formula gives the basic relationship between these parameters.
velocity( i.e.: the moving distance is too small to reach max_vel), the maximum velocity is automatically lowered and Velocity (pps) smooth accel./decel. is made (see the following Figure). This means that with moves that don’t reach maximum velocity may cause longer than expected move times. In such a case, the smaller the moving distance, the shorter the linear accel./decel. section becomes and the S-curve section is not reduced unless the linear section is decreased to 0.
The total accelerating time = 0.05+2*0.05 = 0.15 (second). Total decelerating time = 0.2+2*0.2 = 0.6 (second). Command of Graph2: start_tas_move(axis, 200000, 100, 1000000, 0.05, 0.05, 0.2, 0.2); Relative Functions: s_move(), rs_move(), tas_move(), start_tas_move() Refer to section 6.7 motion_done(): Refer to section 6.13 4.1.
The axis with larger numbers of moving pulses is the main axis, and the other axis is the secondary axis. When both axes are set at the same amount of pulses, the ‘X’ or ‘Z’ is the main axis. The speed relation between main and secondary axes is as follows: Composite Speed = Speed of main axis x Relative Functions: move_xy(), move_zu(),Refer to section 6.9 set_move_speed(), set_move_accel(),set_move_ratio(): Refer to section 6.10 4.1.
setting home_mode parameter in set_home_config() function. meaning of Home_mode will be described as the following: The CAUTION Due to differences between the motion chipsets of PCI-8134 and PCI8134A, behaviour of home mode 0 and 1 will be inconsistent as performed previously. Please note differences in timing charts of each home mode for both PCI-8134 and PCI-8134A when user wants to use PCI-8134A instead of PCI-8134 with same home function.
While the motion hits the edge of ORG or EL set_cnt_src()=0 (internal) get_command() get_position() Case 1 Doesn’t change Reset to 0 Case 2 Doesn’t change Reset to 0 (stand still) Case 3 Doesn’t change Stop at a EL position set_cnt_src ()=1 (external) get_command() get_position() Doesn’t change Reset to 0 Doesn’t change Reset to 0 (stand still) Doesn’t change Stop at a EL position Counter status after Home Move Completed (Motion Done) set_cnt_src()=0 (internal) set_cnt_src ()=1 (external) get_command()
PCI-8134 Home Mode 0 + ORG latch ORG Positive EL Case 1 Case 2 Case 3 Negative Case 1 Case 2 Case 3 PCI-8134 Home Mode 0 + ORG Latch @ 8134.DLL/8134A.
• The feedback counter of PCI-8134 will be reset to zero while the motion is hitting the edge of ORG signal. • In Case 2 & 3, the axis will hit and then stop at the edge of EL signal anyway because the first edge of ORG signal locates behind the start point of axis that means the axis won’t detect the edge of ORG signal anymore.
Counter status after Home Move Completed (Motion Done) Set_cnt_src()=0 (internal) set_cnt_src ()=1 (external) Get_command() get_position() get_command() get_position() Case 1 Doesn’t change Remain 0 Doesn’t change Stop at a deceleration position Case 2-1 Doesn’t change Remain 0 Doesn’t change Stop at a deceleration position Case 2-2 Doesn’t change Stop at a EL Doesn’t change Stop at a EL position position Case 3 Doesn’t change Stop at a EL Doesn’t change Stop at a EL position position Interrupt? Home Int H
PCI-8134 Home Mode 1 + ORG latch EZ ORG latch ORG EL Positive Case 1 Case 2 Case 3 Negative Case 1 Case 2 Case 3 PCI-8134 Home Mode 1 + ORG latch @ 8134.DLL/8134A.
• As Do Not Latch mode, the axis will start searching EZ signal after the ORG signal was detected within 5 clock periods. • In Case 2 & 3, the axis will hit and then stop at the edge of EL signal anyway because the edge of EZ signal locates behind the start point of Home Move that the axis won’t detect the edge of EZ signal anymore.
While the motion hits the edge of ORG or EL Set_cnt_src()=0 (internal) Get_command( get_position() ) Case 1 Doesn’t change Reset to 0 Case 2 Doesn’t change Stand Still Case 3 Doesn’t change Stop at a EL position set_cnt_src ()=1 (external) get_command() get_position() Doesn’t change Doesn’t change Doesn’t change Reset to 0 Stand Still Stop at a EL position Counter status after Home Move Completed (Motion Done) set_cnt_src()=0 (internal) set_cnt_src ()=1 (external) get_command() get_position() get_command
PCI-8134A Home Mode 1 ORG EZ EL Positive Case 1 Case 2 Case 3 Negative Case 1 Case 2 Case 3 PCI-8134A Home Mode 1 @ 8134.DLL/8134A.
• The feedback counter of PCI-8134 will be reset to zero while the motion is hitting the edge of EZ or EL signal. • In Case 2 & 3, the axis will hit and then stop at the edge of EL signal anyway because the edge of EZ signal locates behind the start point of Home Move that the axis won’t detect the edge of EZ signal anymore. • After normal home finished like case 1, users have to copy to position value to command counter and target position counter at the same time.
4.1.7 Manual Pulser Mode For manual operation of a device, you may use a manual pulser such as a rotary encoder. The PCI-8134/PCI-8134A can input signals from the pulser and output corresponding pulses from the OUT and DIR pins, thereby allowing you to simplify the external circuit and control the present position of axis. This mode is effective between a manu_move() command is written and a v_stop() command.
4.2 Motor Drive Interface The PCI-8134/PCI-8134A provides the INP, ERC and ALM signals for servomotor driver’s control interface. The INP and ALM are used for feedback the servo driver’s status. The ERC is used to reset the servo driver’s deviation counter under special conditions. 4.2.1 INP Usually, servomotor driver with pulse train input has a deviation (position error) counter to detect the deviation between the input pulse command and feedback counter.
any command pulse. The ALM signal may be a pulse signal, of which the shortest width is a time length of 5 micro seconds. You can change the input logic by set_alm_logic() function. Whether or not the PCI-8134/PCI-8134A is generating pulses, the ALM signal lets it output the INT signal.. The ALM status can be monitored by software function: get_io_status(). The ALM signal can generate IRQ by setting the bit 2 of INT. factor in software function: set_int_factor(). 4.2.
CAUTION Due to differences between the motion chipsets on the PCI-8134 and PCI8134A, ERC output pulse width with the PCI-8134A may be less than originally output by the PCI-8134. 4.3 The Limit Switch Interface and I/O Status In this section, the following I/O signals’ operations are described.
The end-limit signals are used to stop the control output signals (OUT and DIR) when the end-limit is active. PEL signal indicates end-limit in positive (plus) direction. MEL signal indicates end-limit in negative (minus) direction. When the output pulse signals (OUT and DIR) are toward positive direction, the pulse train will be immediately stopped when the PEL signal is inserted, while the MEL signal is meaningless in this case, and vise versa.
You can use either 'a' contact switch or 'b' contact switch by setting the dip switch S1. The PCI-8134/PCI-8134A is delivered from the factory with all bits of S1 set to OFF. The signal status can be monitored by software function: get_io_status(). 4.3.3 ORG When the motion controller is operated at the home return mode, the ORG signal is used to stop the control output signals (OUT and DIR).
4.4 The Encoder Feedback Signals (EA, EB, EZ) The PCI-8134/PCI-8134A has a 28-bits binary up/down counter for managing the present position for each axis. The counter counts signals input from EA and EB pins. It can accept 2 kinds of pulse input: (1). plus and minus pulses input(CW/CCW mode); (2). 90° phase difference signals (AB phase mode). 90° phase difference signals may be selected to be multiplied by a factor of 1,2 or 4. 4x AB phase mode is the most commonly used for incremental encoder input.
EA EB Positive Direction EA EB Negative Direction The encoder error interrupt is provided to detect abnormal situation. Simultaneously changing of EA and EB signals will cause an encoder error. If bit #14 of the interrupt factor register (INT factor) is set as 1, the IRQ will be generated when detect encoder error during operation. The index inputs (EZ) signals of the encoders are used as the “ZERO” index. This signal is common on most of the rotational motors.
are numbered either from left to right or right to left on the PCI slots. These card numbers will affect the corresponding axis number on the cards. And the axis number is the first argument for most functions called in the library. So it is important to identify the axis number before writing application programs. For example, if 3 PCI-8134/PCI-8134A cards are plugged in the PCI slots. Then the corresponding axis number on each card will be: Axis No. Card No.
Sensor 1 is touched. Change to 50000pps if Sensor 2 is touched. Change to 100000pps if Sensor 3 is touched. Then the code for this application and the resulting velocity profiles are shown below. Moving part Motor Sensor 1 Sensor 2 Sensor 3 Pos=0 Pos=200000 #include “pci_8134.h” start_a_move(axis, 200000.0, 1000, 10000, 0.02); while(!motion_done(axis)) { // Get Sensor’s information from other I/O card if((Sensor1==High) && (Sensor2==Low) && (Sensor3 == Low)) v_change(axis, 25000, 0.
Relative Function: v_change(): Refer to section 6.5 4.7 Interrupt Control The PCI-8134/PCI-8134A motion controller can generate INT signal to host PC according to 13 types of factors, refer to set_int_factor() function for more details.. The INT signal is output when one or more interrupt factors occur on either axis. To judge on which axis the interrupt factors occur, use get_int_axis() function. The interrupt status is not closed until get_int_status() function is performed.
5 Motion Creator After installing all the hardware properly according to Chapter 2, 3, configuring cards and checkout are required before running. This chapter gives guidelines for establishing a control system and manually exercising the PCI-8134/PCI-8134A cards to verify correct operation. Motion Creator provides a simple yet powerful means to setup, configure, test and debug motion control system that uses PCI-8134/PCI-8134A cards.
5.1 Main Menu Main Menu will appear when executing Motion Creator. Figure 5.1 shows the Main Menu. Figure 5.1 Main Menu of Motion Creator From main menu window all PCI-8134/PCI-8134A cards and their axes and the corresponding status can be viewed. First of all, check if all the PCI8134/PCI-8134A cards which are plugged in the PCI-Bus can be viewed on “Select Card” column. Next select the card and axis you want to configure and operate.
5.2 Axis Configuration Window Press the “Config Axis” button on the Main Menu will enter the Axis Configuration window. Figure 5.2 shows the window. Figure 5.2 Axis Configuration Window the Axis Configuration window includes the following setting items which cover most I/O signals of PCI-8134/PCI-8134A cards and part of the interrupt factors. • Pulse I/O Mode: Related functions: ∗ ∗ set_pls_outmode() for “Pulse Output Mode” property. set_cnt_src() for “Pulse Input Active” property.
∗ set_pls_iptmode() for “Pulse Input Mode” property.
• Mechanical Signal: Related functions: • ∗ set_home_config() for “Home Signal” and “Index Signal” property. ∗ set_sd_logic() for “Slow Down Point Signal” property. Servo Motor Signal: Related functions: • ∗ set_alm_logic() for “Alarm Signal” property. ∗ set_inp_logic() for “INP” property. Manual Pulser Input Mode: Related functions: • ∗ set_manu_iptmode() for “Manual Pulser Input Mode” property. Interrupt Factor: Related functions: • ∗ set_int_factor() for “INT Factor” property.
Where _8134_initial () and _8134_Set_Config () can be called from the function library we provide. _8134_initial () should be the first function called within main {} function. It will check all the PCI-8134/PCI-8134A existed and give the card a base address and IRQ level. _8134_Set_Config () will configure the PCI-8134/PCI-8134A cards according to “8134.cfg”. That is, the contents of Axis Configuration Window can be transferred to the application program by this function called. Figure 5.
5.3 Axis Operation Windows Press the “Operate Axis” button on the Main Menu or Axis Configuration Menu will enter the Axis Configuration window. Figure 5.3 shows the window. User can use this window to command motion, monitor all the I/O status for the selected axis. This window includes the following displays and controls: • • • • • • • • • 5.3.
ON/OFF status is read based on the setting logic in Axis Configuration window.
5.3.4 Set Position Control Use the Set Position Control to arbitrarily change the actual position of axis.Write the position wanting to specify into the column and click the “Set Position” button will set the actual position to the specified position. 5.3.5 Operation Mode Control There are four Operation Modes mentioned in Chapter 4 can be tested in the Axis Operation window. They are “Continuous Move Mode”, “Preset Mode Operation”, “Home Mode Operation”, “Manual Mode Operation”.
Window. Press → to begin returning home function. Press “STOP” to stop moving.
• Manual Pulser Mode: Press “Manual Pulser Move” button will enable motion controlled by hand wheel pulser. Using this function, user can manually operate the axis thus verify operation. The maximum moving velocity is limited as specified by “Maximum Velocity”. Press “STOP” to end this mode. Do remember to press “STOP” to end operation under this mode. Otherwise, operations under other modes will be inhibited. 5.3.
5.3.8 Velocity Profile Selection : Click T_Curve or S_curve to select preset movement velocity profile. The relative parameter settings are in Motion Parameter Frame. 5.3.9 Repeat Mode : Repeat mode is only for absolute and relative mode. After choosing a operation mode and click repeat mode on, you can press play key to make axis run between position 1 and 2 (in absolute mode) or run between a range (relative mode). It is useful on demonstrations. Use Stop button to stop this operation.
6 Function Library (8134.DLL) This chapter describes the supporting software for PCI-8134/PCI-8134A cards. User can use these functions to develop application program in C or Visual Basic or C++ language. 6.1 List of Functions Section 6.
v_stop Decelerate to stop set_sd_stop_mode Set slow down stop mode fix_max_speed Fix maximum speed setting unfix_max_speed Unfix maximum speed setting get_current_speed Get current speed in pps verify_speed Get the minimum acceleration time under the speed setting Section 6.
move_all Perform a multi-axis trapezodial profile move and wait for finish start_sa_move_all Start a multi-axis absolute S-curve profile move wait_for_all Wait for all axes to finish Linear Interpolated Motion move_xy move_zu start_move_xy start_move_zu Section 6.
Manual Pulser Motion Section 6.12 set_manu_iptmode Set pulser input mode and operation mode manu_move Begin a manual pulser movement Motion Status motion_done Section 6.13 Check if the axis is in motion Servo Drive Interface Section 6.
Type Name U8 I16 U16 I32 U32 F32 F64 Boolean 6.3 Description 8-bit ASCII character 16-bit signed integer 16-bit unsigned integer 32-bit signed long integer 32-bit unsigned long integer 32-bit single-precision floatingpoint 64-bit double-precision floatingpoint Boolean logic value Range 0 to 255 -32768 to 32767 0 to 65535 -2147483648 to 2147483647 0 to 4294967295 -3.402823E38 to 3.402823E38 -1.797683134862315E308 1.
This function is used to get the PCI-8134 card’s IRQ number. W_8134_Get_Base_Addr : This function is used to get the PCI-8134 card’s base address.
@ Name set_pls_outmode – Set the configuration for pulse command output. set_pls_iptmode – Set the configuration for feedback pulse input. set_cnt_src – Enable/Disable the external feedback pulse input @ Description set_pls_outmode: Configure the output modes of command pulse. There are two modes for command pulse output. set_pls_iptmode: Configure the input modes of external feedback pulse. There are four types for feedback pulse input.
pls_iptmode=3, CW/CCW type pulse input. cnt_src: Counter source cnt_src=0, counter source from command pulse cnt_src=1, counter source from external input EA, EB @ Return Code ERR_NoError 6.
set_sd_stop_mode: Select the motion actions for slow down only or slow down then stop when SD pin is turned on fix_max_speed: This function is used to fix the speed resolution multiplier. The higher it is set, the coarser speed step is performed but the higher acceleration rate is obtained. Once it is set, the motion function will use this multiplier setting instead. Notice that this value will not affect the maximum speed of the motion command.
v_stop (ByVal axis As Integer, ByVal Tacc As Double) As Integer set_sd_stop_mode (ByVal axis As Integer, ByVal stopmode As Integer) As Integer fix_max_speed(ByVal axis As Integer, ByVal max_vel As Double) As Integer unfix_max_speed(ByVal axis As Integer) As Integer verify_speed(ByVal str_vel As Double, ByVal max_vel As Double, minAccT As Double, maxAccT As Double, ByVal MaxSpeed As Double) As Double _8134_set_sd_stop_mode (ByVal axis As Integer, ByVal stopmode As Integer) As Integer @ Argument axis: axis nu
a_move– Begin an absolute trapezoidal profile motion and wait for completion r_move– Begin a relative trapezoidal profile motion and wait for completion t_move – Begin a non-symmetrical relative trapezoidal profile motion and wait for completion ta_move– Begin a non-symmetrical absolute trapezoidal profile motion and wait for completion wait_for_done – Wait for an axis to finish set_rdp_mode – Set ramping down mode @ Description start_a_move() : This function causes the axis to accelerate from a starting ve
U16 start_a_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tacc) U16 a_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64Tacc) U16 start_r_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tacc) U16 r_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64Tacc) U16 start_t_move(I16 axis, F64 dist, F64 str_vel, F64 max_vel, F64 Tacc, F64 Tdec) U16 t_move(I16 axis, F64 dist, F64 str_vel, F64 max_vel, F64 Tacc, F64 Tdec) U16 start_ta_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 T
Integer) As Integer @ Argument axis: axis number designated to move. pos: specified absolute position to move distance or dist: specified relative distance to move str_vel: starting velocity of a velocity profile in unit of pulse per second max_vel: starting velocity of a velocity profile in unit of pulse per second Tacc: specified acceleration time in unit of second Tdec: specified deceleration time in unit of second Mode: 0=Manual Mode(default), 1=Auto Mode @ Return Code ERR_NoError ERR_MoveError 6.
@ Syntax C/C++ (DOS, Windows) U16 start_s_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc) U16 s_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc) U16 start_rs_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc) U16 rs_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc) U16 start_tas_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc, F64 Tldec, F64 Tsdec) U16 tas_move(I16 axis, F64 pos, F64 st
Tsdec: specified S-curve deceleration time in unit of second @ Return CodeERR_NoError ERR_MoveError 6.
U16 move_all(I16 len, I16 *axes, F64 *pos, F64 *str_vel, F64 *max_vel, F64 *Tacc) U16 wait_for_all(I16 len, I16 *axes) U16 start_sa_move_all(I16 len, I16 *axes, F64 *pos, F64 *str_vel, F64 *max_vel, F64 *Tlacc, F64 *Tsacc) Visual Basic (Windows) start_move_all(ByVal len As Integer, ByRef axis As Integer , ByRef pos As Double, ByRef str_vel As Double, ByRef max_vel As Double, ByRef Tacc As Double) As Integer move_all(ByVal len As Integer, ByRef axis As Integer, ByRef pos As Double, ByRef str_vel As Double,
6.9 Linear Interpolated Motion @ Name move_xy – Perform a 2-axes linear interpolated motion between X & and wait for finish move_zu – Perform a 2-axes linear interpolated motion between Z & and wait for finish start_move_xy – Start a 2-axes linear interpolated motion between X Y start_move_zu – Start a 2-axes linear interpolated motion between Z U Y U & & @ Descriptionmove_xy, move_zu: These two functions cause a linear interpolation motion between two axes and wait for completion.
6.10 Interpolation Parameters Configuring @ Name map_axes – Configure the axis map for coordinated motion set_move_speed – Set the vector velocity set_move_accel – Set the vector acceleration time set_move_ratio – Set the axis resolution ratios _8134_set_move_ratio – Set the axis resolution ratios @ Description map_axes: This function initializes a group of axes for coordinated motion. map_axes() must be called before any coordinated motion function is used.
set_move_speed (ByVal str_vel As Double, ByVal max_vel As Double) As Integer set_move_accel (ByVal accel As Double) As Integer set_move_ratio (ByVal axis As Integer, ByVal ratio As Double) As Integer _8134_set_move_ratio (ByVal axis As Integer, ByVal ratio As Double) As Integer @ Argument axis: axis number designated to configure n_axes: number of axes for coordinated motion *map_array: specified axes number array designated to move.
U16 set_home_config(I16 axis, I16 home_mode, I16 org_logic, I16 org_latch, I16 EZ_logic) U16 home_move(I16 axis, F64 svel, F64 mvel, F64 accel) Visual Basic (Windows) set_home_config (ByVal axis As Long, ByVal home_mode As Long, ByVal org_logic As Long, ByVal org_latch As Long, ByVal EZ_logic As Long) As Integer home_move (ByVal axis As Long, ByVal str_vel As Double, ByVal max_vel As Double, ByVal accel As Double) As Integer @ Argument axis: axis number designated to configure and perform home returning ho
U16 manu_move(I16 axis, F64 mvel) Visual Basic (Windows) set_manu_iptmode (ByVal axis As Long, ByVal manu_iptmode As Long, ByVal op_mode As Long) As Integer manu_move (ByVal axis As Long, ByVal max_vel As Double) As Integer @ Argument axis: axis number designated to start manual move ipt_mode: setting of manual pulser input mode from PA and PB pins ipt_mode=0, 1X AB phase type pulse input. ipt_mode=1, 2X AB phase type pulse input. ipt_mode=2, 4X AB phase type pulse input.
Visual Basic (Windows) motion_done (ByVal axis As Integer) As Integer @ Argument axis: axis number of motion status @ Return Code ERR_NoError 6.14 Servo Drive Interface @ Name set_alm_logic – Set alarm logic and alarm mode set_inp_logic – Set In-Position logic and enable/disable set_sd_logic – Set slow down point logic and enable/disable set_erc_enable – Set ERC pin output enable/disable @ Description set_alm_logic: Set the active logic of ALARM signal input from servo driver.
set_erc_enable(ByVal axis As Integer, ByVal erc_enable As Long) As Integer @ Argument axis: axis number designated to configure alm_logic: setting of active logic for ALARM signal alm_logic=0, active LOW. alm_logic=1, active HIGH. inp_logic: setting of active logic for INP signal inp_logic=0, active LOW. inp_logic=1, active HIGH. sd_logic: setting of active logic for SD signal sd_logic=0, active LOW. sd_logic=1, active HIGH. sd_latch: setting of latch control for SD signal sd_logic=0, do not latch.
Bit 0 1 2 3 4 5 6 7 8 9 10 11 Name +EL -EL +SD -SD ORG EZ ALM SVON RDY INT ERC INP Description Positive Limit Switch Negative Limit Switch Positive Slow Down Point Negative Slow Down Point Origin Switch Index signal Alarm Signal SVON of PCL5023 pin output RDY pin input Interrupt status ERC pin output In-Position signal input @ Syntax C/C++ (DOS) U16 _8134_Set_SVON(I16 axis, I16 on_off) U16 get_io_status(I16 axis, U16 *io_status) C/C++ (Windows) U16 W_8134_Set_SVON(I16 axis, I16 on_off) U16 get_io_status(
set_command – Set the current command position. get_command – Get the current command position. _8134_get_target_pos – Get the current command position. _8134_reset_target_pos – Set the current command position. @ Descriptionset_position() changes the current actual position to the specified position. get_position() reads the current actual position.
Integer _8134_get_target_pos (ByVal axis As Integer, pos As Double) As Integer _8134_reset_target_pos (ByVal axis As Integer, ByVal pos As Double) As Integer @ Argument axis: axis number designated to set and get position. pos: actual position or command position @ Return Code ERR_NoError 6.
6 7 8~12 13 14 15 16 17 18~22 23 24~31 Completion of preset movement Completion of interpolating motion for two axes: (X & Y) or (Z & U) X (should be set to 0) when v_stop() function stop the axis EA/EB, PA/PB encoder input error start with STA signal Completion of acceleration Start of deceleration Should be Set to 0 RDY active (AP3 of PCL5023 change from 1 to 0) Should be set to 0 Note: Bit 14: The interrupt is generated when pins EA and EB, or PA and PB change simultaneously.
15 16 17 Start with STA signal Acceleration Completed Deceleration Started 18∼ 22 Always 0 23 24~31 RDY active (AP3 of PCL5023 change from 1 to 0) Always 0 link_axis_interrupt: This function is used to create a callback function in Windows for interrupt signal receiving. Once the interrupt comes, the callback function will be called too.
I16 link_axis_interrupt(I16 AxisNo, void ( _stdcall *callbackAddr)(void)) Visual Basic (Windows) W_8134_INT_Enable (ByVal cardNo As Long, phEvent As Long) W_8134_INT_Disable (ByVal cardNo As Long) As Integer W_8134_Set_INT_Control (ByVal cardno As Integer, ByVal intFlag As Integer) set_int_factor (ByVal axis As Integer, ByVal int_factor As Long) As Integer get_int_status (ByVal axis As Long, int_status As Long) As Integer link_axis_interrupt(ByVal AxisNo As Integer, By Val callbackAddr as Long) As Integer @
7 Additional Function (8134A.DLL) Library This chapter describes the another supporting software for PCI-8134 cards. It is called 8134A.LIB and 8134A.DLL. Notice that this function library can’t not be mixed to use with chapter 6, 8134.DLL. Users can use these functions to develop their application programs in C or Visual Basic or C++ language. 7.1 List of Functions Section 7.
_8134_sv_move Accelerate an axis to a constant velocity with Scurve profile Change speed on the fly Decelerate to stop Emergency Stop _8134_v_change _8134_sd_stop _8134_emg_stop _8134_set_sd _8134_fix_speed_range _8134_unfix_speed_range _8134_get_current_speed _8134_verify_speed Set slow down stop mode and SD logic Fix speed range setting Unfix speed range setting Get current speed in pps Get the minimum acceleration time under the speed setting Section 7.
_8134_set_pulser_iptmode Set pulser input mode and operation mode _8134_pulser_v_move Begin a manual pulser movement Motion Status _8134_motion_done Section 7.12 Check if the axis is in motion Servo Driver Interface _8134_set_alm 8134 set inp _8134_set_erc_enable Section 7.13 Set alarm logic and alarm mode Set In-Position logic and enable/disable Set the ERC output enable/disable I/O Control and Monitoring _8134_set_servo _8134_get_io_status Section 7.
U16 I32 U32 16-bit unsigned integer 32-bit signed long integer 32-bit unsigned long integer 0 to 65535 -2147483648 to 2147483647 0 to 4294967295 32-bit single-precision floating-3.402823E38 to 3.402823E38 point 64-bit double-precision floating- -1.797683134862315E308 to F64 point 1.797683134862315E309 Boolean Boolean logic value TRUE, FALSE F32 7.
C/C++ (DOS,Windows) I16 _8134_initial(I16 *existCards) I16 _8134_close(void) I16 _8134_config_from_file(U8 *fileName) I16 _8134_get_irq_channel(I16 cardNo, U16 *irq_no ) I16 _8134_get_base_addr(I16 cardNo, U16 *base_addr) I16 _8134_version_info(I16 CardNo, U16 *HardwareInfo, I32 *SoftwareInfo, I32 *DriverInfo) Visual Basic (Windows) B_8134_initial (existCards As Integer) As Integer B_8134_close () As Integer B_8134_config_from_file (ByVal fileName As String) As Integer B_8134_get_irq_channel (ByVal cardno A
@ Description _8134_set_pls_outmode: Configure the output modes of command pulse. There are two modes for command pulse output. _8134_set_pls_iptmode: Configure the input modes of external feedback pulse. There are four types for feedback pulse input. Note that this function makes sense only when using external feedback counter source. _8134_set_feedback_src: If external encoder feedback is available in the system, set the src parameter in this function to Enabled state.
7.
value according to the maximum speed setting in motion function. _8134_verify_speed: This function is used to get the minimum acceleration under a maximum speed setting. This function will not affect any speed or acceleration setting. It is only for offline checking.
second Tacc: specified second Tdec: specified second acceleration time in unit of deceleration time in unit of Tlacc: specified linear acceleration time of Scurve in unit of second Tsacc: specified S-curve acceleration time of Scurve in unit of second stopmode: 0=slow down to starting velocity, 1=slow down then stop *minAccT: calculated minimum acceleration time *maxAccT: calculated maximum acceleration time MaxSpeed: The value of maximum speed setting in motion function or in fix_max_speed funct
C/C++ (DOS, Windows) I16 _8134_start_ta_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tacc,F64 Tdec) I16 _8134_start_tr_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tacc,F64 Tdec) I16 _8134_set_rdp_mode(I16 axisno, I16 mode) Visual Basic (Windows) B_8134_start_ta_move (ByVal axis As Integer, ByVal pos As Double, ByVal str_vel As Double, ByVal max_vel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8134_start_tr_move (ByVal axis As Integer, ByVal distance As Double,
@ Syntax C/C++ (DOS, Windows) I16 _8134_start_sa_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec) I16 _8134_start_sr_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tacc, F64 Tdec, F64 SVdec, F64 SVacc) Visual Basic (Windows) B_8134_start_sr_move(ByVal axis As Integer, ByVal pos As Double, ByVal str_vel As Double, ByVal max_vel As Double, ByVal Tacc As Double, ByVal Tdec As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_8134_start_sa_
axes, even in different cards. The simultaneous multi-axis operation means to start or stop moving specified axes at the same time. The axes moved are specified by the parameter “AxisArray,” and the number of axes are defined by parameter “TotalAxes” in _8134_set_tr_move_all(). When properly setup with _8134_set_xx_move_all(), the function _8134_start_move_all() will cause all specified axes to begin a trapezoidal relative movement, and _8134_stop_move_all() will stop them.
B_8134_set_sa_move_all(ByVal TotalAxes As Integer, AxisArray As Integer, PosA As Double, StrVelA As double, MaxVelA As double, TaccA As double, TdecA As double, SVaccA As double, SVdecA As Double) B_8134_set_ta_move_all(ByVal TotalAxes As Integer, AxisArray As Integer, PosA As Double, StrVelA As double, MaxVelA As double, TaccA As double, TdecA As double) B_8134_set_sr_move_all(ByVal TotalAxes As Integer, AxisArray As Integer, DistA As Double, StrVelA As double, MaxVelA As double, TaccA As double, TdecA As
for Z & U, with S-curve profile, _8134_start_sa_move_zu –Start an absolute interpolation for Z & U, with S-curve profile, 2-axis linear @ Description _8134_start_move_%%_xy, _8134_start_move_%%_zu: These functions cause a linear interpolation motion between two axes without waiting for completion. After issuing this function, it will start to move and leave the function at the same time. Note that xy means the first two axes of one card and zu means the last two axes of one card.
B_8134_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_8134_start_tr_move_zu (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) As Integer B_8134_start_ta_move_zu (ByVal CardNo As Integer, ByVal Pos As Double, ByV
_8134_set_org_offset – Set ORG signal’s range _8134_set_org_logic – Set ORG logic _8134_set_bounce_filter – Set a bounce filter for homing _8134_set_org_latch – Enable/diable ORG latch function @ Description _8134_set_home_config: Configure the logic of origin switch and index signal needed for home_move() function. If you need to stop the axis after EZ signal is active(home_mode=1 or 2), you should keep placing ORG signal in the ON status until the axis stop.
I16 _8134_set_org_latch(I16 axis, I16 org_latch) Visual Basic (Windows) B_8134_set_home_config (ByVal axis As Integer, ByVal home_mode As Integer, ByVal org_logic As Integer, ByVal ez_logic As Integer, ByVal ez_count As Integer, ByVal erc_out As Integer) As Integer B_8134_home_move (ByVal axis As Integer, ByVal str_vel As Double, ByVal max_vel As Double, ByVal accel As Double) As Integer B_8134_set_org_offset(Byval axis As Integer, ByVal org_latch As Integer) As Integer B_8134_set_org_logic(ByVal axis As In
_8134_set_step_unit – Set manual pulser ratio @ Description _8134_set_pulser_iptmode: Four types of pulse input modes can be available for pulser or hand wheel. User can also move two axes simultaneously with one pulser by selecting the operation mode to common mode. Or move the axes independently by selecting the operation mode to independent mode. _8134_pulser_vmove: Begin to move the axis according to manual pulser input as this command is written.
op_mode=0, Independent for each axis op_mode=1,PAX, PBX common for PAY, PBY or PAZ, PBZ common for PAU, PBU.
3. Dissatisfication of fP
5: In Decelerating 6: In Start Speed 7: Waiting other axes The following code demonstrates how to utilize this function: // Begin a trapezoidal velocity profile motion _8134_start_ta_move(axis_x, pos1, svel, mvel, Tacc,Tdec); // Wait for completion while(motion_done(axis_x) !=0) ; If the axis is running under home mode 4~7, this function will return the homing phase. Please refer to Appendix A for details.
I16 set_inp(I16 axis, I16 inp_enable, I16 inp_logic) I16 set_erc_enable(I16 axis, I16 erc_enable) Visual Basic (Windows) B_8134_set_alm_logic (ByVal axis As Integer, ByVal alm_logic As Integer, ByVal alm_mode As Integer) As Integer B_8134_set_inp_logic (ByVal axis As Integer, ByVal inp_enable As Integer, ByVal inp_logic As Integer) As Integer B_8134_set_erc_enable(ByVal axis As Integer, ByVal erc_enable As Integer) As Integer @ Argument axis: axis number designated to configure alm_logic: setting of active
Bit 0 1 2 3 4 5 6 7 8 9 10 11 Name +EL -EL +SD -SD ORG EZ ALM SVON RDY INT ERC INP Description Positive Limit Switch Negative Limit Switch Positive Slow Down Point Negative Slow Down Point Origin Switch Index signal Alarm Signal SVON of PCL5023 pin output RDY pin input Interrupt status ERC pin output In-Position signal input @ Syntax C/C++ (DOS,Windows) I16 _8134_set_servo(I16 axis, I16 on_off) I16 _8134_get_io_status(I16 axis, U16 *io_status) Visual Basic (Windows) B_8134_set_servo (ByVal axis As Intege
@ Description _8134_set_position: Changes the current actual position to the specified position. _8134_get_position: Reads the current actual position. Note that when feedback signals is not available in the system, thus external encoder feedback is Disabled in _8134_set_feedback_src() function, the value gotten from this function is command position. _8134_set_command: Changes the command position to the specified command position.
max_error As Long) As Integer @ Argument axis: axis number designated to set and get position. pos: actual position or command position cmd: target command position value *error_c: error counter value max_error: error detect value setting @ Return Code ERR_NoError 7.
7 Completion of interpolating motion for two axes (X & Y) or (Z & U) 8~12 13 14 15 16 17 18~22 23 24~31 Should be set to 0 When stop function stop the axis EA/EB, PA/PB encoder input error start with STA signal Completion of acceleration Start of deceleration Should be Set to 0 RDY active (AP3 of PCL5023 change from 1 to 0) Should be set to 0 Note: Bit 14: The interrupt is generated when pins EA and EB, or PA and PB change simultaneously. It means there has an encoder input error.
23 24~31 RDY active (AP3 of PCL5023 change from 1 to 0) Always 0 _8134_link_axis_interrupt: This function is used to create a callback function in Windows for interrupt signal receiving. Once the interrupt comes, the callback function will be called too.
B_8134_link_axis_interrupt(ByVal AxisNo As Integer, By Val callbackAddr as Long) As Integer @ Argument cardNo: card number 0,1,2,3… axis: axis number 0,1,2,3,4… intFlag: int flag, 0:disable or 1:enable phEvent: event or event array for interrupt axis (For Windows only) int_factor: interrupt factor, refer to previous interrupt factor table int_axis: interrupt axis number (the return value) int_status: interrupt factor (the return value), refer to previous interrupt type table callbackAddr: The call back func
8 Connection Example This chapter shows some connection examples between PCI-8134/PCI-8134A and servo drivers and stepping drivers. 8.1 General Description of Wiring Figure 8.1 is a general description of all the connectors of PCI-8134. Only connection of one of 4 axes is shown. CN1: Receives +24V power from external power supply. CN2: Main connection between PCI-8134/PCI-8134A and pulse input servo driver or stepping driver. CN3: Receive pulse command from manual pulser.
Description of PCI-8134/PCI-8134A Indexer Pinouts Terminal Block PCI-8134/PCI-8134A CN 1 POWER 24 V GND 1 2 CN 2 AXIS 3 4 From external Power Supply 3 OUT1 + 4 OUT1 - 5 DIR + Pulse Output 6 DIR - Machine DI / DO 98 EX GND Pulse Input 99 EX +24V Driver DI / DO 7 SVON 1 Pulse Output 8 ERC 1 Machine DI / DO 9 ALM 1 10 INP 1 Pulse Input To Axis 1~4 Driver DI / DO 11 RDY 1 Pulse Output 12 EX GND 13 EA1 + Machine DI / DO Pulse Input Only Axis 1 is indicated.
Wiring of PCI-8134 with Servo Driver Wiring of PCI-8134/PCI-8134A with Servo Driver 3 4 5 6 98 99 7 8 9 10 11 12 13 14 15 16 17 18 19 20 37 38 39 40 41 1 2 OUT1 + OUT1 DIR + DIR EX GND 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 24 V GND CN 1 POWER Pulse Output Machine DI / DO 1 Pulse Input CN 2 AXIS Driver DI / DO 2 3 4 Motion Creator 8134.
1. For convenience’ sake, the drawing shows connections for one axis only. 2. Default pulse output mode is OUT/DIR mode; default input mode is 4X AB phase mode. Anyway, user can set to other mode by software function. 3. Since most general purpose servomotor driver can operates in Torque Mode; Velocity Mode; Position mode. For linking with PCI-8134/PCI8134A, user should set the operating mode to Position Mode.
Wiring of PCI-8134/PCI-8134A with Panasonic MSD PCI-8134/CPI-8134A Axis 1 3 4 5 6 98 99 7 8 9 10 11 12 13 14 15 16 17 18 19 20 37 38 39 40 41 Servo Driver OUT1 + OUT1 DIR + DIR EX GND 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 PULS + PULS SIGN + SIGN COM COM + SRV-ON CL ALM COIN SRDY GND OA + OA OB + OB OZ + OZ - 6 5 8 7 28 11 12 13 26 25 27 3 19 20 21 22 1 2 E M Panasonic MSC CNI/F (50-200 W) Table MEL OR G MSD PS D PEL F
8.3 Wiring with DIN-814M Warning The DIN-814M is used for wiring between Mitsubishi J2S series servo drivers and ADLINK PCI-8134/PCI-8134A, PCI-8164, or MPC-8164 motion controller card ONLY. Note: 1. The DIN-814M provides 2 connection methods for every axis. The first is through the CNA & CNB connectors. This is for Mitsubishi J2S series servo driver. The second is through SJ connector. This is for stepping driver or other servo drivers (for Panasonic MINAS MSD driver, please use DIN-814P).
3. 4. Depending on which PCI-8134/PCI-8134A or PCI-8164/MPC-8164 card used, some signals (PSD and MSD) in the IOIF connector will function differently. When PCI-8134 is used, The PSD and MSD are for positive slow down and negative slow down signal respectively. While PCI-8164 is used, PSD is for CMP and LTC and MSD is for SD. For more detail s, please refer to the PCI-8134 and PCI-8164 user manuals.
PIN Assignment: CNA1~CN A4 No. 1 3 5 7 9 11 13 15 17 19 Name IGND OUT+ EZ+ EB+ +24V I/O -O I I O Function Isolated Ground Pulse Signal (+) Encoder Z-phase (+) Encoder B-phase (+) Voltage output OUTEZEBRDY O I I I Pulse Signal (-) Encoder Z-phase (-) Encoder B-phase (-) Servo Ready No.
2 3 Servo ON RDY O I Servo On Servo Ready 5 6 ALM IGND I -- Servo Alarm Isolated Ground Jumper J1~J4 1: GND 2: EMG4 3: EX_EMG How to wire PEL, MEL, ORG, SD, PSD, MSD, Ext.EMG (in IOIF): CMP, LTC (in IOIF) CMP is a TTL 5V or 0V output (vs. Ext GND) LTC is a TTL 5V or 0V input (vs. Ext. GND) CNA & CNB, CN2 SJ: Please refer to PCI-8134/PCI-8134A/PCI-8164 user manual for wiring.
8.
3. Depending on the PCI-8134/PCI-8134A or PCI-8164 card used, some signals (PSD & MSD) in the IOIF connector will function differently. When PCI-8134/PCI-8134A is used, the PSD and MSD signals are for positive slow down and negative slow down signal respectively. When PCI8164 is used, PSD is for CMP and LTC, and MSD is for SD. For more details, please refer to the PCI-8134/PCI-8134A and PCI-8164 user manuals.
PIN Assignment: CNIF1~CNIF4 No. 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 Name EZ+ IGND OUT+ DIR+ IGND +24V ERC IGND I/O I -O O -O O -- Function Encoder Z-phase (+) Isolated Ground Pulse Signal (+) Direction Signal (+) Isolated Ground Voltage output Error counter Clear Isolated Ground EA+ EB+ I I Encoder A-phase (+) Encoder B-phase (+) INP RDY I I Servo In Position Servo Ready No.
SJ: Please refer to PCI-8134/PCI-8134A/PCI-8164 user manual for wiring. CN1: 8.5 Wiring with DIN-814PA DIN-814PA is a termination board for Panasonic MINAS A series servo drivers.
Appendix A: Auto Home Return Modes PCI-8134/PCI-8134A provides 5 extra home return modes from 3 to 7 which are implemented in an independent thread under Win32 system. These modes are based on original 3 basic modes and can achieve auto searching jobs during homing. Users do not worry about the end-limit case and starting position when homing. The following figures show the timing charts of these extra home modes. Users should take notice of the timing charts and be aware of the limitations.
home_mode = 4 : Based on home mode 2 ORG EZ EL Reset Reset Case 1 Case 2 Case 3 ORG Offset Reset Appendix A • 148
home_mode = 5 : Based on home mode 1 EZ EL Case 1 Reset home_mode = 6 : Based on home mode 0 ORG EL Reset Case 1 Reset Case 2 Case 3 Reset 149 • Appendix A
home_mode = 7 : Based on home mode 2 ORG EZ EL Reset Case 1 Reset Case 2 Reset Case 3 Appendix A • 150
home_mode = 8 : Based on home mode 0 No limit switches and ORG is always ON at one direction ORG Reset Case 1 Case 2 151 • Appendix A Reset
home_mode = 9 : Based on home mode 0 It can search the ORG edge signal at a specific direction automatically.
home_mode = 11 : Based on home mode 2 ORG EZ EL Reset Case 1 Reset Case 2 Reset Case 3 153 • Appendix B
Abnormal stop when using these modes During auto homing phases, there could be a stop command from limit switch, alarm switch or users’ stop command. When it happened, the homing procedure will be terminated and return an error code in _8134_motion_done(). These error codes show the reason of termination. Notice that these codes will be cleared when users’ program read it. Normally, the _8134_motion_done() will show the phase codes during home searching. When it returns 0, it means homing is stopped.
// Second MOVE =108 // FIND EL = 109 // FIND EZ = 110 } else if( Ret == 0 ) { // Normal End break; } } // end of while Relative return codes of auto home return modes return codes of _8134_motion_done(), defined in 8134err.
Bouncing Problem in I/O Switch Sometimes, end-limit and ORG switches are mechanical type. Although there is a low pass filter in our input circuit, it could exist a bouncing problem if the bouncing frequency is very low. PCI-8134 provides a bouncing problem filter function, _8134_set_bounce_filter(AxisNo, Value). The default value is 10. It means this card will check 10 times during the switches changing their states. Every check is about 1ms~10ms depends on PC’s performance.
Appendix 8134A.DLL B: 8134.DLL vs. PCI-8134/PCI-8134A has two kinds of function library. They can’t be mixed to use. If you are the first time or your project is a new created one, use the 8134a.DLL for development. The new library, 8134a.DLL, has many new functions and it also avoids function naming problem when co-working with other cards like PCI-8372/66. Of course, the old function library, 8134.DLL will continuously be maintenaned but will not support new functions in the future.
B.2 Pulse Input/Output Configuration PCI8134.h (8134.lib) PCI8134a.h (8134a.lib) U16 set_pls_outmode(I32 axis, I32 pls_outmode); I16 _8134_set_pls_outmode(I16 AxisNo, I16 pls_outmode); U16 set_pls_iptmode(I32 axis, I32 pls_iptmode); I16 _8134_set_pls_iptmode(I16 AxisNo, I16 pls_iptmode); U16 set_cnt_src(I32 axis, I32 cnt_src); I16 _8134_set_feedback_src(I16 (3) AxisNo, I16 src); B.3 Continuously Motion Mode PCI8134.h (8134.lib) PCI8134a.h (8134a.
max_vel, F64 accel); MaxVel, F64 Tacc, F64 Tdec); U16 start_r_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 accel); I16 _8134_start_tr_move(I16 AxisNo, F64 Dist, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); U16 start_t_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 accel, F64 decel); I16 _8134_start_tr_move(I16 AxisNo, F64 Dist, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); U16 start_ta_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tacc, F64 Tdec); I16 _8134_start_ta_m
Tsacc); U16 rs_move(I16 axis, F64 distance, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc); F64 SVacc, F64 SVdec); Obsolete U16 start_tas_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc, F64 Tldec, F64 Tsdec); I16 _8134_start_sa_move(I16 AxisNo, F64 Pos, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, (2)(4) F64 SVacc, F64 SVdec); U16 tas_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc, F64 Tldec, F64 Tsdec); Obsolete B.
F64 x, F64 y); U16 start_move_zu(I32 cardNo, F64 z, F64 u); F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 v_8134_start_ta_move_zu(I16 CardNo, F64 PosZ, F64 PosU, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); B.8 Interpolaiton Parameters Configuring PCI8134.h (8134.lib) PCI8134a.h (8134a.
B.11 Motion Status PCI8134.h (8134.lib) PCI8134a.h (8134a.lib) U16 motion_done(I16 axis); I16 _8134_motion_done(I16 AxisNo); B.12 Servo Drive Interface PCI8134.h (8134.lib) PCI8134a.h (8134a.
PCI8134.h (8134.lib) PCI8134a.h (8134a.
B.16 Soft-limit Checking PCI8134.h (8134.lib) PCI8134a.h (8134a.lib) U16 set_sw_limit(I16 axisno,F64 p_limit, F64 n_limit); I16 _8134_set_sw_limit(I16 axisno,F64 p_limit, F64 n_limit); U16 unset_sw_limit(I16 axisno); I16 _8134_unset_sw_limit(I16 axisno); Note: (1) The input arguments have been changed. (2) The arguments in motion commands are different from last library. Users have to pay more attention to the mapping relations.
cstop_output_on); I16 _8134_set_tr_move_all(I16 TotalAx, I16 *AxisArray, F64 *DistA, F64 *StrVelA, F64 *MaxVelA, F64 *TaccA, F64 *TdecA); I16 _8134_set_ta_move_all(I16 TotalAx, I16 *AxisArray, F64 *PosA, F64 *StrVelA, F64 *MaxVelA, F64 *TaccA, F64 *TdecA); I16 _8134_set_sr_move_all(I16 TotalAx, I16 *AxisArray, F64 *DistA, F64 *StrVelA, F64 *MaxVelA, F64 *TaccA, F64 *TdecA, F64 *SVaccA, F64 *SVdecA); I16 _8134_set_sa_move_all(I16 TotalAx, I16 *AxisArray, F64 *PosA, F64 *StrVelA, F64 *MaxVelA, F64 *TaccA, F64
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. 2. All ADLINK products come with a two-year guarantee,free of repair charge. • • • 3.
h. Other categories not protected under our guarantees. 4. Customers are responsible for the fees regarding transportation of damaged products to our company or to the sales office. 5. To ensure the speed and quality of product repair, please download an RMA application form from our company website www.adlinktech.com. Damaged products with RMA forms attached receive priority. For further questions, please contact our FAE staff. ADLINK: service@adlinktech.