PCI-8144 4-Axis Stepper Motion Control Card User’s Manual Manual Rev. 2.01 Revision Date: September 2, 2008 Part No: 50-11144-1010 Advance Technologies; Automate the World.
Copyright 2008 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 Features............................................................................... 5 Specifications..............
3.8 Example of output connection ...................................... 27 JP2 pin define for stepping singal (Optional) ..................... 27 4 Operation Theory .............................................................. 29 4.1 4.2 4.3 4.4 4.5 4.6 4.7 Classifications of Motion Controller.................................... 29 Voltage motion control interface ................................... 29 Pulse motion control interface ......................................
Card Information Menu ................................................. 55 Configuration Menu ...................................................... 56 Single Axis Operation Menu ......................................... 59 Four-Axis Operation Menu ............................................ 63 Help Menu .................................................................... 65 6 Function Library ............................................................... 67 6.1 6.2 6.3 6.4 6.5 List of Functions......
6.6 6.7 6.8 6.9 _8144_home_status ................................................... 122 Motion status.................................................................... 125 _8144_motion_done ................................................... 125 _8144_motion_status ................................................. 127 Interrupt ........................................................................... 129 _8144_set_motion_interrupt_factor ............................
List of Tables Table Table Table Table 2-1: SW1 Card Index ..................................................... 2-2: JP2 Direct Control to Stepper ................................. 2-3: CN1 Pin Assignments ............................................. 6-1: Data type definitions ..............................................
List of Figures Figure 1-1: PCI-8144 Block Diagram ........................................... 2 Figure 1-2: Flow chart for building an application ........................ 4 Figure 2-1: PCB Layout of the PCI-8144 ...................................
1 Introduction The PCI-8144 is a cost-effective 4-axis motion controller card with a PCI interface that can generate a pulse train up to 2.4MHz to control a stepper motor. As a motion controller, it provides nonsymmetric acceleration and deceleration speed profile settings, Tcurve and S-surve speed profile control, and simultaneously start/ stop. Changing speed on the fly is also available with a single axis operation. Multiple PCI-8144 cards can be installed in one system.
Figure 1-1: PCI-8144 Block Diagram 2 Introduction
MotionCreatorPro is a Windows-based application development software package included with the PCI-8144 and is useful for debugging a motion control system during the design phase of a project. An on-screen display lists information of all installed axes and I/O signal status of the PCI-8144. Windows programming libraries are also included for C++ 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 PCI-8144 motion control system. X 32-bit PCI bus Plug and Play X 4 pulse train channel for stepping motors X Maximum output frequency: up to 2.
1.2 Specifications Applicable Motors Z Stepping motors Z Excitation sequencing output for 2-phase stepping motor with JP2 connector Performance Z Number of controllable axes: 4 Z Maximum pulse output frequency: 2.4MPPS, trapezoidal, or S-Curve speed profile Z Internal reference clock: 4.
PCI-8144 Dimensions Z 159mm(L) X 126 mm(W) 1.3 Supported Software 1.3.1 Programming Library Windows 2000/XP DLLs are provided for the PCI-8144. 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 for the setting of I/O logic parameters to be loaded in custom program. This product is also bundled with the card.
8 Introduction
2 Installation This chapter describes how to install PCI-8144. 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 (the remaining sections) and wiring the connections 2.
2.
2.3 PCI-8144 Hardware Installation 2.3.1 Hardware configuration The PCI-8144 is fully Plug-and-Play compliant. Hence, memory allocation (I/O port locations) and IRQ channel of the PCI card are assigned by the system BIOS. The address assignment is done on a board-by-board basis for all PCI cards in the system. 2.3.2 PCI slot selection Some computer system may have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PCI-8144 can be used in any PCI slot. 2.3.
Check the control panel of the Windows system if the card is listed by the system. If not, check the PCI settings in the BIOS or use another PCI slot.
2.4 Software Driver Installation 1. Auto run the ADLINK All-In-One CD. Choose Driver Installation -> Motion Control -> PCI-8144. 2. Follow the procedures of the installer. 3. After setup installation is completed, restart windows. Note: Please download the latest software from ADLINK website if necessary. 2.5 SW1 Card Index Selection The SW1 switch is used to set the card index. For example, if 1 is set to ON and the others are OFF, that card index is 1. The index value can be from 0 to 15.
2.6 J1-J8 Pulse Output Type: Differential / Open Collector Jumpers J1-J8 are used to set the type of pulse output signals. The output signal type can either be differential line driver or open collector output. Refer to section 3.1 for detail jumper settings. J1 & J2 Axis 0 J3 & J4 Axis 1 J5 & J6 Axis 2 J7 & J8 Axis 3 2.7 JP2 Direct Control to Stepper No. Name 1 3 5 7 Function DGND Bus power ground No.
2.8 CN1 Pin Assignments: Main connector CN1 is the major connector for the motion control I/O signals. No. Name I/O Function No. Name I/O Function 1 VDD O Isolated +5V Output 2 EGND - Ext. power ground 35 VDD O Isolated +5V Output 36 EGND - 3 CW+ O Ext.
16 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 cables between the PCI-8144 and any stepper drivers. This chapter contains the following sections: Section 3.1 Pulse Output Signals CW and CCW Section 3.2 Origin Signal ORG Section 3.3 Slow Down input signal Section 3.4 End-Limit Signals PEL and MEL Section 3.5 Simultaneous start/stop signals STA and STP Section 3.6 Termination Board Section 3.
3.1 Pulse Output Signals CW and CCW There are 4 axis pulse output signals on the PCI-8144. For each axis, two pairs of CW and CCW signals are used to transmit the pulse train and to indicate the direction. In this section, the electrical characteristics of the CW and CCW signals are detailed. Each signal consists of a pair of differential signals. For example, CW2 consists of CW2+ and CW2- signals. The following table shows all pulse output signals on CN1. CN1 Pin No.
The output of the CW or CCW signals can be configured by jumpers as either differential line drivers or open collector output.
Choose one of CW/CCW+ and CW/CCW- to connect to driver’s OUT/DIR Warning: The sink current must not exceed 20mA or the 2631 will be damaged! 20 Signal Connections
3.2 Origin Signal ORG The origin signals (ORG1-ORG4) are used as input signals for the origin of the mechanism. The following table lists signal names, pin numbers, and axis numbers: CN1 Pin No Signal Name Axis # 11 ORG0 1 21 ORG1 2 45 ORG2 3 55 ORG3 4 The input circuit of the ORG signals is shown below. Usually, a limit switch is used to indicate the origin on one axis. The specifications of the limit switch should have contact capacity of +24V @ 10mA minimum.
3.3 Slow Down input signal The PCI-8144 provides slow down function through SD input pin.
3.4 End-Limit Signals PEL and MEL There are two end-limit signals PEL and MEL for each axis. PEL indicates the end limit signal is in the plus direction and MEL indicates the end limit signal is in the minus direction. The signal names, pin numbers, and axis numbers are shown in the table below: CN1 Pin No Signal Name Axis # CN1 Pin No Signal Name Axis # 7 PEL0 1 41 PEL2 3 8 MEL0 1 42 MEL2 3 17 PEL1 2 51 PEL3 4 18 MEL1 2 52 MEL3 4 A circuit diagram is shown in the diagram below.
3.5 Simultaneously Start/Stop Signals STA and STP The PCI-8144 provides STA and STP signals, which enable simultaneous start/stop of motions on multiple axes. The STA and STP signals are on CN1, STP @ pin 22 and STA @ pin 56. 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 input signals. To operate the start and stop action simultaneously, both software control and external control are needed.
3.6 Termination Board CN1 of the PCI-8144 can be connected with a DIN-68S, including the ACL-10569-1 cable (a 68-pin SCSI-SCSI cable). The DIN-68S is a general purpose 68-pin SCSI-II DIN-socket. It has easy wiring screw terminals and an easily installed DIN socket that can be mounted onto the DIN rails 3.7 General Purpose DIO PCI-8144 has 8 opto-isolated digital outputs and 8 open collector digital inputs for general purpose use.
3.7.1 Isolated Input channels 3.7.2 Isolated Output channels 3.7.
3.7.4 Example of output connection 3.
PCI-8144 provides another optional JP2 pins for stepping motor signal.
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 motion control interface The second interface of motion and motor control is a pulse train type. As a trend of digital world, pulse trains represent 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. Because of this interface, a servo or stepper motor can be easier than an analog type for positioning applications.
4.1.4 Software real-time motion control kernel For motion control kernel, there are three ways to accomplish it: DSP, ASIC, and software real-time. 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. Many machine makers will use PC’s computing power to do this. A feedback counter card can simply be used and a voltage output or pulse output card to make it.
motion control separates all system integration problems into 4 parts: Motor driver’s performance, ASIC outputting profile, vendor’s software parameters to the ASIC, and users’ command to vendors’ software. It makes motion controller co-operated more smoothly between devices. 4.1.
4.2 Motion Control Modes Motion control makes 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 is used and pulses are in the unit of length. 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 Trapezodial speed profile means the acceleration/deceleration area follows a 1st order linear velocity profile (constant acceleration rate). The profile chart is shown as below: The area of the velocity profile represents the distance of this motion. Sometimes, the profile looks like a triangle because the desired distance from user is smaller than the area of given speed parameters.
4.2.4 S-curve and Bell-curve speed profile S-curve means the speed profile in accelerate/decelerate area follows a 2nd order curve. It can reduce vibration at the beginning of motor start and stop. In order to speed up the acceleration/deceleration during motion, we need to insert a linear part into 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.
b) For a bell curve, we define its shape parameters as below: (the PCI-8144 dosen’t support this mode) X Tacc: Acceleration time in second X Tdec: Deceleration time in second X StrVel: Starting velocity in PPS X MaxVel: Maximum velocity in PPS X VSacc: S-curve part of a bell curve in deceleration in PPS X VSdec: S-curve part of a bell curve in deceleration in PPS If VSacc or VSdec=0, it means acceleration or deceleration use pure S-curve without linear part.
4.2.5 Velocity mode Veloctiy mode means the pulse command is continuously outputing until a stop command is issued. The motor will run without a target position or desired distance unless it is stopped by other reasons. The output pulse accelerates from a starting velocity to a specified maximum velocity. It can be follow a linear or S-curve acceleration shape. The pulse output rate is kept at maximum velocity until another velocity command is set or a stop command is issued.
4.2.6 One axis position mode Position mode means the motion controller will output a specific amount of pulses which is equal to users’ 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. However, in PCI-8144, we provide a floating point function for users to transform a physical length to pulses.
4.2.7 Home Return Mode Home return means searching a zero position point on the coordinate. Sometimes, users use ORG pin as a zero position on the coordinate. At the beginning of machine power on, the program needs to find a zero point of this machine. Our motion controller provides following functions to make it. _8144_enable_sd_signal _8144_enable_org_stop, _8144_tv_move, _8144_sv_move.
Example. _8144_enable_sd_signal( AxisNo, Enable); //Enable SD signal control _8144_enable_org_stop( AxisNo, Enable); //Enable ORG signal stop _8144_sv_move(AxisNo, StrVel, MaxVel, Tacc); // perform a sv-move 4.2.8 Synchronous Start Function Synchronous motion means more than one axis can be started by a synchronous signal (STA) which could be external or internal signals.
4.2.9 Auto Home Move Mode Depending on the software homing mode design, the PCI-8144 offers an auto homing move function which means the axis will move to a zero position point on the coordinate. This mode is used to add an auto home moving function on the normal home return mode described in the previous section no matter which position the axis is. The following diagram shows an example for normal home mode usage for which the start point is between the ORG and EL signal or exists in the ORG signal.
Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7 SD signal ORG signal EL signal Operation Theory 43
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. We classify them to two groups. One is pulse I/O signals including pulse command and encoder interface. The other is digital I/O signals including servo ON, alarm, INP, servo ready, alarm reset and emergency stop inputs. The following sections will describe the functions these I/O pins.
Pulse outmode = 0: (Pulse is normally high) Pulse outmode = 1: (Pulse is normally low) The command pulses are counted by a 24-bit preset countdown counter. The preset counter can store a value of total pulses outputting from controller.
4.4 Mechanical switch interface We provide some dedicated input pins for mechanical switches like original switch (ORG), plus and minus end-limit switch (±EL), slow down switch (SD). These switches’ response time is very fast, only a few ASIC clock times. There is no real-time problem when using these signals. All functions are done by motion ASIC. The software can just do nothing and only need to wait the results. 4.4.
4.5 The Counters 4.5.1 Preset Command position counter The preset command position counter is a 24-bit binary downcount counter. It provides the information of the current command counts which are not outputted. 4.6 Interrupt Control The motion controller can generate an interrupt signal to the host PC. It is much useful for event-driven software application. There are two kinds of interrupt sources on PCI-8144. One is motion interrupt source and the other is GPIO interrupt sources.
The GPIO interrupt sources are maskable.
The steps for using interrupts: 1. Set interrupt sources for Motion or GPIO interrupts. _8144_set_motion_interrupt_facor(AXIS0, 0x01); // Axis0 stop _8144_set_gpio_interrupt_factor(CARD0, 0x01); // DI0 falling edge 2. Using wait function to wait the specified interrupt _8144_wait_single_motion_interrupt(AXIS0, 0x01, 1000); // Wait 1000ms for normally stop interrupt _8144_wait_single_gpio_interrupt(CARD0, 0x01, 1000) // Wait 1000ms for DI0 falling edge interrupt 3.
4.7 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. Users 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 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 8144 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 8144 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. MotionCreatorPro allows users to save settings and configurations for 8144 cards. Saved configurations will be automatically loaded the next time MotionCreatorPro is executed. Two files, 8144.ini and 8144MC.
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, users can configure EL, M_IO_Sensitivity, PulseLogic, SD_Singal and ORG_Stop. 1. EL Logic: Select the logic of the EL signal. The related function call is _8144_set_limit_logic(). 2. M_IO_Sensitivity: Select the configurations of the IO Sensitivity. The related function call is _8144_set_mio_sensitivity(). 3. Pulse Logic: Select the logic of the pulse mode. The related function call is _8144_set_pls_outmode(). 4. SD_Singal: Select the configuration of the SD singal.
The related function _8144_enable_org_stop(). call is 6. Buttons: Z Next Card: Change operating card. Z Next Axis: Change operating axis. Z Save Config: Save current configuration to 8144.ini and 8144MC.ini.
In this menu, users can configure motion INT factor and gpio INT factor. 1. GPIO INT Factor: Select factors to initiate the gpio event interrupt. The related function call is _8144_set_gpio_interrupt_factor(). 2. Motion INT Factor: Select factors to initiate the event interrupt. The related function call is _8144_set_motion_interrupt_factor(). 3. Buttons: 58 Z Next Card: Change operating card. Z Next Axis: Change operating axis. Z Save Config: Save current configuration to 8144.ini and 8144MC.ini.
5.3.5 Single Axis Operation Menu In this menu, users can change the settings a selected axis, including velocity mode motion, preset relative motion. 1. Get Remain Pulse: Display the value of the remaining pulse. The related function is _8144_get_remaining_pulse() 2. Set Remain Pulse: Set the value of the remaining pulse. The related function is _8144_set_remaining_pulse() 3. Set Factor bit No:Set int_factor bit for normal motion interrupt.
5. Int Count: The counter would plus 1 if interrupt happened. 6. Set Factor bit No: Set int_factor bit for GPIO interrupt. The related function call is _8144_set_gpio_interrupt_factor(). 7. Int Occur: Display if the interrupt happened. Show “Yes” If happened. Otherwise, show “No”. 8. Int Count: The counter plus 1 if interrupt happened. 9. Operation Mode: Select operation mode. Z Relative Mode: “Distance” will be used as relative displacement for motion.
In “Cont. Move,” both the value and sing is effective. – 5000.0 means 5000.0 in the minus direction. Z Accel. Time: Set the acceleration time in units of second. Tdec is the same as tacc. Z Move Delay: This setting is effective only when repeat mode is set “On.” It will cause the 8144 to delay for a specified time before it continues to the next motion. 14.Play Key: X X Left play button: Clicking this button will cause the 8144 start to outlet pulses according to previous setting.
18.Digital I/O: Display and set Digital I/O. The related function is: _8144_get_gpio_output(), _8144_get_gpio_input(), _8144_set_gpio_output(). 19.Buttons: 62 Z Next Card: Change operating card. Z Next Axis: Change operating axis. Z Save Config: Save current configuration to 8144.ini and 8144MC.ini.
5.3.6 Four-Axis Operation Menu In this menu, users can change the settings four selected axis, including velocity mode motion, preset relative motion. 1. Distance: Set the relative distance for “Relative Mode.” It is only effective when “Relative Mode” is selected. 2. Motion Parameters: Set the parameters for single axis motion. Z Start Velocity: Set the start velocity of motion in units of PPS. In “Relative Mode”, only the value is effective. For example, -100.0 is the same as 100.0.
Z Tacc: Set the acceleration time in units of second and tdec is the same as tacc. 3. Operation Mode: Select operation mode. Z Relative Mode: “Distance” will be used as relative displacement for motion. The related function is _8144_start_tr_move(), _8144_start_sr_move(). 4. Repeat Mode: When “On” is selected, the motion will become repeat mode (forward<-->backward). It is only effective when “Relative Mode” is selected 5. Vel. Profile: Select the velocity profile.
10.Buttons: 5.3.7 Z Next Card: Change operating card. Z Save Config: Save current configuration to 8144.ini and 8144MC.ini. Help Menu In this menu, users can Click Mouse Right Key to show Help Information.
66 MotionCreatorPro
6 Function Library This chapter describes the supporting software for the 8144 card. User can use these functions to develop programs in C, C++, or Visual Basic. If Delphi is used as the programming environment, it is necessary to transform the header files, 8144.h manually.
6.1 List of Functions Sec. 6.
Sec. Function name Description Motion 6.
Sec. Function name Description General purpose I/O 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_8144.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 and Initialization _8144_initial Device initialization Description: This function is used to initialize PCI-8144 cards and assign hardware resources. All 8144 cards must be initialized by this function before calling other functions in your applications. By setting the parameter “ManualId”, user can choose the type that the card’s ID is assigned manually or automatically. In the end of your application, you should use the function, _8144_close(), to release its resources.
I16 ret …// ret ManualId = 0; //By system assigned = _8144_initial( &CardIdInBit, ManualId ); Do something = _8144_close(); //Close all PCI-8144 cards in the system See also: _8144_close(); Function Library 73
_8144_close Devices close Description: This function is used to close all PCI-8144 cards in the system and release its’ resources, which must be called at the end of your applications. Syntax: I16 _8144_close() B_8144_close() As Integer Parameters: Return Values: ERR_NoError : Success.
_8144_get_version Get software and hardware version numbers Description: The user can get software and hardware versions by this function. Syntax: I16 _8144_get_version( I16 CardId, I32 *Dll_1, I32 *Dll_2, I32 *FirmwareVersion, I32 *DriverVersion ); B_8144_get_version( ByVal CardId As Integer, Dll_1 As Long, Dll_2 As Long, FirmwareVersion As Long, DriverVersion As Long ) As Integer Parameters: I16 CardId: The card ID number I32 *Dll_1: The 8144.DLL version information I32 *Dll_2: The MC4541.
_8144_set_security_key Set the security password Description: This function is used to set a security code to the PCI card in EEPROM. The security code will never dispear even if the system is powered off. Syntax: I16 _8144_set_security_key(I16 CardId, U16 OldPassword, U16 NewPassword) B_8144_set_security_key(ByVal CardId As Integer, ByVal OldPassword As Integer, ByVal NewPassword As Integer)As Integer Parameters: I16 CardId: The card ID number. U16 OldPassword: The current password stored in card.
ret = _8144_check_security_key(CardId, NewPassword); //verify the new password if( ret == ERR_NoError ) // security pass else // security failed See also: _8144_check_security_key _8144_reset_security_key Function Library 77
_8144_check_security_key Varily the security password Description: This funciton is used to verify the security code which the user set by the function “_8144_set_security_key”. Syntax: I16 _8144_check_security_key(I16 CardId, U16 Password) B_8144_check_security_key(ByVal CardId As Integer, ByVal Password As Integer) As Integer Parameters: I16 CardId: The card ID number.
else // security failed See also: _8144_set_security_key _8144_reset_security_key Function Library 79
_8144_reset_security_key Reset the security password to default value Description: By this function, Users can reset the security code which is stored on the PCI card to default value. The default security code is0.
See also: _8144_set_security_key _8144_check_security_key Function Library 81
_8144_config_from_file Configure settings from file Description: This function is used to load the configeration of the PCI-8144 according to specified file. By using Motion Creater Rro, user could test and configure the 8144 correctly. After saving the configuration, the file would be existed in user’s system directory as 8144.ini. When this function is executed, all 8144 cards in the system will be configured as the following functions were called according to parameters recorded in 8144.ini.
6.4 Motion Interface I/O _8144_set_limit_logic Set the logic of PEL/MEL input signals Description: Set the active logic of specified axis’s PEL/MEL input signal. Syntax: I16 _8144_set_limit_logic(I16 AxisNo, I16 LimitLogic ) B_8144_set_limit_logic(ByVal AxisNo As Integer, ByVal LimitLogic As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ...
Example: I16 I16 I16 ret ret; // return value AxisNo = 0; //Axis number LimitLogic = 1; //Positive logic = _8144_set_limit_logic(AxisNo, LimitLogic); //EL logic setting See also: _8144_get_limit_logic _8144_get_mio_status _8144_set_mio_sensitivity 84 Function Library
_8144_get_limit_logic Get the logic of PEL/MEL input signals Description: Get the information of PEL/MEL input signal logic setting. Syntax: I16 _8144_get_limit_logic(I16 AxisNo, I16 *LimitLogic ) B_8144_get_limit_logic(ByVal AxisNo As Integer, LimitLogic As Integer ) Parameters: I16 AxisNo: Axis number of Target Axis. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ... I16 *LimitLogic: Theinformation of logic of PEL/MEL input signal.
Example: I16 I16 I16 ret ret; //return code AxisNo = 0; LimitLogic; = _8144_get_limit_logic(I16 AxisNo, &LimitLogic ); See also: _8144_set_limit_logic _8144_get_mio_status _8144_set_mio_sensitivity 86 Function Library
_8144_get_mio_status Get the status of motion I/O signals Description: Get all of motion I/O, status of each axis Syntax: I16 _8144_get_mio_status(I16 AxisNo, I16 *MotionIoStatusInBit ) B_8144_get_mio_status(ByVal AxisNo As Integer, MotionIoStatusInBit As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ... I16 *MotionIoStatusInBit: Statuses of Motion I/O.
Bit Name Description 6 PSD Positive Slow Down signal input 7~ - Reserve Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial ERR_NoError Example: I16 ret; I16 AxisNo = 0; //axis number I16 MotionIoStatusInBit; //The information of motion I/O in bit ret = _8144_get_mio_status(AxisNo, &MotionIoStatusInBit ); … See also: _8144_get_limit_logic _8144_set_ limit_logic _8144_set_mio_sensitivity 88 Function Library
_8144_set_mio_sensitivity Set the sensitive of motion I/O signals Description: By this function, to set “low sensitivity” to reduce the sensitivity to signals on the ORG, P/MEL and STP signal. Pulse signals shorter than 4 reference clock cycles( approx. 800ns) will be ignored. Syntax: I16 _8144_set_mio_sensitivity( I16 AxisNo, I16 HighOrLow ) B_8144_set_mio_sensitivity( ByVal AxisNo As Integer, ByVal HighOrLow As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis.
ERR_DeviceNotInitial ERR_NoError Example: I16 I16 I16 ret ret; //return value AxisNo = 0; //axis number HighOrLow = 1; //set to low sensitivity = _8144_set_mio_sensitivity(AxisNo, HighOrLow ); … See also: _8144_get_limit_logic _8144_set_ limit_logic _8144_get_mio_status 90 Function Library
_8144_set_pls_outmode Set the logic of pulse output signal Description: By this function, you can change the logic of pulse output signal. Syntax: I16 _8144_set_pls_outmode( I16 AxisNo, I16 PulseLogic ) B_8144_set_pls_outmode( ByVal AxisNo As Integer, ByVal PulseLogic As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ...
Return Values: ERR_AxisNumber ERR_DeviceNotInitial ERR_ParametersInvalid ERR_NoError Example: I16 AxisNo = 0; //Axis 0 I16 PulseLogic = 1; //Positive logic I16 ret = _8144_set_pls_outmode(AxisNo, PulseLogic ); //Set command to the card.
_8144_set_pls_outmode2 Description: This function is used to set the output pulse mode and its logic. Syntax: I16 _8144_set_pls_outmode2 ( I16 AxisNo, I16 PulseMode, I16 PulseLogic ); B_8144_enable_get_command( ByVal AxisNo As Integer, ByVal PulseMode As Integer ByVal PulseLogic As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. I16 PulseMode: Output pulse mode. 0: CW/CCW 1: OUT/DIR I16 PulseLogic: Pulse output logic.
6.5 Motion _8144_tv_move Accelerate an axis to a constant velocity with trapezoidal profile Description: This function is to accelerate an axis to the specified constant velocity with a trapezoidal profile. The axis will continue to travel at a constant velocity until the velocity is changed or the axis is commanded to stop. The direction is determined by the sign of the velocity parameter (MaxVel). This function has warning return code.
Card ID Physical axis AxisNo 2 0 8 ... ... F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 ret; //return code AxisNo = 0; // axis number StrVel = 500; // starting velocity MaxVel = 50000; // maximum velocity Tacc = 0.
_8144_sv_move Accelerate an axis to a constant velocity with S-curve profile Description: This function is to accelerate an axis to the specified constant velocity with a S-curve profile. The axis will continue to travel at a constant velocity until the velocity is changed or the axis is commanded to stop. The direction is determined by the sign of velocity parameter. This function has warning return code. It means that the speed profile that users specified doesn’t make sense or out of ASIC can do.
F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 ret; //return code AxisNo = 0; // axis number StrVel = 500; // starting velocity MaxVel = 50000; // maximum velocity Tacc = 0.
_8144_start_tr_move Begin a relative trapezoidal profile move Description: This function causes the axis to accelerate form a starting velocity (StrVel), rotate at constant velocity (MaxVel), and decelerate to stop at the relative distance with symmetrical trapezoidal profile. The acceleration and deceleration time is specified by a parameter “Tacc”. The moving direction is determined by the sign of the Distance parameter.
Card ID Physical axis AxisNo 1 2 0 4 1 5 2 6 3 7 0 8 ... ... F64 Distance: Specified relative distance to move ( pulse) F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge WAR_RampDownPointExceed ERR_NoError Example: I16 I16 F64 F64 F64 F64 ret; AxisNo = 0; // axis number Distance = 50000.
_8144_enable_sd_signal _8144_get_remaining_pulse _8144_set_remaining_pulse _8144_get_sv_move_profile 100 Function Library
_8144_start_sr_move Begin a relative S-curve profile move Description: 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 and deceleration time is specified by a parameter “Tacc”. The moving direction is determined by the sign of the Distance parameter.
Card ID Physical axis AxisNo 1 2 0 4 1 5 2 6 3 7 0 8 ... ... F64 Distance: Specified relative distance to move ( pulse) F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge WAR_RampDownPointExceed ERR_NoError Example: I16 I16 F64 F64 F64 F64 ret; AxisNo = 0; // axis number Distance = 50000.
_8144_enable_sd_signal _8144_get_remaining_pulse _8144_set_remaining_pulse Function Library 103
_8144_enable_get_command Description: This function is used to enable “get_command()” function. If users enable “get_command” function, users can use _8144_get_command() function to get current command position. When the axis is in motion, you can not issue this function. When “get command” is enabled, the command position will be reset to zero and you can not change speed of axes on the fly.
_8144_get_command Description: This function is used to get command position of an axis. The command position is calculated from hardware preset counter (Get by _8144_enable_get_command). Users must enable this function before use it by the function: “_8144_enable_get_command”. Syntax: I16 _8144_get_command( I16 AxisNo, I32 *Cmd ); B_8144_get_command( ByVal AxisNo As Integer, Cmd As Long ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. I32 *Cmd: Retrieve command position.
_8144_set_command Description: This function is used to set command position of an axis when “get command” function has been enabled. Syntax: I16 _8144_set_command( I16 AxisNo, I32 Cmd ); B_8144_set_command( ByVal AxisNo As Integer, ByVal Cmd As Long ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis. I32 Cmd: set command position. Return Values: I16 Error code. Refer to error code table.
_8144_set_external_start Set inhibit start by STA input signal Description: By this function, the operation start can be inhibited. When a motion command is issued, the axis will remain stopped. Then, when the STA input signal is active, the inhibit is released, and the axis will start move. Disable this function, the axis will start immediately. Notice that, all axes use only one STA input signal.
Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial ERR_NoError Example: I16 AxisNo = 0; I16 Enable = 1; //Enable STA start _8144_set_external_start(AxisNo, Enable ); // Enable STA start _8144_start_sr_move( AxisNo, Distance, StrVel, MaxVel, Tacc ); // motion will not start until STA signal active… Enable = 0; //Disable STA start _8144_set_external_start(AxisNo, Enable ); // Dsiable STA start See also: _8144_tv_move _8144_sv_move _8144_start_tr_move _8144_start_sr_move 108 Function Library
_8144_emg_stop Immediately stop Description: This function is used to immediately stop an axis. Syntax: I16 _8144_emg_stop( I16 AxisNo ) B_8144_emg_stop( ByVal AxisNo As Integer)As Integer Parameters: I16 AxisNo: The axis number is designated to receive the command. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ...
See also: _8144_dec_stop 110 Function Library
_8144_dec_stop Decelerate to stop Description: 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 (start_tr_move, start_sr_move) is performed. Note: The velocity profile is decided by original motion profile. Syntax: I16 _8144_dec_stop( I16 AxisNo ) B_8144_dec_stop( ByVal AxisNo As Integer )As Integer Parameters: I16 AxisNo: The axis number is designated to receive the command.
… ret = _8144_dec_stop( AxisNo ); //slow down to the start velocity then stop See also: _8144_emg_stop 112 Function Library
_8144_speed_up Description: This function is used to re-accelerate an axis to maximum velocity with a trapezoidal or S-curve profile. This function is also useful when a preset move (start_tr_move, start_sr_move) is performed. Note: The velocity profile is decided by original motion profile. _8144_slow_down() _8144_speed_up () V T Syntax: I16 _8144_speed_up( I16 AxisNo ) B_8144_speed_up( ByVal AxisNo As Integer ) As Integer Parameters: I16 AxisNo: Axis number of Target Axis.
_8144_slow_down Slow down to start velocity Description: This function is used to decelerate an axis with a trapezoidal or S-curve profile. This function is also useful when a preset move (start_tr_move, start_sr_move) is performed. Note: The velocity profile is decided by original motion profile. Syntax: I16 _8144_slow_down( I16 AxisNo ) B_8144_slow_down( ByVal AxisNo As Integer)As Integer Parameters: I16 AxisNo: The axis number is designated to receive the command.
… ret = _8144_ slow_down ( AxisNo ); //slow down to the start velocity … _8144_tv_move( AxisNo, StrVel, MaxVel, Tacc ); // acceleration to previous maximum velocity on the fly See also: Function Library 115
_8144_enable_org_stop Enable the stop when org signal is active Description: By this function, the user can enable/disable the ORG stop function. When this function is enable, the axis will stop instantly when ORG signal is turn ON. With those motion functions, user can perform a homing return move. Regardless of whether or not ORG stop is enable or disable.
I16 Enable: Z 0: Disable: the axis will not stop when ORG signal is active Z 1: Enable: the axis will stop when ORG signal is active Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial ERR_NoError Example: I16 AxisNo = 0; // axis number I16 Enable = 1; //Enable ORG stop ret = _8144_enable_org_stop(AxisNo, Enable ); // set ORG stop enable ret = _8144_sv_move( AxisNo, StrVel, MaxVel, Tacc ); //perform a sv_move …//monitor ORG signal or check motion done or using interrupt function… Enable = 0; //Di
_8144_enable_sd_signal Enable the slow down when SD signal is active Description: When this function is enable, and if an SD signal of the same polarity as the motor rotation is turn ON, the motor will start decelerating. If the SD signal goes OFF, the motor will accelerate again. Regardless of whether or not this function is enable or disable. The user can monitor the SD input signal’s status by “_8144_get_mio_status” function.
I16 Enable: Z 0: Disable: the axis will not slow down when SD signal is active Z 1: Enable: the axis will slow down when SD signal is active Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial ERR_NoError Example: I16 I16 I16 ret ret; // return code AxisNo = 0; //axis number Enable = 1; // Enable slow down by SD signal = _8144_enable_sd_signal(AxisNo, Enable ); // set command …//move functions See also: _8144_get_mio_status Function Library 119
_8144_home_move Description: This function is used to perform a software based home return operation. The homing status can be checked by the “_8144_home_status” function. Syntax: I16 _8144_home_move( I16 AxisNo, F64 StrVel, F64 MaxVel, F64 Tacc, I16 AccType ); B_8144_home_move( ByVal AxisNo As Integer, ByVal StrVel As Double,ByVal MaxVel As Double, ByVal Tacc As Double, ByVal AccType As Integer ); Parameters: I16 AxisNo: Axis number of Target Axis. F64 StrVel: Start homing velocity. Unit: pulse/second.
See also: _8144_home_status Function Library 121
_8144_home_status Description: This function is used to get homing status. When the axis is in homing operation, the “In homing operation” signal (Bit 0) will turned on. When it stopped, “In homing operation” signal (Bit 0) will turned off. If the axis is stopped by error, the “Abnormal stop” (Bit 2) signal will be turned on. Otherwise, “Normal stop” (Bit 1) signal will turned on.
Example: // initialize // Perform a home return move. _8144_home_move(AxisNo, StrVel, MaxVel, Tacc, AccType ); //… I16 HomeStatusInBit; _8144_home_status(AxisNo, &HomeStatusInBit ); if( HomeStatusInBit & 2 ) //Check home move status. { //Home move is done.
Max.
6.6 Motion status _8144_motion_done Get the motion command to stop or not Description: By this function, the user can monitor operation status. Syntax: I16 _8144_motion_done( I16 AxisNo, I16 *OperatingOrStop ) B_8144_motion_done( ByVal AxisNo As Integer, OperatingOrStop As Integer) As Integer Parameters: I16 AxisNo: The axis number is designated to receive the command. Card ID Physical axis AxisNo 0 1 2 0 0 1 1 2 2 3 3 0 4 1 5 2 6 3 7 0 8 ... ...
ERR_DeviceNotInitial ERR_NoError Example: I16 OperatingOrStop = 0; ret = _8144_start_sr_move( AxisNo, Distance, StrVel, MaxVel, Tacc ); while( (!ret) && (!OperatingOrStop) ){ ret = _8144_motion_done(AxisNo, &OperatingOrStop ); // check motion done }… See also: _8144_motion_status 126 Function Library
_8144_motion_status Get motion status Description: Return the motion status of the 8144. The information of motion status is in bit format. The meaning of bit[0] of parameter “MotionStatusInBit” is the same as “_8144_motion_done” Syntax: I16 _8144_motion_status( I16 AxisNo, I16 *MotionStatusInBit ) B_8144_motion_status( ByVal AxisNo As Integer, MotionStatusInBit As Integer ) As Integer Parameters: I16 AxisNo: The axis number is designated to receive the command.
I16 *MotionStatusInBit: Z bit[0]: operation status. 0: stop, 1: operation Z bit[1]: preset counter.
6.7 Interrupt _8144_set_motion_interrupt_factor Set factors of motion related interrupts Description: This function allows users to enable or disable interrupt output when the motor is stopped in start_r_move or when it is stoped using EL, STP and ORG signals or software stop command. Once the Interrupt function is enabled, you can use _8144_wait_single_motion_interruptt() to wait event. Disable the motion interrupt by set the factor to 0. Notice that, this function will valid on next motion command.
I16 MotionIntFactorInBit: factor of INT Z 0: disable INT Z 1: Enable output INT when motion stop Return Values: ERR_ParametersInvalid ERR_DeviceNotInitial ERR_InterruptNotEnable ERR_TimeOut ERR_Win32Error ERR_NoError Example: I32 TimeOutMs = 10000; //time out in milisecound I16 MotionIntFactorBitNum = 0; //bit number = the first bit=0 I16 MotionIntFactorInBit = 0x1; //enable motion interrupt ret = _8144_set_motion_interrupt_factor( AxisNo, MotionIntFactorInBit ); //…start a move function… ret = _8144_w
_8144_wait_single_motion_interrupt Wait a single motion related interrupt Description: When user enabled the Interrupt function by _8144_set_motion_int_factor(). User could use this function to wait the specific interrupt. When this function was running, the process would never stop until evens were triggered or the function was time out. This function returns when one of the following occurs: 1. The specified MotionIntFactorInBit is in the signaled state. 2. The TimeOutMs interval elapses.
Card ID Physical axis AxisNo 1 2 0 4 1 5 2 6 3 7 0 8 ... ... I16 MotionIntFactorBitNum: Specifies the bit number of the INT factor. Z Eg. Stop INT : MotionIntFactorBitNum = 0; I32 TimeOutMs: 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).
ret = _8144_set_motion_interrupt_factor( AxisNo, MotionIntFactorInBit ); //disable motion interrupt See also: _8144_set_motion_interrupt_factor Function Library 133
_8144_set_gpio_interrupt_factor Set factors of digital input interrupt Description: This function allows users to select GPIO related factors to initiate the event int. Once the Interrupt function is enabled, you can use _8144_wait_single_gpio_interrupt or _8144_wait_multiple_gpio_interrupt to wait event. To disable the GPIO interrupt function set the GPIO interrupt factor to 0.
I16 GpioIntFactorBitNum = 0; //wait INT factor bit number 0 ret = _8144_wait_single_gpio_interrupt( CardId, GpioIntFactorBitNum, TimeOutMs ); if( ret == ERR_NoError ){ // Interrupt be triggered }else{ //Timeout or wait failed } _8144_set_gpio_interrupt_factor( gCardId, 0 ); // Disable GPIO interrupt See also: _8144_wait_single_gpio_interrupt, _8144_wait_multiple_gpio_interrupt Function Library 135
_8144_wait_single_gpio_interrupt Wait a single digital input interrupt Description: When the user enabled the Interrupt function and set the interrupt factors by _8144_set_gpio_int_factor(). The user could use this function to wait a specific interrupt. When this function was running, the process would never stop until evens were triggered or the function was time out. This function returns when one of the following occurs: 1. The specified GPIO interrupt factor is in the signaled state. 2.
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).
_8144_wait_multiple_gpio_interrupt Wait multiple digital input interrupts Description: When the user enabled the Interrupt function and set the interrupt factors by _8144_set_gpio_int_factor(). The user could use this function to wait multiple specifid interrupts. When this function was running, the process would never stop until evens were triggered or the function was time out. This function returns when one of the following occurs: 1.
the function returns when the state of any one of the interrupt factors you specified in GpioIntFactorInBits is signaled. In the latter case, you can check which factors whose state caused the function to return by compare the parameter “GpioIntTriggeredInBits”. I32 TimeOutMs: Specifies the time-out interval, in milliseconds. I32 *GpioIntTriggeredInBits: Information of interrupt state in bit format.
See also: _8144_wait_single_gpio_interrupt _8144_set_gpio_interrupt_factor 140 Function Library
6.8 General purpose input/output _8144_get_gpio_input Get all DIN digital input signals Description: PCI-8144 has 8 digital input channels. By this function, the user can get the digital input status. Syntax: I16 _8144_get_gpio_input( I16 CardId, I16 *DiStatusInBit ) B_8144_get_gpio_input( ByVal CardId As Integer, DiStatusInBit As Integer )As Integer Parameters: I16 CardId: Specify the PCI-8144 card index. The CardId could be decided by DIP switch (SW1) or depend on slot sequence.
_8144_get_gpio_input_channel Get a specified DINn digital input signal Description: PCI-8144 has 8 digital input channels. By this function, the user can get a specified DINn digital input signal. Syntax: I16 _8144_get_gpio_input_channel( I16 CardId, I16 ChannelNum, I16 *DiStatus ) B_8144_get_gpio_input_channel( ByVal CardId As Integer, ByVal ChannelNum As Integer, DiStatus As Integer ) As Integer Parameters: I16 CardId: Specify the PCI-8144 card index.
_8144_set_gpio_output Set all DOUT digital output signal Description: The PCI-8144 has 8 digital output channels. By this function, the user could control all digital outputs. Syntax: I16 _8144_set_gpio_output( I16 CardId, I16 DoValueInBit ) B_8144_set_gpio_output( ByVal CardId As Integer, ByVal DoValueInBit As Integer)As Integer Parameters: I16 CardId: Specify the PCI-8144 card index. The CardId could be decided by DIP switch (SW1) or depend on slot sequence.
_8144_set_gpio_output_channel Set a specified DOUTn digital output signal Description: The PCI-8144 has 8 digital output channels. By this function, the user could control a specified digital output. Syntax: I16 _8144_set_gpio_output_channel( I16 CardId, I16 ChannelNum, I16 DoValue ) B_8144_set_gpio_output_channel( ByVal CardId As Integer, ByVal ChannelNum As Integer, ByVal DoValue As Integer )As Integer Parameters: I16 CardId: Specify the PCI-8144 card index.
_8144_get_gpio_output Get all DOUT digital output signal Description: Get all DOUT digital output signal. Syntax: I16 _8144_get_gpio_output( I16 CardId, I16 *DoValueInBit ) B_8144_get_gpio_output( ByVal CardId As Integer, DoValueInBit As Integer)As Integer Parameters: I16 CardId: Specify the PCI-8144 card index. The CardId could be decided by DIP switch (SW1) or depend on slot sequence.Please refer to _8144_initial().
_8144_get_gpio_output_channel Get a specified DOUTn digital output signal Description: Syntax: I16 _8144_get_gpio_output_channel( I16 CardId, I16 ChannelNum, I16 *DoValue ) B_8144_get_gpio_output_channel( ByVal CardId As Integer, ByVal ChannelNum As Integer, DoValue As Integer ) As Integer Parameters: I16 CardId: Specify the PCI-8144 card index. The CardId could be decided by DIP switch (SW1) or depend on slot sequence.Please refer to _8144_initial().
6.9 Speed profile calculation _8144_get_tv_move_profile Get tv_move speed profile Description: This function is used to get the tv_move speed profiles. By this function, user can get the actual speed profile before running. This function has warnning return code. please refer to _8144_tv_move function.
F64 MaxVel: Maximum velocity (pulese/sec) F64 Tacc: Acceleration time (sec) F64 *StrVelP: The information of calculated start velocity (pulse/sec) F64 *MaxVelP: The information of maximum velocity (pulse/ sec) F64 *TaccP: The information of acceleration time (sec) F64 *MagnP: Set to 0 Return Values: ERR_ParametersInvalid WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 F64 ret; //return code AxisNo = 0; //axis number StrVel = 100.
_8144_get_sv_move_profile Get sv_move speed profile Description: This function is used to get the sv_move speed profiles. By this function, user can get the actual speed profile before running. This function has warnning return code. please refer to _8144_tv_move function.
F64 *StrVelP: The information of calculated start velocity (pulse/sec) F64 *MaxVelP: The information of maximum velocity (pulse/ sec) F64 *TaccP: The information of acceleration time (sec) F64 *MagnP: Set to 0 Return Values: EERR_ParametersInvalid WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 F64 ret; //return code AxisNo = 0; //axis number StrVel = 100.0; //start velocity (pps) MaxVel = 50000.0; //maximum velocity (pps) Tacc = 0.
_8144_get_start_tr_move_profile Get start_tr_move speed profile Description: This function is used to get the relative trapezoidal speed profiles. By this function, user can get the actual speed profile before running. This function has warnning return code. please refer to _8144_tv_move function.
F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) F64 *StrVelP: Actual start velocity (pulse/sec) F64 *MaxVelP: Actual Maximum velocity (pulse/sec) F64 *TaccP: Actual acceleration and deceleration time (sec) F64 *TconstP: constant speed time(maximum velocity) F64 *MagnP: Set to 0 Return Values: EERR_ParametersInvalid WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 F64 F64 ret;
_8144_get_start_sr_move_profile Get start_sr_move speed profile Description: This function is used to get the relative S-curve speed profiles. By this function, user can get the actual speed profile before running. This function has warnning return code. please refer to _8144_sv_move function.
F64 StrVel: Starting velocity (pulse/sec) F64 MaxVel: Maximum velocity (pulse/sec) F64 Tacc: Specified acceleration and deceleration time (sec) F64 *StrVelP: Actual start velocity (pulse/sec) F64 *MaxVelP: Actual Maximum velocity (pulse/sec) F64 *TaccP: Actual acceleration and deceleration time (sec) F64 *TconstP: constant speed time(maximum velocity) F64 *MagnP: Set to 0 Return Values: EERR_ParametersInvalid WAR_AccDecTimeToSmall WAR_AccDecTimeToLarge ERR_NoError Example: I16 I16 F64 F64 F64 F64 F64 ret;
7 Function Return Code The following table provides a list of possible return value in our library. If the return value is not zero, it means there are some error or warning occurred.
156 Function Return Code