P C I-8 1 3 4 4 Axes Servo / Stepper Motion Control Card User’s Guide Recycled Paper
© Copyright 1999~2001 ADLINK Technology Inc. All Rights Reserved. Manual Rev. 2.10: April,4 2001 Part No : 50-11118-102 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.
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 Sales & Service Technical Support TEL Address http://www.adlink.com.tw service@adlink.com.tw NuDAQ nudaq@adlink.com.tw NuDAM nudam@adlink.com.tw NuIPC nuipc@adlink.com.tw NuPRO nupro@adlink.com.tw Software sw@adlink.com.tw AMB amb@adlink.com.tw +886-2-82265877 FAX +886-2-82265717 9F, No.
Table of Contents Chapter 1 Introduction........................................................ 1 1.1 1.2 1.3 Features .......................................................................... 3 Specifications ................................................................... 5 Software Supporting ......................................................... 6 1.3.1 1.3.2 1.3.3 Programming Library....................................................................... 6 Motion Creator......................
3.12 Simultaneously Start/Stop Signals STA and STP ............. 31 3.13 Daughter Board Connector .............................................. 32 Chapter 4 Operation Theorem ........................................33 4.1 Motion Control Modes ..................................................... 33 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.2 Motor Driver Interface ..................................................... 47 4.2.1 4.2.2 4.2.3 4.3 INP....................................................
5.4.3 5.4.4 5.4.5 Continuous Jog...............................................................................70 Incremental Jog ..............................................................................71 Other Control Objects....................................................................71 Chapter 6 Function Library .............................................73 6.1 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 List of Functions .....................................
How to Use This Guide This manual is designed to help you use the PCI-8134. The manual describes how to modify various settings on the PCI-8134 card to meet your requirements. It is divided into six chapters: Chapter1, "Introduction", gives an overview of the product features, applications, and specifications. Chapter2, "Installation", describes how to install the PCI-8134.
1 Introduction The PCI-8134 is a 4 axes motion control card with PCI interface. It can generate high frequency pulses to drive stepping motors and servo motors. Multiple PCI-8134 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. In addition, mechanical sensor interface, servo motor interface and general purpose I/O signals are provided for system integration. Figure 1.
PCI Bus PCI Bus Controller CN3 Pulser . Input: PA,PB PCL 5023 for axes X&Y CN4 Simultaneousl y Start/Stop PCL 5023 for axes Z&U 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.
Hardware Installation Jumper Setting Wiring Chapter 2 & 3 Run Motion Creator To Configure System Chapter 5 Run Motion Creator To Verify Operation Chapter 4 & 5 Use Function Library To develop Applications Chapter 4 & 6 No System is OK? Yes END Figure 1.2 Flowchart of building an application 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. 2-axis circular and linear interpolation. 28-bit up/down counter for incremental encoder feedback. Home switch, index signal, positive and negative limit switches interface provided for all axes. Programmable interrupt sources. Change Speed on the Fly. Simultaneous start/stop motion on multiple axes. Manual pulser input interface.
1.2 u u u u Specifications Applicable Motors: l Stepping motors. l AC or DC servomotors with pulse train input servodrivers. Performance: l Number of controllable axes: 4 axes. l Maximum pulse output frequency: 2.4Mpps, linear, trapezoidal or S-Curve velocity profile drive. l Internal reference clock: 9.8304 MHz l Position pulse setting range: 0~268,435,455 pulses(28-bit).
1.3 1.3.1 Software Supporting Programming Library For the customers who are writing their own programs, we provide MS-DOS Borland C/C++ programming library and Windows -95/NT DLL for PCI-8134. These function libraries are shipped with the board. 1.3.2 Motion Creator Refer to Chapter 5 for details. 1.3.3 Programming Guide We provide 12 sample programs which was written by VB 5.0 to demonstrate how to use this card step by step.
2 Installation This chapter describes how to install the PCI-8134. Please follow the follow steps to install the PCI-8134. • • • • • • 2.1 Check what you have (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 Outline Drawing Front Panel Figure 2.1 PCB Layout of the PCI-8134 CN1: External Power Input Connector CN2: Input / Output Signal Connector CN3: Manual Pulser Signal Connector CN4: Simultaneous Start / Stop Connector 2.3 2.3.1 Hardware Installation Hardware configuration PCI-8134 has 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.2 PCI slot selection Your computer will probably have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PCI-8134 can be used in any PCI slot. 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.
2.4 Software Driver Installation Please refer to the ADLink All-in-one Compact Disc Manual to install it. 2.5 Programming Guide Installation With ADLink’s “ Programming Guide” diskette: step 1. Place the “PCI-8134 Programming Guide Disk #1” in the 3.5" floppy drive A: step 2. Choose Run from the taskbar. step 3. Type A:\SETUP in the Run dialog box. At first setup displays a Welcome dialog box. Please click “Next” button to go to the next step.
Then user must assign the “Program Folder”. The default “Program Folder” is “PCI-8134”. After these procedures, the installation of PCI-8134 is completed now.
CN1 Pin Assignments: External Power Input 2.6 CN1 Pin No 1 2 Note: 1. 2. 3. Name EXGND EX+24V Description Grounds of the external power. External power supply of +24V DC ± 5% CN1 is a plug-in terminal board with no screw. Be sure to use the external power supply. The +24V DC is used by external input/output signal circuit. The power circuit is configured as follows. Wires for connection to CN1. Solid wire: ϕ 0.32mm to ϕ 0.65mm (AWG28 to AWG22) Twisted wire: 0.08mm2 to 0.
2.7 CN2 Pin Assignments: Main connector The CN2 is the major connector for the motion control I/O signals. No.
2.8 CN3 Pin Assignments: Manual Pulser Input The signals on CN3 is for manual pulser input. No.
2.10 Jumper Setting The J1~J8 is used to set the signal type of the pulse output signals (DIR and OUT). The output signal type could be differential line driver output or open collector output. Please refer to section 3.1 for details of the jumper setting. The default setting is the differential line driver mode. 1 2 3 Line Driver Open Collector J1 2.11 J2 J3 J4 J5 J6 J7 J8 Switch Setting The switch S1 is used to set the EL limit switch’s type.
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 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.12 Section 3.
3.1 Pulse Output Signals OUT and DIR There are 4-axis pulse output signals on PCI-8134. 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.
Output Signal OUT1DIR1OUT2DIR2OUT3DIR3OUT4DIR4- For differential line driver output, close a break between 1 and 2 of J1 J2 J3 J4 J5 J6 J7 J8 For open collector output, close a break between 2 and 3 of: J1 J2 J3 J4 J5 J6 J7 J8 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.
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. u Connection to Line Driver Output To drive the PCI-8134 encoder input, the driver output must provide at least 3.5V across the differential pairs with at least 6 mA driving capability. The ground level of the two sides must be tight together too.
VDD PCI-8134 EA+, EZ+ EA-, EZ- EB+, EB-, R GND External Power for Encoder Motor Encoder / Driver With Open Collector Output A, B phase signals For more detail operation of the encoder feedback signals , please refer to section 4.4.
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. Usually, a limit switch is used to indicate the origin of one axis. The specifications of the limit switches should with contact capacity of +24V, 6mA minimum.
End-Limit Signals PEL and MEL 3.4 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.
Ramping-down Signals PSD and MSD 3.5 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.
3.6 In-position Signal INP The in-position signals INP from the servo motor driver indicate the deviation error is zero, that is the servo position error is zero. The relative signal name, pin number and axis number are shown in the following table. CN2 Pin No 10 28 60 78 Signal Name INP1 INP2 INP3 INP4 Axis # • ‚ ƒ „ The input circuit of the INP signals are shown in the following diagram. Inside PCI-8134 CN2 EX+5V R To PCL5023 If =12mA Max. If =5mA Min.
3.7 Alarm Signal ALM The alarm signal ALM is used to indicate the alarm status from the servo driver. The relative signal name, pin number and axis number are shown in the following table. CN2 Pin No 9 27 59 77 Signal Name ALM1 ALM2 ALM3 ALM4 Axis # • ‚ ƒ „ The input circuit of alarm circuit is shown in the following diagram. The ALM signals are usually from servomotor drivers, which usually provide open collector output signals.
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. an alarm signal stops OUT and DIR signals; 4. an emergency stop command is issued by software (operator). The relative signal name, pin number and axis number are shown in the following table.
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 s hown in the following table. CN2 Pin No 7 25 57 75 Signal Name SVON1 SVON2 SVON3 SVON4 Axis # • ‚ ƒ „ The output circuit of SVON signal is shown in the following diagram.
3.10 General-purpose Signal RDY The RDY signals can be used as motor driver ready input or general−purpose input 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 CN2 EX+5V R To PCL5023 If =12mA Max. If =5mA Min.
3.11 Pulser Input Signals PA and PB The PCI-8134 can accept the input signals from pulser signals through the following pins of connector CN3. The pulser’s behavior is as an encoder. The signals are usually used as generate the position information which guide the motor to follow. CN3 Pin No 2 3 4 5 Signal CN3 Axis # Name Pin No PA1 • 8 PB1 • 9 PA2 ‚ 10 PB2 ‚ 11 Signal Name PA3 PB3 PA4 PB4 Axis # ƒ ƒ „ „ PA and PB pins of connector CN3 are directly connected to PA and PB pins of PCL5023.
3.12 Simultaneously Start/Stop Signals STA and STP The PCI-8134 provides the STA and STP signals, which enable simultaneous start/stop of motions on multiple axes. The STA and STP signals are on the CN4. On one card, two PCL5023 chips provide two sets of STA and STP signals. The following diagram shows the on-board circuits. The STA and STP signals of the four axes are tight together respectively. VCC VCC Inside PCI-8134 PCL5023 CN4 4.7K 4.
To let an external signal to initiate simultaneous start/stop, connect the 7406 (open collector) or the equivalent circuit as follows. PCI-8134 # 1 CN4 STP STA STP STA 3.13 PCI-8134 # 2 CN4 STP STA STP STA PCI-8134 # 3 CN4 STP STA STP STA 7406 STOP 7406 START Daughter Board Connector The CN2 connector of PCI-8134 can be connected with DIN-100S, including a cable ACL-102100 (a 100-pin SCSI-II cable). DIN-100S is a general purpose DIN-socket with 100-pin SCSI-II connector.
4 Operation Theorem This chapter describes the detail operation of the PCI-8134 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 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 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.
OUT DIR Positive Command OUT DIR Negative Command Relative Function: set_pls_optmode(): Refer to section 6.
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). The v_move() function is used to accelerate cons tantly while the sv_move() function is to accelerate according to S-curve (constant jerk). The pulse output rate will keep at maximum velocity until another velocity command is set or stop command is issued.
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.
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. A servomotor is used to drive the moving part through a gear mechanism.
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 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. set_move_ratio(): Refer to section 6.10.
4.1.4 S-curve Profile Motion This mode is used to move one axis motor to a specified position (or distance) with a S-curve velocity profile. S-curve acceleration profiles are useful for both stepper and servo motors. The smooth transitions between the start of the acceleration ramp and the transition to the constant velocity produce less wear and tear than a trapezoidal profile motion. The smoother performance increases the life of the motors and mechanics of a system.
Total time of acceleration is: Tlacc+2Tsacc. The following formula gives the basic relationship between these parameters. max_vel = str_vel + accel*(Tlacc+Tsacc); str_vel = max_vel + decel *(Tldec+Tsdec); accel = Tsacc * jerk1; decel = Tsdec * jerk2; where accel/decel represents the acceleration/deceleration rate at linear accel./decel. section and are in unit of pps/sec. jerk1, jerk2 are in unit of pps/sec^2. The minimum value for setting time of accel./decel. should be 0.
The following two graphs show the results of experiments after executing the unsymmetrical absolute S-curve motion command. Graph1 is the typical result. of S-curve velocity profile. Graph2 is obtained when the amount of command pulses is failed to let the velocity reach the designated maximum velocity. The PCI-8134 automatically lower the maximum velocity thus provide a smooth velocity profile. Command of Graph1: start_tas_move(axis, 500000, 100, 1000000, 0.05, 0.05, 0.2, 0.
4.1.5 Linear and Circular Interpolated Motion Y-Axis In this mode, two axes ( ″X and Y″ or ″Z and U″ axes) is controlled by linear interpolation or circular interpolation by designating the number of pulses respectively. ″Interpolation between two axes″ means the two axes start simultaneously, and reach their ending points at the same time. For example, in the Figure below, we want to move the axes from P0 to P1, and hope the two axes start and stop simultaneously at a period of time ∆t.
4.1.6 Home Return Mode In this mode, you can let the PCI-8134 output pulses until the conditions to complete the home return is satisfied after writing the home_move() command. Finish of home return can be checked by motion_done() function. Or you can check finish of home return accompanied with the interrupt function by setting bit 5 of int_factor to 1 in set_int_factor() function. Moving direction of motors in this mode is determined by the sign of velocity parameter in home_move() function.
(2) Home_mode=1: both ORG and index signal are useful. The ORG signal lets the PCI-8134 starts to wait for EZ signal and then EZ signal stops OUT and DIR pins from outputting pulses to complete the home return. Velocity accel • Writing home-move () command to begin home return operation mvel svel ORG • ‚ ‚ORG Signal ON ƒ time ƒEZ Signal ON EZ (3) Home_mode=2: both ORG and index signal are useful.
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 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 Driver Interface The PCI-8134 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.
You can change the input logic by set_alm_logic() function. Whether or not the PCI-8134 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.
4.3 The Limit Switch Interface and I/O Status In this section, the following I/O signals’ operations are described. • • • • ±SD: Ramping Down sensor ±EL: End-limit sensor ORG: Origin position SVON and RDY I/O status readback In any operation mode, if an ±EL signal is active during moving condition, it will cause PCI-8134 to stop output pulses automatically. If an SD signal is active during moving condition, it will cause PCI-8134 to decelerate. 4.3.
You can use either 'a' contact switch or 'b' contact switch by setting the dip switch S1. The PCI-8134 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 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.
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. EZ can be used to define the absolute position of the mechanism.
4.5 Multiple PCI-8134 Cards Operation The software fuction library support maximum up to 12 PCI-8134 Cards, that means maximum up to 48 axes of motors can be controlled. Since PCI8134 has the characteristic of Plug-and-Play, users do not have to care about setting the Based address and IRQ level of cards. They are automatically assigned by the BIOS of system when booting up.
Change Speed on the Fly 4.6 You can change the velocity profile of command pulse ouput during operation by v_change() function. This function changes the maximum velocity setting during operation. However, if you operate under “Preset Mode” (like start_a_m ove(),…), you are not allowed to change the acceleration parameter during operation because the deceleration point is pre-determined. But changing the acceleration parameter when operating under “Constant Velocity Mode” is valid.
Where the informations of three sensors are acquired from other I/O card. And the resulting velocity profile from experiment is shown below. Relative Function: v_change(): Refer to section 6.
4.7 Interrupt Control The PCI-8134 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.
{ U32 IntSts; while(ThreadOn=TRUE) { ::WaitForSingleObject(hEvent[2],INFINITE); get_int_status(2,&IntSts); ::ResetEvent(hEvent[2]); } return 0; } 4.Start the thread (Use a boolean value to control the thread’s life) ThreadOn=TRUE; AfxBeginThread(IntThreadProc,GetSafeHwnd(),THREAD_PRIORIT Y_HIGHEST); 5.Before exit the program, remember to let the thread go to end naturally.
// header file declare #include “pci_8134.h” PCI_INFO info; #define axis1 1 #define axis5 5 U16 int_flag=0, irq_axs; U32 irq_sts; /****************************************************************************/ /* MAIN Program */ /****************************************************************************/ void main( void ) { U16 i, bn=0, status; _8134_Initial (&bn, &info); // Do System configuration for all I/O signals …………………..
{ get_int_axis(&int_axis); int_flag = 1; irq_axs = int_axis; get_int_status(int_axis, &irq_sts); } else _chain_intr(pcinfo.
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 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 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 cards and their axes and the corresponding status can be viewed. First of all, check if all the PCI-8134 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 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.
• • • • • 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 existed and give the card a base address and IRQ level. _8134_Set_Config () will configure the PCI-8134 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.
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”.
• 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.
5.4 2-D Motion Windows Press 2-D button in operating window will enter this window. This is for 2-D motion test.
5.4.1 Linear Interpolation : After setting motion parameters correctly in “Interpolation Parameter Setting Frame”, you can enter the destination in this frame. Then click Run button to start linear interpolation motion. 5.4.2 Circular Interpolation The setting for circular interpolation mode has three additional parameters in “Interpolation Parameter Setting Frame”. They are arc degree, division axis and optimize option. Please refer to section 6.9 to set them.
5.4.4 Incremental Jog : Incremental jog means that when you click one directional button, the axis will step a distance according to the Step-Size’s setting. 5.4.5 Other Control Objects The above figure shows the result of circular interpolation mode. The graph ® screen is an Active X object from ADLink Daqbench . There are some relative control objects as follows: 1.Zoom 2.Graph Range 3.
The Zoom In/Out buttons are used for changing the display range according to a scale number beside the button. The “Graph Range Frame” controls X or Y axis’s display range. The “Origin Position Frame” let user to pan the display location. There are two home return buttons at the left-down corner of this window. It is useful when user need to return to the origin.
6 Function Library This chapter describes the supporting software for PCI-8134 cards. User can use these functions to develop application program in C or Visual Basic or C++ language. 6.
Trapezoidal Motion Mode a_move(axis, pos, svel, mvel, Tacc); start_a_move(axis, pos, svel, mvel, Tacc); r_move(axis, dist, svel, mvel, Tacc); start_r_move(axis, dist, svel, mvel, Tacc); t_move(axis, dist, svel, mvel, Tacc, Tdec); start_t_move(axis, dist, svel, mvel, Tacc, Tdec); start_ta_move(axis, pos, svel, mvel, Tacc, Tdec); ta_move(axis, pos, svel, mvel, Tacc, Tdec); wait_for_done(axis); S-Curve Profile Motion s_move(axis, pos, svel, mvel, Tlacc, Tsacc); start_s_move(axis, pos, svel, mvel, Tlacc, Tsacc
Linear / Circular Interpolated Motion move_xy(cardNo, x, y); move_zu(cardNo, z, u); arc_xy(cardNo, x_center, y_center, angle); arc_zu(cardNo, z_center, u_center, angle); Section 6.
I/O Control and Monitoring _8134_Set_SVON(axis, on_off); get_io_status(axis, *io_status); Position Control set/get_position(axis, pos); set/get_command(axis, pos); Interrupt Control _8134_Set_INT_ENABLE(axis, intFlag); set_int_factor(axis, int_factor); get_int_axis(*int_axis); get_int_status(axis, *int_status); 76 •Function Library Section 6.15 Set the state of general purpose output bit Get all the I/O staus of PCI-8134 Section 6.
C/C++ Programming Library 6.2 This section gives the details of all the functions. The function prototypes and some common data types are decelerated in PCI-8134.H. These data types are used by PCI-8134 library. We suggest you to use these data types in your application programs. The following table shows the data type names and their range.
6.3 Initialization @ Name _8134_Initial – Software Initialization for PCI-8134 _8134_Close – Software release resources of PCI-8134 _8134_Set_Config – Configure PCI-8134 according to Motion Creator W_8134_Get_IRQ_Channel – Get the PCI-8134 card’s IRQ number W_8134_Get_ Base_Addr – Get the PCI-8134 card’s base address @ Description _8134_Initial: This function is used to initialize PCI-8134 card. Every PCI-8134 card has to be initialized by this function before calling other functions.
void W_8134_Get_Base_Addr(U16 *base_addr ) cardNo, U16 Visual Basic (Windows 95/NT) W_8134_Initial (existCards As Integer, pciInfo As PCI_INFO) As Integer (Windows 95 Only) W_8134_Initial (ByVal cardNo As Long) As Integer (Windows NT Only) W_8134_Close (ByVal cardNo As Long) As Integer (Windows NT Only) W_8134_Set_Config (ByVal fileName As String) As Integer W_8134_Get_IRQ_Channel (ByVal cardno As Integer, irq_no As Integer) W_8134_Get_Base_Addr (ByVal cardno As Integer, base_addr As Integer) @ Argument
6.4 Pulse Input / Output Configuration @ 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.
6.5 Continuously Motion Move @ Name v_move – Accelerate an axis to a constant velocity with trapezoidal profile sv_move – Accelerate an axis to a constant velocity with S-curve profile v_change – Change speed on the fly v_stop – Decelerate to stop @ Description v_move: This function is used to accelerate an axis to the specified constant velocity. The axis will continue to travel at a constant velocity until the velocity is changed or the axis is commanded to stop.
v_change(I16 axis, F64 max_vel, F64 Tacc) As Integer v_stop (ByVal axis As Integer, ByVal Tacc As Double) As Integer @ Argument axis: axis number designated to move or stop.
6.
@ Syntax C/C++ (DOS, Windows 95/NT) 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, F64 Tacc) 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, F64 Tacc) 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, F6
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 wait_for_done(ByVal axis As Integer) As Integer @ Argument axis: axis number designated to move.
6.
U16 tas_move(I16 axis, F64 pos, F64 str_vel, F64 max_vel, F64 Tlacc, F64 Tsacc, F64 Tldec, F64 Tsdec) Visual Basic (Windows 95/NT) start_s_move(ByVal axis As Integer, ByVal pos As Double, ByVal str_vel As Double, ByVal max_vel As Double, ByVal Tlacc As Double, ByVal Tsacc As Double) As Integer s_move(ByVal axis As Integer, ByVal pos As Double, ByVal str_vel As Double, ByVal max_vel As Double ByVal Tlacc As Double, ByVal Tsacc As Double) As Integer start_rs_move(ByVal axis As Integer, ByVal distance As Doubl
6.8 Multiple Axes Point to Point Motion @ Name start_move_all– Begin a multi-axis trapezoidal profile motion move_all–Begin a multi-axis trapezoidal profile motion and wait for completion wait_for_all–Wait for all axes to finish @ Description start_move_all() : This function causes the specified axes to accelerate from a starting velocity, slew at constant velocity, and decelerate to stop at the specified absolute position, immediately returning control to the program.
@ Syntax C/C++ (DOS, Windows 95/NT) U16 start_move_all(I16 len, I16 *axes, F64 *pos, F64 *str_vel, F64 *max_vel, F64 *Tacc) 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) Visual Basic (Windows 95/NT) 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,
6.9 Linear and Circular Interpolated Motion @ Name move_xy – Perform a 2-axes linear interpolated motion between X & Y move_zu – Perform a 2-axes linear interpolated motion between Z & U arc_xy – Perform a 2-axes circular interpolated motion between X & Y arc_xy – Perform a 2-axes circular interpolated motion between Z & U @ Description move_xy, move_zu: These two functions cause a linear interpolation motion between two axes and wait for completion.
arc_zu (ByVal cardno As Long, ByVal z_center As Double, ByVal u_center As Double, ByVal angle As Double) As Integer @ Argument cardNo: card number designated to perform interpolating function.
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_arc_division – Set the interpolation arc segment length arc_optimization – Enable/Disable optimum acceleration calculations for arcs set_move_ratios – Set the axis resolution ratios @ Description map_axes: This function initializes a group of axes for coordinated motion.
where Aopt , is the best acceleration, V is the set_move_speed() velocity, d is the segment length. If the acceleration is higher than Aopt , the linear portions may be noticeable. If the acceleration is lower than Aopt , the motion will be slowed during the arc and it will lose its roundness. Both arc_xy() and arc_zu() automatically change the acceleration to Aopt during the circular interpolated move. set_move_ratio: This function configures scale factors for the specified axis.
6.11 Home Return @ Name set_home_config – Set the configuration for home return. home_move – Perform a home return move. @ Description 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.
home_mode: stopping modes for home return. home_mode=0, ORG active only. home_mode=1, ORG active and then EZ active to stop, high speed all the way. home_mode=2, ORG active and then EZ active to stop, high speed till ORG active then low speed till EZ active. org_logic: Action logic configuration for ORG signal org_logic=0, active low; org_logic=1, active high org_latch: Latch state control for ORG signal org_latch=0, don’t latch input; org_latch=1, latch input.
6.12 Manual Pulser Motion @ Name set_manu_iptmode – Set pulser input mode and operation mode manu_move – Begin a manual pulser movement @ Description set_manu_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.
6.13 Motion Status @ Name motion_done – Return the status when a motion is done @ Description motion_done: Return the motion status of PCI-8134. position. Definition of return value is as following: Return value = 0: the axis is busying.
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. Two reacting modes a re available when ALARM signal is active. set_inp_logic: Set the active logic of In-Position signal input from servo driver.
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. sd_logic=1, latch. alm_mode: reacting modes when receiving ALARM signal. alm_mode=0, motor immediately stops.
6.15 I/O Control and Monitoring @ Name _8134_Set_SVON – Set state of general purpose output pin get_io_status – Get all the I/O status of PCI-8134 @ Description _8134_Set_SVON: Set the High/Low output state of general purpose output pin SVON. get_io_status: Get all the I/O status for each axis.
*io_status: I/O status word. Where “1’ is ON and “0” is OFF. ON/OFF state is read based on the corresponding set logic.
6.16 Position Control @ Name set_position – Set the actual position. get_position – Get the actual position. set_command – Set the current command position. get_position – Get the current command position. @ Description set_position() changes the current actual position to the specified position. get_position() reads the current actual position.
6.17 Interrupt Control @ Name _8134_Set_INT_ENABLE – Set interrupt enable W_8134_INT_Enable – Set interrupt enable W_8134_INT_Disable – Set interrupt disable W_8134_Set_INT_Control – Set interrupt event handle set_int_factor – Set interrupt generating factors get_int_axis – Get the axis which generates interrupt get_int_status – Get the interrupting status of axis @ Description _8134_Set_INT_ENABLE: This function is used to enable interrupt generating to host PC. (This function just support DOS only.
Bit 0 1 2 3 4 5 6 7 8~12 13 14 15 16 17 18~22 23 24~31 Interrupt Factor Stop with the EL signal Stop with the SD signal Stop with the ALM signal Stop with the STP signal Should be set to 0 Completion of home return 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
Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18∼22 23 24~31 Interrupt Type Stop with the +EL signal Stop with the –EL signal Stop with the +SD signal Stop with the –SD signal Stop with the ALM signal Stop with the STP signal Always 0 Always 0 Stop with v_stop() command Stop with home return completed Always 0 Stop with preset movement completed Stop with EA/EB input error Always 0 Stop with PA/PB input error Start with STA signal Acceleration Completed Deceleration Started Always 0 RDY active (AP3 of PC
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 @ Argument cardNo: card number 0,1,2,3… axis: axis number 0,1,2,3,4… intFlag: int flag, 0 or 1 phEvent : event or event array for interrupt axis (Windows) int_factor: interrupt factor, refer to previous interrupt factor table int_axis: interrupt axis number (the return value) int_status: inter
7 Connection Example This chapter shows some connection examples between PCI-8134 and servo drivers and stepping drivers. 7.1 General Description of Wiring Figure 7.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 and pulse input servo driver or stepping driver. CN3: Receive pulse command from manual pulser.
Description of PCI-8134 Indexer Pinouts Terminal Block PCI_8134 CN 1 POWER 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 24 V GND 1 2 CN 2 AXIS 3 4 Pulse Input From external Power Supply To Axis 1~4 10 INP 1 Driver DI / DO 11 RDY 1 Pulse Output 12 EX GND 13 EA1 + 14 EA1 - Driver DI / DO 15 EB1 + Pulse Output 16 EB1 - Machine DI / DO 17
Wiring of PCI-8134 with Servo Driver 3 4 5 6 98 1 99 7 8 9 10 11 12 13 14 15 16 17 18 2 19 20 37 38 39 40 41 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 Driver DI / DO CN 2 AXIS 2 3 4 Motion Creator 8134.
7.2 Connection Example with Servo Driver In this section, we use Panasonic Servo Driver as an example to show how to connect it with PCI-8134. Figure 7.3 show the wiring. Note that: 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.
Wiring of PCI-8134 with Panasonic MSD PCI_8134 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 + 6 PULS SIGN + SIGN COM - 5 8 7 28 COM + SRV-ON CL 11 12 13 ALM COIN SRDY GND 26 25 27 3 OA OA OB OB 19 20 21 22 + + - OZ + OZ - E M Panasonic MSC CNI/F (50-200 W) 1 2 Table MEL ORG MSD PSD PEL Figure 7
Product Warranty/Service ADLINK warrants that equipment furnished will be free from defects in material and workmanship for a period of two years from the date of shipment. During the warranty period, we shall, at our option, either repair or replace any product that proves to be defective under normal operation. This warranty shall not apply to equipment that has been previously repaired or altered outside our plant in any way as to, in the judgment of the manufacturer, affect its reliability.