PCI-8158 High Density & Advanced 8-Axis Servo / Stepper Motion Control Card User’s Manual Manual Rev. 2.00 Revision Date: August 5, 2006 Part No: 50-11139-1000 Advance Technologies; Automate the World.
Copyright 2006 ADLINK TECHNOLOGY INC. All Rights Reserved. The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer. In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.
Getting Service from ADLINK Customer Satisfaction is top priority for ADLINK Technology Inc. Please contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City, Taipei, 235 Taiwan Please email or FAX this completed service form for prompt and satisfactory service.
Table of Contents Table of Contents..................................................................... i List of Tables........................................................................... v List of Figures ........................................................................ vi 1 Introduction ........................................................................ 1 1.1 1.2 1.3 1.4 Features............................................................................... 5 Specifications..........
3.7 3.8 3.9 3.10 3.11 3.12 3.13 Deviation Counter Clear Signal ERC ................................. General-purpose Signal SVON.......................................... General-purpose Signal RDY ............................................ Multi-Functional output pin: DO/CMP ................................ Multi-Functional input pin: DI/LTC/SD/PCS/CLR/EMG...... Pulse Input Signals PA and PB (PCI-8158) ....................... Simultaneously Start/Stop Signals STA and STP..............
4.4 4.5 4.6 4.7 4.8 4.9 Servo ON/OFF switch ................................................... 71 Servo Ready Signal ...................................................... 72 Servo alarm reset switch .............................................. 72 Mechanical switch interface............................................... 72 Original or home signal ................................................. 73 End-Limit switch signal ................................................. 73 Slow down switch .......
Help Menu .................................................................. 111 6 Function Library.............................................................. 113 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 6.18 6.19 6.20 6.21 6.22 List of Functions............................................................... C/C++ Programming Library ............................................ System & Initialization......................................................
List of Tables Table Table Table Table Table Table Table Table Table Table Table Table 1-1: 2-1: 2-2: 2-3: 2-4: 2-5: 3-1: 3-2: 3-3: 4-1: 4-2: 4-3: List of Tables Available Terminal Boards ........................................ 8 P1/P2 Pin Assignments .......................................... 13 K1/K2 Pin Assignments .......................................... 14 J1 to J16 Jumper Settings ...................................... 15 S1 Switch Settings ..................................................
List of Figures Figure 1-1: Block Diagram of the PCI-8158 ................................. 2 Figure 1-2: Flow chart for building an application ........................ 4 Figure 2-1: PCB Layout of the PCI-8158 ...................................
1 Introduction The PCI-8158 is an advanced & high-density 8-axis motion controller card with a PCI interface. It can generate high frequency pulses (6.55MHz) to drive stepper or servomotors. As a motion controller, it can provide 8-axis linear and circular interpolation and continuous interpolation for continuous velocity. Changing position/speed on the fly is also available with a single axis operation. Multiple PCI-8158 cards can be used in one system.
recognize the card index if the entire control system is very large. 2. Emergency Input The emergency input pin can let users wire the emergency bottom to trigger this board to stop sending pulse output once there is any emergency situation. 3. Software’s Security Protection For security protection design, users can set the 16-bit value into EEPROM. Your interface program can use this EEPROM to secure the software and hardware in order to prevent plagiarist.
MotionCreatorPro is a Windows-based application development software package included with the PCI-8158. MotionCreatorPro is useful for debugging a motion control system during the design phase of a project. An on-screen display lists all installed axes information and I/O signal status of the PCI8158. Windows programming libraries are also provided for C++ compiler and Visual Basic. Sample programs are provided to illustrate the operations of the functions.
Figure 1-2 illustrates a flow chart of the recommended process in using this manual in developing an application. Refer to the related chapters for details of each step.
1.1 Features The following list summarizes the main features of the PCI8158 motion control system. X 32-bit PCI bus Plug and Play (Universal) X 8 axes of step and direction pulse output for controlling stepping or servomotor X Maximum output frequency of 6.
operation in one system X Compact PCB design X Includes MotionCreatorPro, a Microsoft Windows-based application development software X PCI-8158 libraries and utilities for Windows 2000/XP. 1.2 Specifications X X Applicable Motors: Z Stepping motors Z AC or DC servomotors with pulse train input servo drivers Performance: Z Number of controllable axes: 8 Z Maximum pulse output frequency: 6.55MPPS, linear, trapezoidal, or S-Curve velocity profile drive Z Internal reference clock: 19.
100 PPS to 6553500 PPS.
1.3 Supported Software 1.3.1 Programming Library Windows 2000/XP DLLs are provided for the PCI-8158 users. These function libraries are shipped with the board. 1.3.2 MotionCreatorPro This Windows-based utility is used to setup cards, motors, and systems. It can also aid in debugging hardware and software problems. It allows users to set I/O logic parameters to be loaded in their own program. This product is also bundled with the card. Refer to Chapter 5 for more details. 1.
2 Installation This chapter describes how to install the PCI-8158. Please follow these steps below: X Check what you have (Section 2.1) X Check the PCB (Section 2.2) X Install the hardware (Section 2.3) X Install the software driver (Section 2.4) X Understanding the I/O signal connections (Chapter 3) and their operation (Chapter 4) X Understanding the connector pin assignments and wiring the connections (the remaining sections) 2.
2.2 PCI-8158 Outline Drawing Figure 2-1: PCB Layout of the PCI-8158 X P1 / P2: Input / Output Signal Connector (100-pin) X K1 / K2: Simultaneous Start / Stop Connector X P3: Manual Pulsar X S1: DIP switch for card index selection (0-15) X J1-J16: Pulse output selection jumper (Line Driver / Open Collector) 2.3 PCI-8158 Hardware Installation 2.3.1 Hardware configuration The PCI-8158 is fully Plug and Play compliant.
2.3.2 PCI slot selection Your computer system may have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PCI-8158 can be used in any PCI slot. 2.3.3 Installation Procedures 1. Read through this manual and setup the jumper according to your application 2. Turn off your computer. Turn off all accessories (printer, modem, monitor, etc.) connected to computer. Remove the cover from your computer. 3. Select a 32-bit PCI expansion slot.
2.4 Software Driver Installation 1. Auto run the ADLINK All-In-One CD. Choose Driver Installation -> Motion Control -> PCI-8158 2. Follow the procedures of the installer. 3. After setup installation is completed, restart windows. Note: 12 Please download the latest software from the ADLINK website if necessary.
2.5 P1/P2 Pin Assignments: Main Connector P1 / P2 are the main connectors for the motion control I/O signals. No. Name I/O Function 1 VDD O +5V power supply output 2 EXGND - Ext. power ground 3 OUT0+ O Pulse signal (+) 4 OUT0- O 5 DIR0+ 6 Name I/O Function 51 VDD O +5V power supply output 52 EXGND - Ext. power ground 53 OUT2+ O Pulse signal (+) Pulse signal (-) 54 OUT2- O Pulse signal (-) O Dir. signal (+) 55 DIR2+ O Dir. signal (+) DIR0- O Dir.
No. Name I/O Function No. Name I/O Function 35 36 EZ1+ I EZ1- I Encoder Z-phase (+) 85 Encoder Z-phase (-) 86 EZ3+ I Encoder Z-phase (+) EZ3- I 37 PEL0 I End limit signal (+) Encoder Z-phase (-) 87 PEL2 I 38 MEL0 I End limit signal (+) End limit signal (-) 88 MEL2 I 39 GDI0 End limit signal (-) I DI/LTC/PCS/SD/CLR0 89 GDI2 I DI/LTC/PCS/SD/CLR2 40 41 DO0 O General Output 0 90 DO2 O General Output 2 ORG0 I Origin signal 91 ORG2 I 42 EXGND Ext.
2.7 J1 to J16 Jumper Settings for Pulse Output J1-J16 are used to set the type of pulse output signals (DIR and OUT). The output signal type can either be differential line driver or open collector output. Refer to Section 3.1 for detail jumper settings. The default setting is differential line driver mode.
2.8 S1 Switch Settings for Card Index The S1 switch is used to set the card index. For example, if you turn 1 to ON and others are OFF. It means the card index as 1. The value is from 0 to 15. Refer to the following table for details.
2.9 P3 Manual Pulse The signals on P3 are for manual pulse input. No. Name Function (Axis) 1 VDD Isolated Power +5V 2 PA+ Pulse A+ phase signal input 3 PA- Pulse A- phase signal input 4 PB+ Pulse B+ phase signal input 5 PB- Pulse B- phase signal input 6 EXGND External Ground 7 N/A Not Available 8 N/A Not Available 9 N/A Not Available Table 2-5: P3 Manual Pulse Note: Installation The +5V and GND pins are directly given by the PCI-bus power.
18 Installation
3 Signal Connections Signal connections of all I/O’s are described in this chapter. Refer to the contents of this chapter before wiring any cable between the PCI-8158 and any motor driver. This chapter contains the following sections: Section 3.1 Pulse Output Signals OUT and DIR Section 3.2 Encoder Feedback Signals EA, EB and EZ Section 3.3 Origin Signal ORG Section 3.4 End-Limit Signals PEL and MEL Section 3.5 In-position signals INP Section 3.6 Alarm signal ALM Section 3.
3.1 Pulse Output Signals OUT and DIR There are 8 axis pulse output signals on the PCI-8158. For each axis, two pairs of OUT and DIR differential signals are used to transmit the pulse train and indicate the direction. The OUT and DIR signals can also be programmed as CW and CCW signal pairs. Refer to Section 4.1.1 for details of the logical characteristics of the OUT and DIR signals. In this section, the electrical characteristics of the OUT and DIR signals are detailed.
P2 Pin No.
Output Signal For differential line driver output, close breaks between 1 and 2 of: For open collector output, close breaks between 2 and 3 of: DIR3+ J12 J12 OUT4+ J5 J5 DIR4+ J13 J13 OUT5+ J6 J6 DIR5+ J14 J14 OUT6+ J7 J7 DIR6+ J15 J15 OUT7+ J8 J8 DIR7+ J16 J16 Table 3-3: Output Signal The default setting of OUT and DIR is set to differential line driver mode. The following wiring diagram is for OUT and DIR signals on the 2 axes.
Suggest Usage: Jumper 2-3 shorted and connect OUT-/DIR- to a 470 ohm pulse input interface’s COM of driver. See the following figure. Choose OUT-/DIR- to connect to driver’s OUT/DIR Warning: The sink current must not exceed 20mA or the 26LS31 will be damaged! 3.2 Encoder Feedback Signals EA, EB and EZ The encoder feedback signals include EA, EB, and EZ. Every axis has six pins for three differential pairs of phase-A (EA), phase-B (EB), and index (EZ) inputs.
P2 Pin No Signal Name Axis # P2 Pin No Signal Name Axis # 13 EA4+ 4 14 EA4- 4 15 EB4+ 4 16 EB4- 4 31 EA5+ 5 32 EA5- 5 33 EB5+ 5 34 EB5- 5 63 EA6+ 6 64 EA6- 6 65 EB6+ 6 66 EB6- 6 81 EA7+ 7 82 EA7- 7 83 EB7+ 7 84 EB7- 7 P1 Pin No Signal Name Axis # P1 Pin No Signal Name Axis # 17 EZ0+ 0 18 EZ0- 0 35 EZ1+ 1 36 EZ1- 1 67 EZ2+ 2 68 EZ2- 2 85 EZ3+ 3 86 EZ3- 3 P2 Pin No Signal Name Axis # P2 Pin No Signal Name Axis # 17 EZ4+ 4 18 EZ4- 4
Please note that the voltage across each differential pair of encoder input signals (EA+, EA-), (EB+, EB-), and (EZ+, EZ-) should be at least 3.5V. Therefore, the output current must be observed when connecting to the encoder feedback or motor driver feedback as not to over drive the source. The differential signal pairs are converted to digital signals EA, EB, and EZ; then feed to the motion control ASIC. Below are examples of connecting the input signals with an external circuit.
Encoder Power (V) External Resistor R +5V 0Ω(None) +12V 1.5kΩ +24V 3.0kΩ If = 8mA For more operation information on the encoder feedback signals, refer to Section 4.4.
3.3 Origin Signal ORG The origin signals (ORG0-ORG7) are used as input signals for the origin of the mechanism. The following table lists signal names, pin numbers, and axis numbers: P1 Pin No Signal Name Axis # 41 ORG0 0 47 ORG1 1 91 ORG2 2 97 ORG3 3 P2 Pin No Signal Name Axis # 41 ORG4 4 47 ORG5 5 91 ORG6 6 97 ORG7 7 The input circuit of the ORG signals is shown below. Usually, a limit switch is used to indicate the origin on one axis.
3.4 End-Limit Signals PEL and MEL There are two end-limit signals PEL and MEL for each axis. PEL indicates the end limit signal is in the plus direction and MEL indicates the end limit signal is in the minus direction.
3.5 In-position Signal INP The in-position signal INP from a servo motor driver indicates its deviation error. If there is no deviation error then the servo’s position indicates zero.
3.6 Alarm Signal ALM The alarm signal ALM is used to indicate the alarm status from the servo driver. The signal names, pin numbers, and axis numbers are shown in the table below: P1 Pin No Signal Name Axis # 9 ALM0 0 27 ALM1 1 59 ALM2 2 77 ALM3 3 P2 Pin No Signal Name Axis # 9 ALM4 4 27 ALM5 5 59 ALM6 6 77 ALM7 7 The input alarm circuit is shown below. The ALM signal usually is generated by the servomotor driver and is ordinarily an open collector output signal.
3.7 Deviation Counter Clear Signal ERC The deviation counter clear signal (ERC) is active in the following 4 situations: 1. Home return is complete 2. End-limit switch is active 3. An alarm signal stops OUT and DIR signals 4.
3.8 General-purpose Signal SVON The SVON signal can be used as a servomotor-on control or general purpose output signal.
3.9 General-purpose Signal RDY The RDY signals can be used as motor driver ready input or general purpose input signals.
3.10 Multi-Functional output pin: DO/CMP The PCI-8158 provides 8 multi-functional output channels: DO/ CMP0 to DO/CMP7 corresponds to 8 axes. Each of the output pins can be configured as Digit Output (DO) or as Comparison Output (CMP) individually. When configured as a Comparison Output pin, the pin will generate a pulse signal when the encoder counter matches a pre-set value set by the user. The multi-functional channels are located on P1 and P2.
3.11 Multi-Functional input pin: DI/LTC/SD/PCS/CLR/ EMG The PCI-8158 provides 8 multi-functional input pins. Each of the 8 pins can be configured as DI(Digit Input) or LTC(Latch) or SD(Slow down) or PCS(Target position override) or CLR(Counter clear) or EMG(Emergency). To select the pin function, please refer to 6.12. The multi-functional input pins are on P1 and P2.
3.12 Pulse Input Signals PA and PB (PCI-8158) The PCI-8158 can accept differential pulse input signals through the pins of PN1 listed below. The pulse behaves like an encoder. The A-B phase signals generate the positioning information, which guides the motor. P3 Pin No Signal Name Axis # P3 Pin No Signal Name Axis # 2 PA+ 0-7 3 PA- 0-7 4 PB+ 0-7 5 PB- 0-7 The pulse signals are used for Axis 0 to Axis 7.
3.13 Simultaneously Start/Stop Signals STA and STP The PCI-8158 provides STA and STP signals, which enable simultaneous start/stop of motions on multiple axes. The STA and STP signals are on CN4. The diagram below shows the onboard circuit. The STA and STP signals of the four axes are tied together respectively. The STP and STA signals are both input and output signals. To operate the start and stop action simultaneously, both software control and external control are needed.
You can also use external start and stop signals to issue a crosscard simultaneous motor operation. Just connect external start and stop signals to STA and STP pins on the K1 connector of the first PCI-8158 card.
Signal Connections 39
40 Signal Connections
4 Operation Theory This chapter describes the detail operation of the motion controller card. Contents of the following sections are as follows: Section 4.1: Classifications of Motion Controller Section 4.2: Motion Control Modes Section 4.3: Motor Driver Interface Section 4.4: Mechanical switch Interface Section 4.5: The Counters Section 4.6: The Comparators Section 4.7: Other Motion Functions Section 4.8: Interrupt Control Section 4.9: Multiple Cards Operation 4.
4.1.2 Pulse type motion control Interface The second motion and motor control interface type of is pulses train. As a trend of digital world, pulse train types represents a new concept to motion control. The counts of pulses show how many steps of a motor rotates and the frequency of pulses show how fast a motor runs. The time duration of frequency changes represent the acceleration rate of a motor.
A motion control system needs an absolutely real-time control cycle and the calculation on controller must provide a control data at the same cycle. If not, the motor will not run smoothly. This is typically accomplished by using the PC’s computing power and by a simple a feedback counter card and a voltage output or pulse output card. This method is very low-end but requires extensive software development. To ensure real-time performance, real-time software will be used on the system.
4.1.7 Compare Table of all motion control types Price Software ASIC DSP *Fair Cheap Expensive Functionality Highest Low Normal Maintenance Hard Easy Fair Analog Pulses Network Price High Low **Normal Signal Quality (refer to distance) Fair Good Best Maintenance Hard Fair Easy * Real-time OS included ** DSP or software real-time OS is needed 4.1.8 PCI-8158’s motion controller type The PCI-8158 is an ASIC based, pulse type motion controller.
4.2 Motion Control Modes Motor control is not only for positive or negative moving, motion control can make the motors run according to a specific speed profile, path trajectory and synchronous condition with other axes. The following sections describe the motion control modes of this motion controller could be performed. 4.2.1 Coordinate system The Cartesian coordinate system and pulses for the unit of length are used . The physical length depends on mechanical parts and motor’s resolution.
pulses per 1mm and the motor will move 1mm if the motion controller send 1,000 pulses, It means that when we want to move 1 mm, we need to send 1,000 pulses to motor driver then we will get the encoder feedback value of 10,000 pulses. If we want to use an absolute command to move a motor to 10,000 pulses position and current position read from encoder is 3500 pulses, how many pulses will it send to motor driver? The answer is (10000 – 3500 ) / (10,000 / 1,000)=650 pulses.
4.2.3 Trapezoidal speed profile A trapezoidal speed profile means the acceleration/deceleration area follows a first-order linear velocity profile (constant acceleration rate). The profile chart is shown as follows: The area of the velocity profile represents the distance of this motion. Sometimes, the profile looks like a triangle because the desired distance is smaller than the area of given speed parameters.
these areas. We call this shape as “bell” curve. It adds a linear curve between the upper side of s-curve and lower side of s-curve. This shape improves the speed of acceleration and also reduces the vibration of acceleration.
The S-curve profile motion functions are designed to always produce smooth motion. If the time for acceleration parameters combined with the final position don’t allow an axis to reach the maximum velocity (i.e. the moving distance is too small to reach MaxVel), then the maximum velocity is automatically lowered (see the following Figure). The rule is to lower the value of MaxVel and the Tacc, Tdec, VSacc, VSdec automatically, and keep StrVel, acceleration, and jerk unchanged.
4.2.6 One axis position mode Position mode means the motion controller will output a specific amount of pulses which is equal to the desired position or distance. The unit of distance or position is pulse internally on the motion controller. The minimum length of distance is one pulse. With the PCI-8158, we provide a floating point function for users to transform a physical length to pulses.
4.2.7 Two axes linear interpolation position mode “Interpolation between multi-axes” means these axes start simultaneously, and reach their ending points at the same time. Linear means the ratio of speed of every axis is a constant value. Assume that we run a motion from (0,0) to (10,4). The linear interpolation results are shown as below. The pulses output from X or Y axis remains 1/2 pulse difference according to a perfect linear line.
The speed ratio along X-axis and Y-axis is (∆X: ∆Y), respectively, and the vector speed is: When calling 8-axis linear interpolation functions, the vector speed needs to define the start velocity, StrVel, and maximum velocity, MaxVel. 4.2.8 Two axes circular interpolation mode Circular interpolation means XY axes simultaneously starts from initial point, (0,0) and stop at end point,(1800,600). The path between them is an arc, and the MaxVel is the tangential speed.
The command precision of circular interpolation is shown below. The precision range is at radius ±1/2 pulse. 4.2.9 Continuous motion Continuous motion means a series of motion command or position can be run continuously. You can set a new command right after previous one without interrupting it. The motion controller can make it possible because there are three command buffers (preregisters) inside.
the fourth command into second buffer. Normally, if users have enough time to set a new command into second buffer before executing register is finished, the motion can run endlessly. The following diagram shows this architecture of continuous motion. In addition to a position command, the speed command should be set correctly to perform a speed continuous profile. For the following example, there are three motion command of this continuous motion. The second one has high speed than the others.
If the speed value of the second command is less than the others, the settings would be like the following diagram: For 8-axis continuous arc interpolation, it is the same concept. You can set the speed matched between the speed settings of two commands. If the INP checking is enabled, the motion will have some delayed between each command in buffers. INP check enabled makes the desired point be reached but reduces the smoothing between each command.
needs to find a zero point of this machine. Our motion controller provides a home return mode to make it. We have many home modes and each mode contents many control phases. All of these phases are done by the ASIC. No software is needed or CPU loading will be taken. After home return is completed, the target counter will be reset to zero at the desired condition of home mode, such as a raising edge when ORG input.
Operation Theory 57
58 Operation Theory
Operation Theory 59
60 Operation Theory
Operation Theory 61
62 Operation Theory
4.2.11 Home Search Function This mode is used to add auto searching function on normal home return mode described in previous section no matter which position the axis is. The following diagram shows an example for home mode 2 via home search function. The ORG offset can’t be zero. The suggested value is the double length of ORG area.
4.2.12 Manual Pulse Function The manual pulse is a device to generate pulse trains by hand. The pulses are sent to motion controller and re-directed to pulse output pins. The input pulses could be multiplied or divided before sending out. The motion controller receives two kinds of pulse trains from manual pulse device: CW/CCW and AB phase. If the AB phase input mode is selected, the multiplier has additional selection of 1, 2, or 4. The following figure shows pulse ratio block diagram. 4.2.
4.2.14 Speed Override Function Speed override means that you can change speed of the command during the operation of motion. The change parameter is a percentage of original defined speed. You can define a 100% speed value then change the speed by percentage of original speed when motion is running. If users didn’t define the 100% speed value. The default 100% speed is the latest motion command’s maximum speed. This function can be applied on any motion function.
relative pulses are smaller than original slow down pulses, this function can’t work properly. 4.3 The motor driver interface We provide several dedicated I/Os which can be connected to motor driver directly and have their own functions. Motor drivers have many kinds of I/O pins for external motion controller to use.
Single Pulse Output Mode (OUT/DIR Mode) Mode Output of OUT pin Output of DIR pin Dual pulse output Pulse signal in plus (or CW) (CW/CCW) direction Pulse signal in minus (or CCW) direction Single pulse output (OUT/DIR) Direction signal (level) Pulse signal In this mode, the OUT pin is for outputting command pulse chain. The numbers of OUT pulse represent distance in pulse. The frequency of the OUT pulse represents speed in pulse per second.
respectively. The numbers of pulse represent distance in pulse. The frequency of the pulse represents speed in pulse per second. Pulses output from the CW pin makes the motor move in positive direction, whereas pulse output from the CCW pin makes the motor move in negative direction. The following diagram shows the output waveform of positive (+) commands and negative (-) commands. The command pulses are counted by a 28-bit command counter.
If you don’t use encoder for motion controller, the feedback source for this counter must be set as pulse command output or the counter value will always be zero. If it is set as pulse command output, users can get the position counter value from pulse command output counter because the feedback pulses are internal counted from command output pulses. The following diagrams show these two types of pulse feedback signal.
The following diagram shows the waveform. The index input (EZ) signal is as the zero reference in linear or rotary encoder. The EZ can be used to define the mechanical zero position of the mechanism. The logic of signal must also be set correctly to get correct result. 4.3.3 In position signal The in-position signal is an output signal from motor driver. It tells motion controllers a motor has been reached a position within a predefined error. The predefined error value is in-position value.
4.3.4 Servo alarm signal The alarm signal is an output signal from motor driver. It tells motion controller that there has something error inside servo motor or driver. Once the motion controller receives this signal, the pulses command will stop sending and the status of ALM signal will be ON. The reasons of alarm could be servo motor’s over speed, over current, over loaded and so on. Please check motor driver’s manual about the details. The logic of alarm signal must be set correctly.
on, the motor will be held because the control loop of driver is active. Be careful that when the axis is vertically installed and the servo signal is turned off, the axis will be in uncontrolled state and it can fall. Some situations, such as a servo alarm and emergency signal ON may result in the same state. 4.3.7 Servo Ready Signal The servo ready signal is a general digital input on motion controller. It has no relative purpose to motion controller.
4.4.1 Original or home signal Our controller provides one original or home signal for each axis. This signal is used for defining the zero position of this axis. The logic of this signal must be set properly before doing home procedure. Please refer to home mode section for details. 4.4.2 End-Limit switch signal The end-limit switches are usually installed on both ending sides of one axis. We must install plus EL at the positive position of the axis and minus EL at the negative position of the axis.
4.4.5 Counter Clear switch The counter clear switch is an input signal which makes the counters of motion controller to reset. If you need to reset a counter according to external command, use this pin as controlling source. 4.4.6 Counter Latch switch The counter latch switch is an input signal which makes counter value to be kept into a register when this input active. If you need to know counter value at the active moment of one input, they can connect this pin to catch that. 4.4.
4.5.1 Command position counter The command position counter is a 28-bit binary up/down counter. Its input source is the output pulses from the motion controller. It provides the information of the current command position. It is useful for debugging the motion system. Our motion system is an open loop type. The motor driver receives pulses from motion controller and drive the motor to move. When the driver is not moving, it can check this command counter and see if there is an update value on it.
The value is calculated from command subtracting feedback position. If the ratio between command and feedback is not 1:1, the error counter is meaningless. This counter is a 16-bit binary up/down counter. 4.5.4 General purpose counter The source of general purpose counter could be any of the following: 1. Command position output – the same as a command position counter 2. Feedback position input – the same as a feedback position counter 3. Manual Pulse input – default setting 4.
4.6 The Comparators There are 5 counter comparators of each axis. Each comparator has dedicated functions. They are: 1. Positive soft end-limit comparator to command counter 2. Negative soft end-limit comparator to command counter 3. Command and feedback error counter comparator 4. General comparator for all counters 5. Trigger comparator for all command and feedback counters 4.6.1 Soft end-limit comparators There are two comparators for end-limit function of each axis.
4.6.4 Trigger comparator The trigger comparator is much like general comparator. It has an additional function, generating a trigger pulse when condition is met. Once the condition is met, the CMP pin on the connector will output a pulse for specific purpose like triggering a camera to catch picture. Not all of axes have this function. It depends on the existence of CMP pin of the axis. The following diagram shows the application of triggering.
4.7.1 Backlash compensation and slip corrections The motion controller has backlash and slip correction functions. These functions output the number of command pulses in FA speed. The backlash compensation is performed each time when the direction changes on operation. The slip correction function is performed before a motion command, regardless of the direction. The correction amount of pulses can be set through the function library. 4.7.
Our motion library has a series of functions to know the actual speed profile of the command from users. 4.8 Interrupt Control The motion controller can generate an interrupt signal to the host PC. It is much useful for event-driven software application. Users can use this function _8158_int_control() to enable or disable the interrupt service. There are three kinds of interrupt sources on PCI-8158.
Motion Interrupt Source Bit Settings Bit Description 0 Normally Stop 1 Next command in buffer starts 2 Command pre-register 2 is empty and allow new command to write 3 0 4 Acceleration Start 5 Acceleration End 6 Deceleration Start 7 Deceleration End 8 +Soft limit or comparator 1 is ON 9 -Soft limit or comparator 2 is ON 10 Error comparator or comparator 3 is ON 11 General comparator or comparator 4 is ON 12 Trigger comparator or comparator 5 is ON 13 Counter is reset by CLR inpu
Error Interrupt return codes Value Description 0 +Soft Limit is ON and axis is stopped 1 -Soft Limit is ON and axis is stopped 2 Comparator 3 is ON and axis is stopped 3 General Comparator or comparator 4 is ON and axis is stopped 4 Trigger Comparator or comparator 5 is ON and axis is stopped 5 +End Limit is on and axis is stopped 6 -End Limit is on and axis is stopped 7 ALM is happened and axis is stop 8 CSTP is ON or _8158_stop_move_all is on and axis is stopped 9 CEMG is on and axis
GPIO Interrupt Source Bit Settings (1=Enable,0=Disable) Bit Description 0 DI0 falling edge 1 DI1 falling edge 2 DI2 falling edge 3 DI3 falling edge 4 DI0 raising edge 5 DI1 raising edge 6 DI2 raising edge 7 DI3 raising edge 8 Pin23 input interrupt 9 Pin57 input interrupt 10 Pin23/57 interrupt mode selection (0=falling, 1=raising) 11-14 0 15 GPIO interrupt switch ( Always=1) Table 4-3: GPIO Interrupt Source Bit Settings The steps for using interrupts: 1.
4.9 Multiple Card Operation The motion controller allows more than one card in one system. Since the motion controller is plug-and-play compatible, the base address and IRQ setting of the card are automatically assigned by the PCI BIOS at the beginning of system booting. You don’t need and can’t change the resource settings. When multiple cards are applied to a system, the number of card must be noted. The card number depends on the card ID switch setting on the board.
5 MotionCreatorPro After installing the hardware (Chapters 2 and 3), it is necessary to correctly configure all cards and double check the system before running. This chapter gives guidelines for establishing a control system and manually testing the 8158 cards to verify correct operation. The MotionCreatorPro software provides a simple yet powerful means to setup, configure, test, and debug a motion control system that uses 8158 cards.
5.2 About MotionCreatorPro Before Running MotionCreatorPro, the following issues should be kept in mind. 1. MotionCreatorPro is a program written in VB.NET 2003, and is available only for Windows 2000/XP with a screen resolution higher than 1024x768. It cannot be run under DOS. 2. 2.MotionCreatorPro allows users to save settings and configurations for 8158 cards. Saved configurations will be automatically loaded the next time MotionCreatorPro is executed. Two files, 8158.ini and 8158MC.
5.3 MotionCreatorPro Form Introducing 5.3.1 Main Menu The main menu appears after running MotionCreatorPro.
5.3.2 Select Menu The select menu appears after running MotionCreatorPro.
5.3.3 Card Information Menu This menu shows Information about this card.
5.3.4 Configuration Menu In this menu, you can configure ALM, INP, ERC, EL, ORG, and EZ. 1. ALM Logic and Response mode: Select logic and response modes of ALM signal. The related function call is _8158_set_alm(). 2. INP Logic and Enable/Disable selection: Select logic, and Enable/ Disable the INP signal. The related function call is _8158_set_inp() 3. ERC Logic and Active timing: Select the Logic and Active timing of the ERC signal. The related function call is _8158_set_erc(). 4.
5. ORG Logic: Select the logic of the ORG signal. The related function call is _8158_set_home_config(). 6. EZ Logic: Select the logic of the EZ signal. The related function call is _8158_set_home_config(). 7. Buttons: Z Next Card: Change operating card. Z Next Axis: Change operating axis. Z Save Config: Save current configuration to 8158.ini and 8158MC.ini. Z Close: Close the menu.
In this menu, you can configure LTC, SD, PCS, and Select_Input. 1. LTC Logic: Select the logic of the LTC signal. The related function call is _8158_set_ltc_logic(). 2. LTC latch_source: Select the logic of the latch_source signal. The related function call is _8158_set_latch_source (). 3. SD Configuration: Configure the SD signal. The related function call is _8158_set_sd(). 4. PCS Logic: Select the logic of the SelectNo signal. The related function call is _8158_set_pcs_logic(). 5.
function call is _8158_set_gpio_input_function. 7. Buttons: Z Next Card: Change operating card. Z Next Axis: Change operating axis. Z Save Config: Save current configuration to 8158.ini And 8158MC.ini. Z Close: Close the menu.
In this menu, you can configure pulse input/output and move ratio and INT factor. 1. Pulse Output Mode: Select the output mode of the pulse signal (OUT/ DIR). The related function call is _8158_set_pls_outmode(). 2. Pulse Input: Sets the configurations of the Pulse input signal(EA/EB). The related function calls are _8158_set_pls_iptmode(), _8158_set_feedback_src(). 3. INT Factor: Select factors to initiate the event int. The related function call is _8158_set_int_factor(). 4.
5.3.5 Single Axis Operation Menu In this menu, you can change the settings a selected axis, including velocity mode motion, preset relative/absolute motion, manual pulse move, and home return. 1. Position: Z Command: displays the value of the command counter. The related function is _8158_get_command(). Z Feedback: displays the value of the feedback position counter. The related function is _8158_get_position() Z Pos Error: displays the value of the position error counter.
_8158_get_target_pos(). 2. Position Reset: clicking this button will set all positioning counters to a specified value. The related functions are: _8158_set_position() _8158_set_command() _8158_reset_error_counter() _8158_reset_target_pos() 3. Motion Status: Displays the returned value of the _8158_motion_done function. The related function is _8158_motion_done(). 4. INT Status: Z int_factor bit no: Set int_factor bit. Z Normal INT: display of Normal INT status.
7. Operation Mode: Select operation mode. Z Absolute Mode: “Position1” and “position2” will be used as absolution target positions for motion. The related functions are _8158_start_ta_move(), _8158_start_sa_move(). Z Relative Mode: “Distance” will be used as relative displacement for motion. The related function is _8158_start_tr_move(), _8158_start_sr_move(). Z Cont. Move: Velocity motion mode. The related function is _8158_tv_move(), _8158_start_sv_move(). Z Manual Pulse Move: Manual Pulse motion.
check box “ATU” is checked, it will execute auto homing when motion starts. Z ERC Output: Select if the ERC signal will be sent when home move completes. Z EZ Count: Set the EZ count number, which is effective on certain home return modes. Z Mode: Select the home return mode. There are 13 modes available. Z Home Mode figure: The figure shown explains the actions of the individual home modes. Z Close: Click this button close this window. 8. Position: Set the absolute position for “Absolute Mode.
position1<->position2). It is only effective when “Relative Mode” or “Absolute Mode” is selected. 11. Vel. Profile: Select the velocity profile. Both Trapezoidal and S-Curve are available for “Absolute Mode,” “Relative Mode,” and “Cont. Move.” 12.FA Speed/ATU: Sets the configurations of the FA Speed. The related function calls are _8158_set_fa_speed().If the check box “ATU” is checked, it will execute auto homing when motion starts. 13.Motion Parameters: Set the parameters for single axis motion.
14.Speed_Profile: Clicking this button will show the Speed Profile. 15.Digital I/O: Display and set Digital I/O. The related function is _8158_get_gpio_output(),_8158_get_gpio_input(), _8158_set_gpio_output(). 16.Servo On: Set the SVON signal output status. The related function is _8158_set_servo(). 17.Play Key: Left play button: Clicking this button will cause the 8158 start to outlet pulses according to previous setting. 100 Z In “Absolute Mode,” it causes the axis to move to position1.
Right play button: Clicking this button will cause the 8158 start to outlet pulses according to previous setting. Z In “Absolute Mode,” it causes the axis to move to position. Z In “Relative Mode,” it causes the axis to move backwards. Z In “Cont. Move,” it causes the axis to start to move according to the velocity setting, but in the opposite direction. Z In “Manual Pulse Move,” it causes the axis to go into pulse move. The speed limit is the value set by “Maximum Velocity.” 18.
5.3.6 Two-Axis Operation Menu In this menu, users can change the settings two selected axis, including velocity mode motion, preset relative/absolute motion. 1. Motion Parameters: Set the parameters for single axis motion. This parameter is meaningless if “Manual Pulse Move” is selected, since the velocity and moving distance is decided by pulse input. 102 Z Start Velocity: Set the start velocity of motion in units of PPS. In “Absolute Mode” or “Relative Mode,” only the value is effective.
Z Tacc: Set the acceleration time in units of second. Z Tdec: Set the deceleration time in units of second. Z Sacc: Set the S-curve range during acceleration in units of PPS. Z Sdec: Set the S-curve range during deceleration in units of PPS. 2. Repeat Mode: When “On” is selected, the motion will become repeat mode (forward<->backward or position1<->position2). It is only effective when “Relative Mode” or “Absolute Mode” is selected. 3. Vel. Profile: Select the velocity profile.
10.Current Position: Z Command: displays the value of the command counter. The related function is _8158_get_position(). 11. Velocity: The absolute value of velocity in units of PPS. The related function is _8158_get_current_speed(). 12.Play Key: Left play button: Clicking this button will cause the 8158 start to outlet pulses according to previous setting. Z In “Absolute Mode”, it causes the axis to move to position1. Z In “Relative Mode”, it causes the axis to move forward.
5.3.7 2D_Motion Menu Press 2-D button in operating window will enter this window. This is for 2-D motion test. It includes the following topics: X Linear Interpolation X Circular Interpolation X Incremental Jog X Continuous Jog X Other Control Objects 1. Jog Type: Z Continuous Jog: Continuous Jog means that when you press one directional button, the axis will continuously move with an increasing speed.
the faster it runs. When you un-press the button, the axis will stop immediately. Z 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. 2. Jog Setting: Set the parameters for single axis motion. This parameter is meaningless if “Jog Mode” is selected, since the velocity and moving distance is decided by pulse input. Z Start Velocity: Set the start velocity of motion in units of PPS.
target positions for motion when “Linear Interpolation Mode” is selected. “Dis EndPos” and “Dis Center” will be used as absolution target positions for motion when “Circular Interpolation Mode” is selected. The related function is _8158_start_tr_move(), _8158_start_sr_move(). 4. DIR: Specified direction of arc, CW/CCW, It is only effective when “Circular Interpolation Mode” is selected. 5. Vel. Profile: Select the velocity profile.
9. Jog Command: Press one directional button to move. 10.Velocity: The absolute value of velocity in units of PPS. The related function is _8158_get_current_speed(). 11. Interpolation Command: Z Command: displays the value of the command counter. The related function is _8158_get_command(). 12.Current Position: Z Feedback: displays the value of the feedback position counter. The related function is _8158_get_position(). 13.Home Mode: Home return motion.
After setting these parameters, you can enter the arc center and degree in “Play Key Frame”. Click Run button to start circular interpolation motion. Z Jog Type: Continuous Jog Continuous Jog means that when you press one directional button, the axis will continuously move with an increasing speed. The longer you press, the faster it runs. When you unpress the button, the axis will stop immediately.
X Stop Button: Clicking this button will cause the 8158 to decelerate and stop. The deceleration time is defined in “Decel. Time.” The related function is _8158_sd_stop(). 17.Buttons: Z •Next Card: Change operating card. Z •Save Config: Save current configuration to 8158.ini And 8158MC.ini. Z •Close: Close the menu. 18.Graph Range Frame: Z Clear: Clear the Motion Graph. Z Center: Display the Motion Graph in center position. 19.Graph Range: controls X or Y axis’s display range. 20.
5.3.8 Help Menu In this menu, users can Click Mouse Right Key to show Help Information.
112 MotionCreatorPro
6 Function Library This chapter describes the supporting software for the PCI-8158 card. User can use these functions to develop programs in C, C++, or Visual Basic. If Delphi is used as the programming environment, you will need to transform the header files and pci_8158.h manually.
6.1 List of Functions System & Initialization Section 6.3 Function Name Description _8158_initial Card initialization _8158_close Card Close _8158_get_version Check the hardware and software version _8158_set_security_key Set security the password _8158_check_security_key Check security the password _8158_reset_security_key Reset the security password to default value _8158_config_from_file Config PCI-8158 setting from file Pulse Input/Output Configuration Section 6.
Single Axis Position Mode Section 6.6 Function Name Description _8158_start_tr_move Begin a relative trapezoidal profile move _8158_start_ta_move Begin an absolute trapezoidal profile move _8158_start_sr_move Begin a relative S-curve profile move _8158_start_sa_move Begin an absolute S-curve profile move _8158_set_move_ratio Set the ratio of command pulse and feedback pulse. _8158_position_override Change position on the fly Linear Interpolated Motion Section 6.
Function Name Description _8158_start_tr_move_cd Begin a relative 2-axis linear interpolation for C & D, with trapezoidal profile _8158_start_ta_move_cd Begin an absolute 2-axis linear interpolation for C & D, with trapezoidal profile _8158_start_sr_move_cd Begin a relative 2-axis linear interpolation for C & D, with S-curve profile _8158_start_sa_move_cd Begin an absolute 2-axis linear interpolation for C & D, with S-curve profile _8158_start_tr_line2 Begin a relative 2-axis linear interpolation
Circular Interpolation Motion Section 6.
Function Name Description _8158_start_ta_arc2 Begin a t-curve absolute circular interpolation for any 2 of 4 axes _8158_start_sr_arc2 Begin a s-curve relative circular interpolation for any 2 of 4 axes _8158_start_sa_arc2 Begin a s-curve absolute circular interpolation for any 2 of 4 axes Home Return Mode Section 6.
Function Name Description _8158_set_alm Set ALM signal’s logic and operating mode _8158_set_erc Set ERC signal’s logic and timing _8158_set_erc_out Output an ERC signal _8158_clr_erc Clear the ERC signal _8158_set_sd Set SD signal’s logic and operating mode _8158_enable_sd Enable SD signal _8158_set_limit_logic Set EL signal’s logic _8158_set_limit_mode Set EL operating mode _8158_get_io_status Get all the motion I/O status of 8158 Interrupt Control Section 6.
Position Compare and Latch Section 6.15 Function Name Description _8158_set_trigger_logic Set CMP signal logic _8158_set_error_comparator Set the error comparator _8158_set_general_comparator Set the general comparator _8158_set_trigger_comparator Set the trigger comparator _8158_set_latch_source Set the latch timing for a counter _8158_set_ltc_logic Set the LTC signal’s logic _8158_get_latch_data Get the latch data Continuous Motion Section 6.
Soft Limit 6.19 Function Name Description _8158_disable_soft_limit Disable soft limit function _8158_enable_soft_limit Enable soft limit function _8158_set_soft_limit Set the soft limits Backlash Compensation / Vibration Suppression 6.20 Function Name Description _8158_backlash_comp Set backlash corrective pulse for compensation _8158_suppress_vibration Set suppress vibration idle pulse counts _8158_set_fa_speed Set FA speed for home mode Speed Profile Calculation 6.
6.2 C/C++ Programming Library This section details all the functions. The function prototypes and some common data types are declared in pci_8158.h. We suggest you use these data types in your application programs. The following table shows the data type names and their range.
6.3 System & Initialization @ Name _8158_initial – Card initialization _8158_close – Card close _8158_get_version – Check hardware and software version information _8158_set_security_key – Set the security password _8158_check_security_key – Check the security password _8158_reset_security_key – Rest the security password to default _8158_config_from_file Config – PCI-8158 setting from file @ Description _8158_initial: This function is used to initialize an 8158 card and assign hardware resources.
This function is used to verify the security code which the user set by the function “_8158_set_security_key”. See also: _8158_set_security_key, _8158_reset_security_key _8158_reset_security_key: By this function, Users can reset the security code on the PCI card to default value. The default security code is 0. See also: _8158_check_security_key, _8158_set_security_key _8158_config_from_file: This function is used to load the configuration of the PCI-8158 according to specified file.
@ Syntax C/C++(Windows 2000/XP) I16 _8158_initial(I16 *CardID_InBit, I16 Manual_ID); I16 _8158_close(void); I16 _8158_get_version(I16 card_id, I16 *firmware_ver, I32 *driver_ver, I32 *dll_ver); I16 _8158_set_security_key(I16 card_id, I16 old_secu_code, I16 new_secu_code); I16 _8158_check_security_key(I16 card_id, I16 secu_code); I16 _8158_reset_security_key(I16 card_id); I16 _8158_config_from_file(); Visual Basic 6(Windows 2000/XP) B_8158_initial(CardID_InBit As Integer, ByVal Manual_ID As Integer) As Inte
1: on board DIP switch (SW1). card_id: Specify the PCI-8158 card index. The card_id could be decided by DIP switch (SW1) or depend on slot sequence. Please refer to _8158_initial(). firmware_ver: The current firmware version. driver_ver: The current device driver version. dll_ver: The current DLL library version. old_secu_code: Old security code. new_secu_code: New security code. secu_code: security code.
6.4 Pulse Input/Output Configuration @ Name _8158_set_pls_iptmode – Set the configuration for feedback pulse input. _8158_set_pls_outmode – Set the configuration for pulse command output. _8158_set_feedback_src – Enable/Disable the external feedback pulse input @ Description _8158_set_pls_iptmode: Configure the input modes of external feedback pulses. There are 4 types for feedback pulse input. Note that this function makes sense only when the Src parameter in _8158_set_feedback_src() function is enabled.
Visual Basic6 (Windows 2000/XP) B_8158_set_pls_iptmode(ByVal AxisNo As Integer, ByVal pls_iptmode As Integer, ByVal pls_logic As Integer) As Integer B_8158_set_pls_outmode(ByVal AxisNo As Integer, ByVal pls_outmode As Integer) As Integer B_8158_set_feedback_src(ByVal AxisNo As Integer, ByVal Src As Integer) As Integer @ Argument AxisNo: Axis number designated to configure pulse Input/Output.
pls_outmode: Setting of command pulse output mode.
6.
This function is used to decelerate an axis to stop with a trapezoidal or S-curve profile. This function is also useful when a preset move (both trapezoidal and S-curve motion), manual move, or home return function is performed. Note: The velocity profile is decided by original motion profile. _8158_get_current_speed: This function is used to read the current pulse output rate (pulse/sec) of a specified axis. It is applicable in any time in any operation mode.
Visual Basic6 (Windows 2000/XP) B_8158_tv_move(ByVal AxisNo As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double) As Integer B_8158_sv_move(ByVal AxisNo As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal SVacc As Double) As Integer B_8158_emg_stop(ByVal AxisNo As Integer) As Integer B_8158_sd_stop(ByVal AxisNo As Integer, ByVal Tdec As Double) As Integer B_8158_get_current_speed(ByVal AxisNo As Integer, ByRef Speed As Double) As Integer B_8158
NewVelPercent: The Percentage of maximum override speed (100% speed) Time: The duration time of current speed to override speed.
6.
ezoidal profile. The acceleration (Tacc) and deceleration (Tdec) time is specified independently. This command does not let the program wait for motion completion, but immediately returns control to the program. _8158_start_sr_move: This function causes the axis to accelerate from a starting velocity (StrVel), rotate at constant velocity (MaxVel), and decelerates to stop at the relative distance with S-curve profile. The acceleration (Tacc) and deceleration (Tdec) time is specified independently.
I16 _8158_start_sr_move(I16 AxisNo, F64 Dist, StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, SVacc, F64 SVdec); I16 _8158_start_sa_move(I16 AxisNo, F64 Pos, StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, SVacc, F64 SVdec); I16 _8158_set_move_ratio(I16 AxisNo, F64 move_ratio); I16 _8158_position_override(I16 AxisNo, F64 NewPos); F64 F64 F64 F64 Visual Basic6 (Windows 2000/XP) B_8158_start_tr_move(ByVal AxisNo As Integer, ByVal Dist As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Td
@ Argument AxisNo: Axis number designated to move or change position.
6.
_8158_start_sa_move_cd – Begin an absolute 2-axis linear interpolation for C & D axis with S-curve profile _8158_start_tr_line2 – Begin a relative 2-axis linear interpolation for any 2 of 4 axes, with trapezoidal profile _8158_start_ta_line2 – Begin an absolute 2-axis linear interpolation for any 2 of 4 axes, with trapezoidal profile _8158_start_sr_line2 – Begin a relative 2-axis linear interpolation for any 2 of 4 axes, with S-curve profile _8158_start_sa_line2 – Begin an absolute 2-axis linear interpolati
Function Total axes Velocity Profile Relative / Absolute Target Axes _8158_start_tr_move_xy 2 T R _8158_start_ta_move_xy 2 T A Axes 0 & 1 Axes 0 & 1 _8158_start_sr_move_xy 2 S R Axes 0 & 1 _8158_start_sa_move_xy 2 S A Axes 0 & 1 _8158_start_tr_move_zu 2 T R Axes 2 & 3 _8158_start_ta_move_zu 2 T A Axes 2 & 3 _8158_start_sr_move_zu 2 S R Axes 2 & 3 _8158_start_sa_move_zu 2 S A Axes 2 & 3 _8158_start_tr_move_ab 2 T R Axes 4& 5 _8158_start_ta_move_ab 2 T A Axes
Function Total axes Velocity Profile Relative / Absolute Target Axes _8158_start_tr_line4 4 T R _8158_start_ta_line4 4 T A Any 4of 4 axes _8158_start_sr_line4 4 S R Any 4 of 4 axes _8158_start_sa_line4 4 S A Any 4 of 4 axes Note: Any 4 of 4 axes The target 4 axes of linear interpolation are the 4 of former 4 axes or later 4 axes on a card. It can not cross over those two groups.
I16 _8158_start_sr_move_zu(I16 Card_id, F64 DistX, F64 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8158_start_sa_move_zu(I16 Card_id, F64 PosX, F64 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8158_start_tr_move_ab(I16 Card_id, F64 DistX, F64 DistY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8158_start_ta_move_ab(I16 Card_id, F64 PosX, F64 PosY, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8158_start_sr_move_ab(I16 Card_id, F64
I16 _8158_start_tr_line3(I16 *AxisArray, F64 *DistArray, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8158_start_ta_line3(I16 *AxisArray, F64 *PosArray, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec); I16 _8158_start_sr_line3(I16 *AxisArray, F64 *DistArray, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8158_start_sa_line3(I16 *AxisArray, F64 *PosArray, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); I16 _8158_start_tr_line4(I16 *AxisArray, F64 *DistArray, F64 S
B_8158_start_sa_move_xy(ByVal Card_id As Integer, ByVal PosX As Double, ByVal PosY 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_8158_start_tr_move_zu(ByVal Card_id As Integer, ByVal DistX As Double, ByVal DistY As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double); B_8158_start_ta_move_zu(ByVal Card_id As Integer, ByVal PosX As Double, ByVal Po
As Double, ByVal SVacc As Double, ByVal SVdec As Double) As Integer B_8158_start_sa_move_ab(ByVal Card_id As Integer, ByVal PosX As Double, ByVal PosY 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_8158_start_tr_move_cd(ByVal Card_id As Integer, ByVal DistX As Double, ByVal DistY As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double); B_8158_start
B_8158_start_sa_line2(AxisArray() As Integer, PosArray() 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_8158_start_tr_line3(AxisArray() As Integer, DistArray() As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8158_start_ta_line3(AxisArray() As Integer, PosArray() As Double, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal T
@ Argument card_id: Specify the PCI-8158 card index. The card_id could be decided by DIP switch (SW1) or depend on slot sequence. Please refer to _8158_initial(). AxisNo: Axis number designated to move or change position. card_id Physical axis AxisNo 0 1 0 0 1 1 … … 7 7 0 8 1 9 … … DistX: specified relative distance of axis 0 to move (unit: pulse). DistY: specified relative distance of axis 1 to move (unit: pulse). PosX: specified absolute position of axis 0 to move (unit: pulse).
Example: I16 AxisArray[2] = {0, 3}; //axis 0, & axis 3 (correct) I16 AxisArray[3] = {0,2, 3}; //axis 0, 2 & 3 (correct) I16 AxisArray[2] = {1, 6}; //axis 1, & axis 6 (incorrect) *DistArray: Array of relative distance for linear interpolation. Example: I16 AxisArray[2] = {0, 3}; //axis 0, & axis 3 F64 DistArray[2] = {1000.0, 2000.0} //for axis 0 & 3 *PosArray: Array of absolute position for linear interpolation. Example: I16 AxisArray[3] = {0,2, 3}; //axis 0, 2 & 3 F64 PosArray[3] = {200.0, 300.0, 400.
6.
_8158_start_sa_arc_cd –Begin a S-curve absolute circular interpolation for C & D axis _8158_start_tr_arc2 – Begin a T-curve relative circular interpolation for any 2 of 4 axes _8158_start_ta_arc2 – Begin a T-curve absolute circular interpolation for any 2 of 4 axes _8158_start_sr_arc2 – Begin a S-curve relative circular interpolation for any 2 of 4 axes _8158_start_sa_arc2 – Begin a S-curve absolute circular interpolation for any 2 of 4 axes @ Description Those functions perform Circular interpolation moti
Function Total axes Velocity Profile Relative / Absolute Target Axes _8158_start_tr_arc2 2 trapezoidal R _8158_start_ta_arc2 2 trapezoidal A Any 2 of 4 Axis _8158_start_sr_arc2 2 S-curve R Any 2 of 4 Axis _8158_start_sa_arc2 2 S-curve A Any 2 of 4 Axis Note: Any 2 of 4 Axis The target two axes of linear interpolation are the 2 of former 4 axes (0-3) or later 4 axes (4-7) on a card. It can not cross over those two groups.
I16 _8158_start_sa_arc_zu(I16 card_id, F64 Cx, F64 Cy, F64 Ex, F64 Ey, I16 CW_CCW, F64 StrVel,F64 MaxVel,F64 Tacc,F64 Tdec,F64 SVacc,F64 SVdec); I16 _8158_start_tr_arc_ab(I16 card_id, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy, I16 CW_CCW, F64 StrVel,F64 MaxVel,F64 Tacc,F64 Tdec); I16 _8158_start_ta_arc_ab(I16 card_id, F64 Cx, F64 Cy, F64 Ex, F64 Ey, I16 CW_CCW, F64 StrVel,F64 MaxVel,F64 Tacc,F64 Tdec); I16 _8158_start_sr_arc_ab(I16 card_id, F64 OffsetCx, F64 OffsetCy, F64 OffsetEx, F64 OffsetEy
I16 _8158_start_sr_arc2(I16 *AxisArray, F64 *OffsetCenter, F64 *OffsetEnd, I16 CW_CCW, F64 StrVel,F64 MaxVel,F64 Tacc,F64 Tdec, F64 SVacc,F64 SVdec); I16 _8158_start_sa_arc2(I16 *AxisArray, F64 *CenterPos, F64 *EndPos, I16 CW_CCW, F64 StrVel,F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec); Visual Basic6 (Windows 2000/XP) B_8158_start_tr_arc_xy( ByVal card_id As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy As Double, ByVal CW_CCW As Integer, ByV
Double, ByVal Tacc As Double, ByVal Tdec As Double); B_8158_start_ta_arc_zu(ByVal card_id As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal CW_CCW As Integer, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8158_start_sr_arc_zu(ByVal card_id As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy As Double, ByVal CW_CCW As Integer, ByVal StrVel As Double,
Double, ByVal Svacc As Double, ByVal Svdec As Double) As Integer B_8158_start_sa_arc_ab(ByVal card_id As Integer, ByVal Cx As Double, ByVal Cy As Double, ByVal Ex As Double, ByVal Ey As Double, ByVal CW_CCW As Integer, 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_8158_start_tr_arc_cd( ByVal card_id As Integer, ByVal OffsetCx As Double, ByVal OffsetCy As Double, ByVal OffsetEx As Double, ByVal OffsetEy A
B_8158_start_ta_arc2(AxisArray() As Integer, CenterPos() As Double, EndPos() As Double, Byval CW_CCW As Integer, ByVal StrVel As Double , ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8158_start_sr_arc2(AxisArray() As Integer, OffsetCenter() As Double, OffsetEnd() As Double, Byval CW_CCW As Integer, 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_8158_start_sa_arc2(AxisA
Cx : X-axis (first axis of target axes) absolute position of center of arc Cy: Y-axis (second axis of target axes) absolute position of center of arc Ex: X-axis (first axis of target axes) absolute position of end of arc Ey: Y-axis (second axis of target axes) absolute position of end of arc CW_CCW: Specified direction of arc Value Meaning 0 Clockwise(cw) 1 Counterclockwise(ccw) StrVel: Starting velocity of a velocity profile in units of pulse per second.
*OffsetEnd: Array of the offset to end of arc (relative to the start position) Example: F64 OffsetEnd[2] = {4000.0, 0.0}; //offset from start position(initial point for 1st & 2nd axes *CenterPos: Array of the center of arc absolute position Example: F64 CenterPos[2] = {2000.0, 0.0}; //absolute center position for 1st & 2nd axes *EndPos: Array of the end point of arc absolute position Example: F64 EndPos[2] = {4000.0, 0.
6.9 Home Return Mode @ Name _8158_set_home_config – Set the configuration for home return move motion _8158_home_move – Perform a home return move. _8158_home_search –Perform an auto search home @ Description _8158_set_home_config: Configures the home return mode, origin(ORG) and index signal(EZ) logic, EZ count, and ERC output options for the home_move() function. Refer to section 4.2.10 for the setting of home_mode control.
@ Syntax C/C++(Windows 2000/XP) I16 _8158_set_home_config(I16 AxisNo, I16 home_mode, I16 org_logic, I16 ez_logic, I16 ez_count, I16 erc_out); I16 _8158_home_move(I16 AxisNo, F64 StrVel, F64 MaxVel, F64 Tacc); I16 _8158_home_search(I16 AxisNo, F64 StrVel, F64 MaxVel, F64 Tacc, F64 ORGOffset); Visual Basic (Windows 2000/XP) B_8158_set_home_config(ByVal AxisNo 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
org_logic: Action logic configuration for ORG Value Meaning 0 Active low 1 Active high ez_logic: Action logic configuration for EZ Value Meaning 0 Active low 1 Active high ez_count: 0-15 (Please refer to see Section 4.2.10) erc_out: Set ERC output options. Value Meaning 0 no ERC out 1 ERC signal out when home-move finishing StrVel: Starting velocity of a velocity profile. (unit: pulse/sec) MaxVel: Maximum velocity.
6.10 Manual Pulser Motion @ Name _8158_disable_pulser_input – Disable the pulse input _8158_pulser_pmove – Manual pulse p_move _8158_pulser_vmove – Manual pulse v_move _8158_set_pulser_ratio – Set manual pulse ratio for actual output pulse rate _8158_set_pulser_iptmode – Set the input signal modes of pulse @ Description _8158_disable_pulser_input This function is used to set the pulse input disable or enable. _8158_pulser_pmove With this command, the axis begins to move according to the manual pulse input.
_8158_set_pulser_iptmode This function is used to configure the input mode of manual pulse.
@ Argument AxisNo: Axis number designated to move or change position. card_id Physical axis AxisNo 0 0 1 0 1 1 … … 7 7 0 8 1 9 … … Disable: Disable pulse input. Disable = 1, disable pulse Disable = 0, enable pulse Dist: Specified relative distance to move (unit: pulse) For example, if SpeedLimit is set to be 100pps, then the axis can move at fastest 100pps , even the input pulse signal rate is more then 100pps.
6.11 Motion Status @ Name _8102_motion_done – Return the motion status @ Description _8102_motion_done: Return the motion status of the 8102.
@ Syntax C/C++(Windows 2000/XP) I16 _8102_motion_done(I16 AxisNo) Visual Basic (Windows 2000/XP) B_8102_motion_done(ByVal AxisNo As Integer) As Integer @ Argument AxisNo: Axis number designated to move or change position.
6.
Enable the position override when input signal PCS is turn ON. The PCS terminal status can be monitored by “_8158_get_io_status” function. _8158_set_clr_mode CLR inputted signal can reset specified counters(command, position, error and general purpose counter). The reset action could be set by this function. The reset action mode has 4 types. For details refer to arguments description. _8158_set_inp: Set the active logic of the In-Position signal input from the servo driver.
Set the EL logic, normal open or normal closed. _8158_set_limit_mode: Set the reacting modes of the EL signal. _8158_get_io_status: Get all the I/O statuses for each axis.
I16 _8158_set_alm(I16 AxisNo, I16 alm_logic, I16 alm_mode); I16 _8158_set_erc(I16 AxisNo, I16 erc_logic, I16 erc_pulse_width, I16 erc_mode); I16 _8158_set_erc_out(I16 AxisNo); I16 _8158_clr_erc(I16 AxisNo); I16 _8158_set_sd(I16 AxisNo, I16 sd_logic, I16 sd_latch, I16 sd_mode); I16 _8158_enable_sd(I16 AxisNo, I16 enable); I16 _8158_set_limit_logic(I16 AxisNo, U16 Logic ); I16 _8158_set_limit_mode(I16 AxisNo, I16 limit_mode); I16 _8158_get_io_status(I16 AxisNo, U16 *io_sts); Visual Basic (Windows 2000/XP) B_
B_8158_enable_sd(ByVal AxisNo As Integer, ByVal Enable As Integer) As Integer B_8158_set_limit_logic(ByVal AxisNo As Integer, ByVal Logic As Integer) As Integer B_8158_set_limit_mode(ByVal AxisNo As Integer, ByVal limit_mode As Integer) As Integer I16 _8158_get_io_status(ByVal AxisNo As Integer, io_sts As Integer) As Integer @ Argument AxisNo: Axis number of Target Axis.
clr_mode = 0 , Clear on the falling edge (default) clr_mode = 1 , Clear on the rising edge clr_mode = 2 , Clear on a LOW level clr_mode = 3 , Clear on a HIGH level targetCounterInBit: Enable/Disable clear target counter in bit Value Meaning Bit Description 0 Reset command counter when CLR input turns ON 1 Reset position counter when CLR input turns ON 2 Reset error counter when CLR input turns ON 3 Reset general purpose counter when CLR input turns ON inp_enable: INP function enabled/disabled in
erc_logic: Set the active logic for the ERC signal Value Meaning 0 Negative logic 1 Positive logic erc_pulse_width: Set the pulse width of the ERC signal Value Meaning 0 12 µs 1 102 µs 2 409 µs 3 1.
sd_mode: Set the reacting mode of the SD signal Value Meaning 0 slow down only 1 slow down then stop enable: Set the ramping-down point for high speed feed. Value Meaning 0 Automatic setting 1 Manual setting (default) Logic: Set the PEL/MEL logic. Value Meaning 0 Normal low(normal open) 1 Normal high(normal close) limit_mode: Value Meaning 0 Stop immediately 1 Slow down then stop *io_sts: I/O status. Please refer to 6.12 function description.
6.13 Interrupt Control @Name _8158_int_control – Enable/Disable INT service _8158_set_motion_int_factor – Set the factors of motion related interrupts _8158_wait_error_interrupt – Wait error related interrupts _8158_wait_motion_interrupt – Wait motion related interrupts @ Description _8158_int_control: This function is used to enable the Windows interrupt event to host PC. _8158_set_motion_int_factor: This function allows users to select motion related factors to initiate the event int.
@ Syntax C/C++(Windows 2000/XP) I16 _8158_int_control(I16 card_id, I16 intFlag); I16 _8158_set_motion_int_factor(I16 AxisNo, U32 int_factor ); I16 _8158_wait_error_interrupt(I16 AxisNo, I32 TimeOut_ms ); I16 _8158_wait_motion_interrupt(I16 AxisNo, I16 IntFactorBitNo, I32 TimeOut_ms ); Visual Basic (Windows 2000/XP) B_8158_int_control(ByVal card_id As Integer, ByVal intFlag As Integer) As Integer B_8158_wait_error_interrupt(ByVal AxisNo As Integer, ByVal TimeOut_ms As Long) As Integer B_8158_wait_motion_int
AxisNo: Axis number of Target Axis.
TimeOut_ms: Specifies the time-out interval, in milliseconds. If TimeOut_ms is zero, the function tests the states of the specified objects and returns immediately. If TimeOut_ms is -1, the function's time-out interval never elapses (infinate). IntFactorBitNo: Specifies the bit number of the INT factor. e.g. IntFactorBitNo = 4, It means waiting the factor of “Acceleration Start” interrupt.
6.
This function is used to change the feedback position counter to the specified value. Note that the value to be set will be processed by the move ratio. If move ratio is 0.5, then the set value will be twice as given value. _8158_get_command: This function is used to read the value of the command position counter. The source of the command position counter is the pulse output of the 8158. _8158_set_command: This function is used to change the value of the command position counter.
_8158_get_res_distance: This function is used to read the value of the residue distance recorder. The target position recorder is maintained by the 8158 software driver. It records the position to settle down for current running motion.
B_8158_get_error_counter(ByVal AxisNo As Integer, ByRef error As Integer) As Integer B_8158_reset_error_counter(ByVal AxisNo As Integer) As Integer B_8158_set_general_counter(ByVal AxisNo As Integer, ByVal CntSrc As Integer, ByVal CntValue As Double) As Integer B_8158_get_general_counter(ByVal AxisNo As Integer, ByRef Pos As Double) As Integer B_8158_reset_target_pos(ByVal AxisNo As Integer, ByVal Pos As Double) As Integer B_8158_get_target_pos(ByVal AxisNo As Integer, ByRef Pos As Double) As Integer B_8158
CntSrc: general counter source Value Meaning 0 Command pulse 1 EA/EB 2 Pulse input 3 System clock÷2 CntValue, *CntValue: the counter value TargetPos, *TargetPos: Target position recorder value, range: -134217728-134217727 ResDistance, *ResDistance: residue distance Function Library 183
6.
_8158_set_latch_source: There are 4 latch triggering source. By using this function, user can choose the event source to latch counters’ data. _8158_set_ltc_logic: This function is used to set the logic of the latch input. _8158_get_latch_data: After the latch signal arrived, the function is used to read the latched value of counters.
B_8158_set_trigger_comparator(ByVal AxisNo As Integer, ByVal CmpSrc As Integer, ByVal CmpMethod As Integer, ByVal Data As Long) As Integer B_8158_set_latch_source(ByVal AxisNo As Integer, ByVal LtcSrc As Integer) As Integer B_8158_set_ltc_logic(ByVal AxisNo As Integer, ByVal StcLogic As Integer) As Integer B_8158_get_latch_data(ByVal AxisNo As Integer, ByVal CounterNo As Integer, Pos As Double) As Integer @ Argument AxisNo: Axis number of Target Axis.
CmpMethod: The comparing methods Value 0 Meaning No Compare(Disable) 1 Data = Source counter (direction independent) 2 Data = Source counter (Count up only) 3 Data = Source counter (Count down only) 4 Data > Source counter 5 Data < Source counter Data: Comparing value (Position) CmpAction: Value Meaning 0 No action 1 Stop immediately 2 Slow down then stop ltc_src: Value Meaning 0 LTC pin input 1 ORG pin input 2 General comparator conditions are met 3 Trigger comparator condition
*Pos: Latch data (Position) 188 Function Library
6.16 Continuous motion @ Name _8158_set_continuous_move – Enable continuous motion for absolute motion _8158_check_continuous_buffer – Check if the buffer is empty _8158_dwell_move – Set a dwell move @ Description _8158_set_continuous_move: This function is necessary before and after continuous motion command sequences _8158_check_continuous_buffer: This function is used to detect if the command pre-register (buffer) is empty or not.
@ Syntax C/C++(Windows 2000/XP) I16 _8158_set_continuous_move(I16 AxisNo, I16 Enable); I16 _8158_check_continuous_buffer(I16 AxisNo); I16 _8158_dwell_move(I16 AxisNo, F64 miniSecond); Visual Basic (Windows 2000/XP) B_8158_set_continuous_move(ByVal AxisNo As Integer, ByVal Enable As Integer) As Integer B_8158_check_continuous_buffer(ByVal AxisNo As Integer) As Integer B_8158_dwell_move(ByVal AxisNo As Integer, ByVal miniSecond As Double) As Integer @ Argument AxisNo: Axis number of Target Axis.
6.
I16 F64 F64 F64 F64 F64 axes[2] = {0, 1}; dist[2] = {80000.0, 120000.0}, str_vel[2] = {0.0, 0.0}, max_vel[2] = {4000.0, 6000.0}, Tacc[2] = {0.1, 0.6}, Tdec[2] = {0.1, 0.
As Double, ByRef SVdecA As Double) As Integer B_8158_set_ta_move_all(ByVal TotalAxes As Integer, ByRef AxisArray As Integer, ByRef PosA As Double, ByRef StrVelA As Double, ByRef MaxVelA As Double, ByRef TaccA As Double, ByRef TdecA As Double) As Integer B_8158_set_sr_move_all(ByVal TotalAxes As Integer, ByRef AxisArray As Integer, ByRef DistA As Double, ByRef StrVelA As Double, ByRef MaxVelA As Double, ByRef TaccA As Double, ByRef TdecA As Double, ByRef SVaccA As Double, ByRef SVdecA As Double) As Integer B
6.18 General-purpose DIO @ Name _8158_set_gpio_output – Set digital output _8158_get_gpio_output – Get digital output _8158_get_gpio_input – Get digital input _8158_set_gpio_input_function – Set the signal types for any digital inputs @ Description _8158_set_gpio_output: The PCI-8158 has 8 digital output channels. By this function, user could control the digital outputs. _8158_get_gpio_output: This function is used to get the digital output status.
Visual Basic (Windows 2000/XP) B_8158_set_gpio_output(ByVal card_id As Integer, ByVal DoValue As Integer) As Integer B_8158_get_gpio_output(ByVal card_id As Integer, DoValue As Integer) As Integer B_8158_get_gpio_input(ByVal card_id As Integer, DiValue As Integer) As Integer B_8158_set_gpio_input_function(ByVal card_id As Integer, ByVal Channel As Integer, ByVal Select As Integer, ByVal Logic As Integer)As Integer @ Argument card_id: Specify the PCI-8158 card index.
6.19 Soft Limit @ Name _8158_disable_soft_limit – Disable soft limit function _8158_enable_soft_limit – Enable soft limit function _8158_set_soft_limit – Set soft limit @ Description _8158_disable_soft_limit: This function is used to disable the soft limit function. _8158_enable_soft_limit: This function is used to enable the soft limit function. Once enabled, the action of soft limit will be exactly the same as physical limit. _8158_set_soft_limit: This function is used to set the soft limit value.
@ Argument AxisNo: Axis number of Target Axis.
6.20 Backlash Compensation / Vibration Suppression @ Name _8158_backlash_comp – Set backlash corrective pulse for compensation _8158_suppress_vibration – Set vibration suppressing timing _8158_set_fa_speed – Set the FA speed @ Description _8158_backlash_comp: Whenever direction change occurs, the 8158 outputs backlash corrective pulses before sending commands. This function is used to set the compensation pulse numbers.
Visual Basic (Windows 2000/XP) B_8158_backlash_comps (ByVal AxisNo As Integer, ByVal CompPulse As Integer, ByVal Mode As Integer) As Integer B_8158_suppress_vibration(ByVal AxisNo As Integer, ByVal ReverseTime As Integer, ByVal ForwardTime As Integer) As Integer B_8158_set_fa_speed(ByVal AxisNo As Integer, ByVal FA_Speed As Double) As Integer @ Argument AxisNo: Axis number of Target Axis.
6.21 Speed Profile Calculation @ Name _8158_get_tr_move_profile – Get the relative trapezoidal speed profile _8158_get_ta_move_profile – Get the absolute trapezoidal speed profile _8158_get_sr_move_profile – Get the relative S-curve speed profile _8158_get_sa_move_profile – Get the absolute S-curve speed profile @ Description _8158_get_tr_move_profile: This function is used to get the relative trapezoidal speed profiles. By this function, user can get the actual speed profile before running.
@ Syntax C/C++(Windows 2000/XP) I16 _8158_get_tr_move_profile(I16 AxisNo, F64 Dist, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 *pStrVel, F64 *pMaxVel, F64 *pTacc, F64 *pTdec, F64 *pTconst ); I16 _8158_get_ta_move_profile(I16 AxisNo, F64 Pos, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 *pStrVel, F64 *pMaxVel, F64 *pTacc, F64 *pTdec, F64 *pTconst ); I16 _8158_get_sr_move_profile(I16 AxisNo, F64 Dist, F64 StrVel, F64 MaxVel, F64 Tacc, F64 Tdec, F64 SVacc, F64 SVdec,F64 *pStrVel, F64 *pMaxVel, F64 *pTa
Double, ByRef pTacc As Double, ByRef pTdec As Double, ByRef pSVacc As Double, ByRef pSVdec As Double, ByRef pTconst As Double) As Integer B_8158_get_sa_move_profile(ByVal AxisNo As Integer, 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, ByRef pStrVel As Double, ByRef pMaxVel As Double, ByRef pTacc As Double, ByRef pTdec As Double, ByRef pSVacc As Double, ByRef pSVdec As Double, ByRef pTconst As Do
SVdec: S-curve region during deceleration (unit: pulse/sec) Note: SVdec = 0, for pure S-Curve. For more details, see section 4.2.
6.22 Return Code The return error code is defined in “8158_err.h”. The meaning is described in following table.
Code Meaning -10330 Error velocity change time -10331 Error speed target -10332 Error velocity percent -10333 Error position change backward -10334 Error counter number -10335 Error gpio input function parameter -10336 Error channel number -10337 Error ERC mode -10338 Error security code Function Library 205
206 Function Library
7 Connection Example This chapter shows some connection examples between the PCI8158 and servo drivers and stepping drivers. 7.1 General Description of Wiring The connection between the PCI-8158 and the pulse input servo driver or stepping driver is the main connection. The following figure illustrates how to integrate the PCI-8158 and DIN-814M-J3A. 7.2 Terminal Board User Guide Please refer the individual user guide of terminal board.
208 Connection Example
Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the following carefully. 1. Before using ADLINK’s products please read the user manual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA application form which can be downloaded from: http:// rma.adlinktech.com/policy/. 2.
3. Our repair service is not covered by ADLINK's guarantee in the following situations: X Damage caused by not following instructions in the User's Manual. X Damage caused by carelessness on the user's part during product transportation. X Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers. X Damage caused by unsuitable storage environments (i.e. high temperatures, high humidity, or volatile chemicals).