Page 3
Trademarks NuDAQ, PCI-8136,PCI-8136M are registered trademarks of ADLINK Technology Inc, MS-DOS & Windows 95 are registered trademarks of Microsoft Corporation., Borland C++ is a registered trademark of Borland International, Inc.
Page 4
Getting service from ADLINK Customer Satisfaction is always the most important thing for ADLink Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. Web Site http://www.adlink.com.tw Sales & Service service@adlink.com.tw Technical NuDAQ nudaq@adlink.com.tw...
Table of Contents Chapter 1 Introduction............1 Functionality of PCI-8136M ..........3 Features ................4 Specifications ..............5 1.3.1 Applicable Motors: ................5 1.3.2 Motion .....................5 1.3.3 Motion Interface I/O Signals............5 1.3.4 General I/Os...................6 1.3.5 General Specifications..............7 Software Supporting ............8 1.4.1 Programming Library..............8 Chapter 2 Installation............9 What You Have ..............
Page 6
Chapter 4 Operation Theorem .........33 AD Conversion and Preloaded Trigger ....... 35 4.1.1 ADC....................35 4.1.2 Voltage Compare ............... 35 DA Conversion ..............36 4.2.1 DA Output by Trigger Source........... 36 Local DIO ................. 37 4.3.1 Digital Input................. 37 4.3.2 Digital Output................
Page 7
5.10 Close Loop Initialization ............ 84 5.11 Motion Parameters ............85 5.12 Motion Status ..............88 5.13 PTP Movement ..............90 5.14 2D Interpolation ..............92 5.15 3D Interpolation ..............94 5.16 Continuous Motion ............96 5.17 Homing ................97 5.18 Motion Function ..............
Page 8
How to Use This Guide This manual is designed to help you use the PCI-8136M. T he manual describes how to modify various settings on the PCI-8136M card to meet your requirements. It is divided into five chapters: • Chapter 1, "Introduction", gives an overview of the product features, applications, and specifications.
Introduction The PCI-8136M is a 6 axes motion control card with PCI interface. It supports two kinds of motor driver, Pulse type and voltage type. It can generate pulse trains or voltage commands for servo motors or stepping motors. The PCI-8136M is composed of 6 sets of motion control module.
Page 10
DAC x 6 Pulse Signals Encoder Counter x 6 Local Digital I/O 26 Slave #1 64In/64Out Serial IO Remote IO Master #1 64In/64Out Serial IO Remote IO Master #2 Slave #2 64In/64Out 64In/64Out Figure 1.1 Block Diagram of PCI-8136M 2 • Introduction...
Functionality of PCI-8136M The PCI-8136M is composed of 6 sets of motion control module. Each control set has its own pulse generator, encoder counter, analog output, dedicated I/O and analog input. When one axis is not for motion control, all of the components in the motion set can be used individually.
Features The PCI-8136M gets the following features: • Compact, half size PCB • 32-bit PCI-bus, plug and play • 6 channels 16-bit analog output • 6 channels 12-bit analog input • 19 channels isolated digital input • 7 channels open collector digital output •...
Specifications 1.3.1 Applicable Motors: • Stepping motors • AC or DC servomotors with pulse train input servo drivers • AC or DC servomotors with velocity command (analog) input servo drivers 1.3.2 Motion • Number of controllable axes: selectable 1~6 Axes •...
Software Supporting 1.4.1 Programming Library The Programming Library enables motion control functionality of PCI-8136M. It provides versatile function calls for customers who are writing their own motion control programs. The Motion Library supports MS-DOS Borland C/C++ with programming library and Windows 95/98/NT/2000 with DLL.
Installation This chapter describes how to install the PCI-8136M hardware and software correctly. Please follow the follow steps. Section 2.1 Check what you have Section 2.2 PCB Outline Drawing Section 2.3 Install the hardware Section 2.4 Install the software driver Section 2.5...
What You Have In addition to this User's Guide, the package includes the following items: • PCI-8136M 6-axis Motion Controller Card • DB9 and DB25 Bracket • External Power cable for CN2 • 124O, DIP type resistance * 6 •...
2.3.2 PCI slot selection Your computer will probably have both PCI and ISA slots. Do not force the PCI card into a PC/AT slot. The PCI-8136M can be used in any PCI slot. 2.3.3 Installation Procedures Read through this manual, and setup the jumper according to your application.
CN1 PIN ASSIGNMENTS: MAIN CONNECTOR The CN1 is the major connector for the Motion related I/O, including pulse output, encoder feedback input, Analog output and interface IO signals. Name Function Name Function AGND Analog ground AGND Analog ground Analog output, • Analog output, „...
Solid wire: ϕ 0.32mm to ϕ 0.65mm (AWG28 to AWG22) Twisted wire:0.08mm to 0.32mm (AWG28 to AWG22) Naked wire length:10mm standard The EX+24V is shorted inside PCI-8136M with COM+ in CN1 (No. 6,7,8). The EXGND is shorted inside PCI-8136M with COM- in CN1 (No. 55,56). Installation • 15...
CN3 PIN ASSIGNMENTS: DB25 CONNECTOR The signals on CN3 are for Analog input and remote serial IO. G2SIOCLK/ (14) G2SIOCLK G2SCS0/ Remote serial IO #2 (15) S2SCS0 G2S2MD/ (16) G2S2MD G2M2SD/ (17) G2M2SD AGND Analog output (18) DAC1 DAC3 (19) DAC2 ADC1- (20)
Signal Connection The signal connections of all the I/O signals are described in this chapter. Please refer the contents of this chapter before wiring the cable between the PCI-8136M and the motor drivers. This chapter contains the following sections: Section 3.1 Pulse output signals OUT and DIR Section 3.2...
Pulse output signals OUT and DIR There are 6-axis pulse output signals on PCI-8136M. For every axis, two pairs of OUT and DIR signals are used to send the pulse train and to indicate the direction. The OUT and DIR signals can also be programmed as CW/CCW or AB phase signals pair.
Page 27
Figure 3.1.1 Pulse output (pulse generator) circuit If the driver side is open collector mode, please use any one of positive and negative pins to be a control signal and EXGND as its output ground. Please take care that the current sink to these pins must not exceed 20mA. Signal Connection •...
Voltage output signals DAC There are 6 DAC output channels on PCI-8136M. If the closed loop control mode is set for any one of the 6 axes, its corresponding DAC channel will be treated as voltage command output. If not, the DAC channel will be treated as a general purposed analog output channel.
Page 29
Notice that the DAC Channel 1~ 3 in CN1 and CN3 are connected inside the PCI-8136M. Signal Connection • 21...
Encoder feedback signals EA, EB and EZ The PCI-8136M provides 6 differential pulse inputs with 2500V rms isolation, and each pair of EA, EB, and EZ is related to one motion axis. The pulse mode is software programmable to be AB-phase, CW/CCW, or Pulse/Direction, and the counter speed goes up to 2 MHz.
Page 31
(1) differential line driver or (2) open collector output. Connection to Line Driver Output To drive the PCI-8136M encoder input, the driver output must provide at least 3.5V across the differential pairs with at least 6 mA driving capability. The ground level of the two sides must be tight together too.
Page 32
To connect with open collector output, an external power supply is necessary. Some motor drivers also provide the power source. The connection between PCI-8136M, encoder, and the power supply is shown in the following diagram. Please note that the external current limit resistor R is necessary to protect the PCI-8136M input circuit.
Analog Input The PCI-8136M provides 6 12-bit A/D channels. The analog source is selectable for each channel to be ±10V DC (Default) or 0~20 mA by soldering a 124O DIP resistance which is shipped with PCI-8136M. Figure 3.4.1: Current input mode – location of 124O DIP resistance To avoid ground loops and get more accuracy measurement of A/D conversion, it is quite important to understand the si g nal source type.
Origin signal ORG The origin signals (ORG1~ORG6) are used as input signals for origin of the mechanism. The following table is the pin assignment for ORG. CN1 Pin No. Signal Name Description Alternative Name COM+ Ext +24V COM+ COM+ Ext +24V COM+ COM+ Ext +24V...
End-Limit signals PEL and MEL There are two end-limit signals PEL and MEL for each axis. PEL indicates end limit signal in plus direction and MEL indicates end limit signal in minus direction. The following table is the pin assignment for EL signal. CN1 Pin No.
Emergency stop signal ESTOP The emergency stop signal ESTOP is used to stop pulse output from all OUT and DIR channels. The following is the ping assignment information for ESTOP. Signal Name CN 1 Pin No. Description Alternative Name COM+ Ext +24V COM+ COM+...
Servo on signal SVON The SVON signals can be used as servo-on control at servo drivers or general-purpose output signals. The following is the pin assignment information for SVON. Signal CN1 Pin No. Description Alternative Name Name COM+ Ext +24V COM+ COM+ Ext +24V...
General purpose output P-RDY There is one general purpose output pin on PCI-8136M. The pin assinment is shown as following table: Signal CN1 Pin No. Description Alternative Name Name COM+ Ext +24V COM+ COM+ Ext +24V COM+ COM+ Ext +24V...
3.11 Open Loop and Closed Loop Connection All axes in PCI-8136M are free to set as open loop pulse output control or closed loop voltage output control. Users must realize what is the different between these two settings. There are 6 motion control sets for every axis in PCI-8136M card. Each set has its own pulse output, encoder input, analog output, analog input and dedicated I/O channels .
Operation Theorem This chapter describes the detail operation theorem of the PCI-8136M card. Contents of the following sections are shown as following. Section 4.1 : AD conversion and preloaded Trigger Section 4.2 : DA Conversion Section 4.3 : Local DIO Section 4.4...
Page 42
Please refer to the following architecture diagram of PCI-8136M VB / VC Programming Motion Function Library ASIC I/O Map Register Device Driver PCI Bus ASIC Windows PCI9050 PCI Bus : Please refer to section 4.1: AD Conversion and Preloaded Trigger : Please refer to section 4.2: DA Conversion...
AD Conversion and Preloaded Trigger 4.1.1 The PCI-8136M provides 6 Differential ADC channels. Each channel consists of two inputs. One is for (+) signal and the other is for (-) signal. The input signal may be voltage ranged from –10 ~ +10V or current ranged from –20mA ~ 20mA.
_8136_A_Set_Compare_Value(), _8136_A_Set_Compare_Volt (), _8136_S_Set_Int_Factor() : please refer to section 5,9 DA Conversion The PCI-8136M provides 6 channel 16-bit, bipolar ( ±10V DC) digital to analog converter. The D (value assigned) to A (voltage output) converting table is showed bellow. 4.2.1 DA Output by Trigger Source PCI-8136 allows users to set a pre-load value for each DAC channel.
4.3.1 Digital Input The PCI-8136M provides 19 digital input channels with 2500rms isolation. The DI channel is logically “HIGH” when no current goes from COM+ to DIf , and, Logically “LOW” when current goes from COM+ to DIf. The max current passing trough DIf must b e less than 20mA..
Pulse Input and Position Compare 4.4.1 Pulse Input The PCI-8136M has 6 32-bit pulse input channels for encoder counter. It can accept 3 kinds of pulse input: Plus and minus pulses input (CW/CCW mode). 90°phase difference signals(AB phase mode). Pulse and direction input(Pulse/DIR).
90° phase difference signals Input Mode(AB phase Mode) In this mode, the EA signal is 90° phase leading or lagging in comparison with EB signal. Where “lead” or “lag' of phase difference between two signals is caused by the turning direction of motors. The up/down counter counts up when the phase of EA signal leads the phase of EB signal.
4.4.3 Position Compare The PCI-8136M provides position compare function for all six pulse input channels. Once the counter value is reached the pre-set compare value, an This function can interrupt signal will be generated immediately. effectively reduce the overhead of CPU's polling for current position.
Pulse Output The PCI-8136M provides 6 pulse output channels. They are used to send out constant-frequency pulse trains. When changing the output frequency of any channel, there is at most 265ms time delay. There are also 3 kinds of pulse output: (1). plus and minus pulses input(CW/CCW mode);...
Page 50
Negative Direction Related functions: _8136_P_Initial() : please refer to section 5.2 _8136_P_Set_Output_Type(), _8136_P_Send(), _8136_P_Stop(), _8136_P_Change_Speed(), please refer to section 5.2 42 • Operation Theorem...
Remote Serial IO The PCI-8136M support 2 set of remote serial IO, each set may consist at most 64DI and 64DO. To use remote serial IO function, a slave module is needed. Note: The remote I/O functions are reserved on current version.
470, 480, 490, 500, …. 500, 490,480,…., 300,200,100} The total number of data is 1000ms / 4ms = 250.Data The data is transmitted via PCI-Bus into FIFO in PCI-8136M. The size of FIFO is 64 for each axis. Every 4ms or less, the DDA engine takes a data from FIFO and send these pulses to motor driver with equal time interval.
Open-loop and close-loop control This section explains the motion control algorithms provided by PCI-8136M. There are two possible ways of control command output. One is via DAC channel à analog voltage, and the other is via OUT & DIRà Pulse command.
Constant Velocity Motion This mode is used to operate one axis motor at constant velocity motion. The output pulse accelerates from a starting velocity (str_vel) to the specified constant velocity (max_vel). The _8136_v_move() function is used to accelerate constantly while the _8136_sv_move() function is to accelerate according to S -curve (constant jerk).
4.10 Trapezoidal Motion This mode is used to move one or more axes to a specified position (or distance) with a trapezoidal velocity profile. Single axis and multi-axes are controlled from point to point or follow a specific path like ARC. An absolute or relative motion can be performed.
Page 56
max_vel str_vel Tacc Tdec Relative Functions: _8136_P_Initial() refer to section 5.2 _8136_Motion_Stop() refer to section 5.18 _8136_Motion_Status() refer to section 5.12 _8136_Start_TR_Move(),_8136_Start_TA_Move() refer to section 5.13 48 • Operation Theorem...
4.11 S-Curve Profile Motion This mode is used to move one axis motor to a specified position (or distance) with a S-curve velocity profile. S-curve acceleration profiles are useful for both steppers and servo motors. The smooth transitions between the start of the acceleration ramp and the transition to the constant velocity produce less wear and tear than a trapezoidal profile motion.
Page 58
The S-curve profile motion functions are designed to always produce smooth motion. If the time for S-Curve 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 maximum velocity), the maximum velocity is automatically lowered and recalculated the deceleration time.
?t. Then the moving speed along X-axis and Y-axis will be?X/?t., ?Y/?t, respectively. X-Axis The interpolation function of PCI-8136M has similar format. For example, a S-Curve 2-axis (2 and 3) linear interpolation: int16 AxisArray[2]={2,3}...
Page 60
The composite speed profile could be trapezoidal or s-curve velocity profile during one interpolation motion. The following graph is the result of trapezoidal circular interpolation. The command for this result is: int16 AxisArray[2]={2,3} Start_Arc_XY(CARD0, AxisArray, 0, -10000, 360.0, 100, 10000, 1.0, 2.0) The third and fourth parameters represent the arc center.
Page 61
Relative Functions: _8136_P_Initial() refer to section 5.2 _8136_Motion_Stop() refer to section 5.18 _8136_Motion_Status() refer to section 5.12 _8136_Start_Move_XY(),_8136_Start_S_Move_XY(), _8136_Start_Arc_XY(),_8136_Start_S_Arc_XY() : Refer to section 5.14 Operation Theorem • 53...
4.13 3D Interpolation The PCI-8136M supports three axes linear interpolation. Users can choose any three axes from 6 axes to fulfill it. The composite speed calculation is the same with 2D interpolation. Also, Trapezoidal and S-curve speed profile are selectable. The following graph is the result of 3 axes linear interpolation. The...
In most applications, home point is a very important reference to the coordinate of space. The PCI-8136M has a simple way to search a home point which is connected to the ORG pin of CN1. After giving a home moving command, the axis will start to move toward one direction until the ORG signal is reached.
4.15 Motion Parameters Setting The default setting of output pulse width for PCI-8136M is 2 micro seconds and the control loop cycle time is 4.096ms. The setting could be changed by M_Set_Sytem_Param() function according to the following table. 128K 256K...
4.16.2 Limit Switch Signal In any operation mode, if an ±EL signal is active during moving condition, it will cause PCI-8136M to stop the control output signals (OUT and DIR). PEL signal indicates end-limit in positive (plus) direction. MEL signal indicates end-limit in negative (minus) direction.
4.17 Interrupt Control The PCI-8136M can generate INT signal to host PC according to 8 types of interrupt factors, refer to _8136_S_Set_Int_factor() function for more details. The following table represents the interrupt setting for all factors. _8136_S_Set_Int_factor( Cardno, AxisNo, Int_Factor) AxisNo Int.
Page 68
Then use APIs provided by PCI-8136M to get the interrupt signal. Each card has 7 events for these interrupts. Event 0 ~ 5 stands for axis 0~5 and event 6 stands for timer interrupt and alarm interrupt.
Page 69
Start the thread( Use a boolean value to control the thread’s life ) ThreadOn=TRUE; AfxBeginThread(IntThreadProc,GetSafeHwnd(),THREAD_PRIORIT Y_NORMAL); Before exit the program, remember to let the thread go to end naturally. ThreadOn=FALSE; We suggest user to create a thread and use WaitForSingleObject() for each events in order to guarantee the performance.
C++ language. The function prototypes and some common data types are decelerated in PCI-8136M.H. These data types are used by PCI-8136M library. We suggest you to use these data types in your application programs. The following table shows the data type names and their range.
List of Functions Initialization Section 5.2 _8136_Initial(*cardno) Interface card initialization _8136_S_Close(cardno) Interface card close _8136_A_Initial(cardno) Analog I/O initialization _8136_P_Initial(cardno) Pulse I/O initialization System Parameters Section 5.3 _8136_R_Set_RIO_Clk(cardno, slaveno, clk) Set Rio clock divider _8136_A_Set_DAC_Clk(cardno,clk) Set DAC clock divider _8136_A_Set_ADC_Clk(cardno,clk) Set ADC clock divider _8136_S_Set_Timer_Value(cardno,timer) Set Timer click count _8136_P_Set_Enc_Filter(cardno,filter)
Page 72
_8136_INT_Disable(cardno) Remove int. event handler _8136_S_Set_Int_Factor(cardno, ax,factor,op) Set interrupt factor _8136_S_INT_Control(cardno, ctrl) Enable/disable interrupt _8136_S_Get_Int_Status(cardno, ch, *status) Get Int. status _8136_Callback_Function(cardno, *callbkfn) Set a call back function for int. Closed Loop Initialization Section 5.10 _8136_C_Initial(cardno,axisno) Close loop control initialization Motion Parameters Section 5.11 _8136_M_Set_System_Param(cardno,spd,tm) Set motion resolusion...
_8136_P_Initial – Initialize pulse output engine and encoder counter @ Description _8136_Initial: This function is used to initialize PCI-8136M card. User must use this function before any operation in the program. This function will return a number to notice user how many cards is found. _8136_S_Close: This function is used to close PCI-8136M card.
Page 74
B_8136_R_Initial (ByVal CardNo As Integer, ByVal SlaveControl As Integer) As Integer @ Arguments CardNo: card number designated to set (Range 0 ~ 3) AxisNo: axis number designated to set (Range 0 ~ 5) *existCards: a return value to indicate how many cards are found SlaveNo: assign slave number (Range 0~1) SlaveControl: Enable/Disable Slave Module( 1 for enable, 0 for disable )
_8136_P_Set_Enc_Filter - Set encoder filter clock @ Description _8136_R_Set_RIO_Clk : PCI-8136M can connect two remote I/O slave module. This function is for setting module's transmission clock. Assign a clock divider number to change its transmission rate. The maximum transmission clock is about 16.7Mhz and the minimum is about 130Khz for each slave module.
Page 76
@ Syntax C/C++ (DOS, Windows 95/98/NT/2000) I16 _8136_R_Set_RIO_Clk(I16 CardNo, I16 SlaveNo, I16 Clk_Divider) I16 _8136_A_Set_DAC_Clk(I16 CardNo, I16 Clk_Divider) I16 _8136_A_Set_ADC_Clk(I16 CardNo, I16 Clk_Divider) I16 _8136_S_Set_Timer_Value(I16 CardNo,U32 TimerValue) I16 _8136_P_Set_Enc_Filter(I16 CardNo,I16 Filter) Visual Basic 5.0 or higher B_8136_R_Set_RIO_Clk(ByVal CardNo As Integer, ByVal SlaveNo As Integer, ByVal Clk_Divider As Integer) As Integer B_8136_A_Set_DAC_Clk(ByVal CardNo As Integer, ByVal Clk_Divider As Integer) As Integer...
@ Description _8136_S_Get_IRQ_Channel: Although PCI-8136M is a PCI interface card, user can use this function to get the IRQ channel which is assigned by PCI BIOS. This value is no meaning when operating this card. It is only a part...
Digital I/O @ Name _8136_D_Output - Digital output for one bit _8136_D_Input - Digital input for one bit _8136_D_OutputA - Digital Output for all bits once _8136_D_InputA - Digital Input for all bits once @ Description _8136_D_Output: There are 7 open collector output channels in PCI-8136. This function is for controlling these output bits by setting them on or off.
Page 79
Visual Basic 5.0 or higher B_8136_D_Output(ByVal CardNo As Integer, ByVal Channe As Integer, ByVal Control As Integer) As Integer B_8136_D_Input(ByVal CardNo As Integer, ByVal Channel As Integer, Control As Integer) As Integer B_8136_D_OutputA (ByVal CardNo As Integer, ByVal Value As Integer) As Integer B_8136_D_InputA(ByVal CardNo As Integer, Value As Long) As Integer...
Remote I/O @ Name _8136_R_Status - Check Remote I/O Status _8136_R_Write - Write a word to remote _8136_R_Read - Read a word from remote @ Description _8136_R_Status: This function is for checking remote I/O stopped status. If the remote I/O is not running, user can use this function to check to status of remote I/O.
Page 81
SetNo: I/O range in slave module 0: bit 0~15 1: bit 16~31 2: bit 32~47 3: bit 48~63 SetValue: 16-bit value to write *SetValue: 16-bit value to read @ Return Code ERR_RangeError ERR_NoError Motion Libra • 73...
Analog I/O @ Name _8136_A_Write_Value - Output DAC in value _8136_A_Write_Volt - Output DAC in voltage _8136_A_Read_Value - Input from ADC in value _8136_A_Read_Volt - Input from ADC in voltage _8136_A_Output_Control - Start or stop DAC output _8136_A_Set_Trigger - Set DAC output by trigger _8136_A_Set_Trigger_Map - Select DAC trigger source _8136_A_Set_Preload_Volt - Set DAC trigger output voltage _8136_A_Set_Compare_Value - Set ADC compare value...
Page 83
_8136_A_Output_Control Once user wants to stop outputting any voltage from DA channel, he can use this function to close DA channel immediately. It can be open again by this function too. _8136_A_Set_Trigger This function is for enable/disable DA channel output by trigger source.
Page 84
I16 _8136_A_Set_Trigger_Map(I16 CardNo, I16 Channel, I16 Source) I16 _8136_A_Set_Trigger(I16 CardNo, I16 Channel, I16 Control) I16 _8136_A_Set_Preload_Volt(I16 CardNo, I16 Channel, F64 Volt) Visual Basic 5.0 or higher B_8136_A_Write_Value (ByVal CardNo As Integer, ByVal Channel As Integer, ByVal Value As Integer) As Integer B_8136_A_Write_Volt (ByVal CardNo As Integer, ByVal Channel As Integer, ByVal Volt As Single) As Integer B_8136_A_Read_Value Lib (ByVal CardNo As Integer, ByVal...
Pulse I/O @ Name _8136_P_Set_Output_Type - Set pulse output mode _8136_P_Set_Input_Type - Set pulse input mode _8136_P_Read - Read encoder counter _8136_P_Clear - Clear encoder counter _8136_P_Send - Send a constant pulse train _8136_P_Stop - Stop pulse train _8136_P_Change_Speed - Change pulse train frequency _8136_P_Read_Index - Read index value _8136_P_Set_Index_Latch - Set index latch type _8136_P_Read_Latch_Value - Read a latched encoder data...
Page 86
_8136_P_Clear This function is for clearing the encoder counter value to zero immediately. _8136_P_Send This function is for sending a fixed frequency pulse train of each channel. It will output a pre-configured pulse format which is set by P_Set_Output_Type(). _8136_P_Stop This function is for stopping the output pulse for each channel.
Page 87
I16 _8136_P_Read_Latch_Value(I16 CardNo, I16 EncNo, I32 *Value) I16 _8136_P_Set_Index_Latch(I16 CardNo, I16 WhichIndex, I16 Type); I16 _8136_P_Read_Index(I16 CardNo, I16 AxisNo, I16 *Index); I16 _8136_P_Change_Speed(I16 CardNo,I16 AxisNo,F32 Frq); Visual Basic 5.0 or higher B_8136_P_Initial (ByVal CardNo As Integer) As Integer B_8136_P_Set_Output_Type (ByVal CardNo As Integer, ByVal AxisNo As Integer, ByVal PulseFmt As Integer) As Integer B_8136_P_Set_Input_Type (ByVal CardNo As Integer, ByVal EncNo As Integer, ByVal EncFmt As Integer, ByVal Mul As...
Page 88
Mul: for A_B type's mutiplier 0 = 0X A_B Phase 1 = 1X A_B Phase 2 = 2X A_B Phase 3 = 4X A_B Phase EncData: read back encoder data FrqL: Pulse output frequency (Range 0~500k Hz) CompValue: Encoder Compare Value *Index: Index Status (0 or 1) Type: two trigger latch mode: 0 for first trigger, 1 for last trigger WhichIndex: select index no.
Interrupt Control @ Name _8136_INT_Enable - Set interrupt event handler _8136_INT_Disable - Remove int. event handler _8136_S_Set_Int_Factor - Set interrupt factor _8136_S_INT_Control - Enable/disable interrupt _8136_S_Get_Int_Status - Get Int. status _8136_Callback_Function - Set a call back function for int @ Description _8136_INT_Enable This function is only for Windows system.
Page 91
bit3: Home switch on bit4: Index signal on bit5: Encoder value compared bit6: Timer interrupt bit7: ADC pre-load value reached OptionType: Set ADC compare direction 1 = Rising Direction 2 = Falling Driection 3 = Both Direction *callbackAddr(I16 AxisNo, U16 IntSts) : function pointer type @ Return Code ERR_RangeError ERR_NoError...
_8136_C_Initial – Closed loop motion control initialize @Description _8136_C_Initial: There are 6 motion axes in one PCI-8136M. User can choose some or all of them to run in closed loop control mode by this function. In closed loop control mode, the specific DA channel and encoder counter channel are used for closed loop control.
5.11 Motion Parameters @Name _8136_M_Set_System_Param – Set motion cycle time and speed _8136_M_Set_IO_Active – Enable/disable motion I/O _8136_M_Switch_Logic – Set motion I/O's logic _8136_A_Set_Source – Switch DAC source _8136_M_Set_Feedback – Set axis0~2 encoder feedback on/off @Description _8136_M_Set_System_Param: This function is for users to choose motion system's maximum speed and motion loop's cycle time.
Page 94
_8136_M_Set_Feedback When users are using absolute position control motion functions, PCI-8136M will read current position counter value for calculating next position. If users don't connect any feedback device, they can use this function to disable external feedback. Then the absolute function will be valid.
_8136_Motion_Status – Check current axis’ motion status _8136_M_Get_Speed – Get one axis' current speed @Description _8136_M_ORG_Status: There are 6 ORG digital input pins in PCI-8136M. Every axis has one ORG pin for homing. This function is for checking the ORG pin's status. _8136_M_PEL_Status: There are 6 PEL( positive limit switch) digital input pins in PCI-8136M.
Page 97
I16 _8136_M_MEL_Status(I16 CardNo,I16 Channel) I16 _8136_M_ALM_Status(I16 CardNo) I16 _8136_Motion_Status(I16 CardNo,I16 AxisNo) I16 _8136_M_Get_Speed(I16 CardNo,I16 AxisNo,F64 *Speed) Visual Basic 5.0 or higher B_8136_M_ORG_Status (ByVal CardNo As Integer, ByVal Channel As Integer) As Integer B_8136_M_PEL_Status (ByVal CardNo As Integer, ByVal Channel As Integer) As Integer B_8136_M_MEL_Status (ByVal CardNo As Integer, ByVal Channel As Integer) As Integer B_8136_M_ALM_Status (ByVal CardNo As Integer)
5.13 PTP Movement @Name _8136_Start_TR_Move – Start a trapezoidal relative PTP move _8136_Start_SR_Move – Start a S-curve relative PTP move _8136_Start_TA_Move – Start a trapezoidal absolute PTP move _8136_Start_SA_Move – Start a S-curve absolute PTP move @Description _8136_Start_TR_Move: This function is for users to start a trapezoidal velocity profile relative PTP motion.
Page 99
ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) B_8136_Start_TA_Move (ByVal CardNo As Integer, ByVal AxisNo As Integer,ByVal Pos As Long,ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) B_8136_Start_SA_Move (ByVal CardNo As Integer, ByVal AxisNo As Integer,ByVal Pos As Long,ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double)
5.14 2D Interpolation @Name _8136_Start_Move_XY – Start a trapezoidal 2 axes linear interpolation motion _8136_Start_Arc_XY – Start a trapezoidal 2 axes circular interpolation motion _8136_Start_S_Move_XY –Start a trapezoidal 2 axes linear interpolation motion _8136_Start_S_Arc_XY – Start a trapezoidal 2 axes circular interpolation motion @Description _8136_Start_Move_XY:...
Page 101
Visual Basic 5.0 or higher B_8136_Start_Move_XY (ByVal CardNo As Integer, AxisArray() As Integer,ByVal PX As Long, ByVal PY As Long, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer B_8136_Start_Arc_XY (ByVal CardNo As Integer, AxisArray() As Integer,ByVal PX As Long, ByVal PY As Long, F64 Angle, ByVal StrVel As Double, ByVal MaxVel As Double, ByVal Tacc As Double, ByVal Tdec As Double) As Integer...
5.15 3D Interpolation @Name _8136_Start_Move_XYZ – start a 3 axis linear interpolation with trapezoidal velocity profile _8136_Start_S_Move_XYZ – start a 3 axis linear interpolation with S-Curve velocity profile @Description _8136_Start_Move_XYZ: This function is for 3D linear interpolation of trapezoidal velocity profile motion with absolute position for any three axes in one Card.
Page 103
@ Argument CardNo: card number designated to set (Range 0 ~ 3) AxisNo: axis number designated to set (Range 0~5) PX: line x position PY: line y position PZ: line z position StrVel: starting velocity MaxVel: maximum velocity Tacc: acceleration time in seconds Tdec: deceleration time in seconds @ Return Code ERR_RangeError...
5.16 Continuous Motion @Name _8136_V_Move – Trapezoidal continuous move for one axis _8136_SV_Move – S-curve continuous move for one axis @Description _8136_V_Move: This function is for continuous move. Continuous move means it has no destination but it has acceleration stage when it starts. This function is for trapezoidal acceleration move of one axis _8136_SV_Move: This function is for continuous move.
_8136_Home_Move – Start to search ORG pin for homing @Description _8136_Home_Move: By giving home search direction, PCI-8136M will auto searching the ORG signal for homing. After it reach the ORG pin. The encoder counter will reset to zero at the same time.
5.18 Motion Function @Name _8136_Motion_Stop – Stop motion for one axis _8136_C_Set_Gain – Tuning closed loop gain for one axis @Description _8136_Motion_Stop: This function is for stopping motion command immediately. The pulse generator will stop sending any command to driver. _8136_C_Set_Gain: This function is for tuning two closed loop parameters for V-command control mode.
ADLINK does not assume any liability for consequential damages as a result from our product uses, and in any event our liability shall not exceed the original selling price of the equipment.
Need help?
Do you have a question about the PCI-8136M and is the answer not in the manual?
Questions and answers