Home

2-axis Motion Control Module User Manual (I-8092F)

image

Contents

1. I I I LI I i I I I Lu I I I I I I LI I I I I I I Lu Deceleration Area Acceleration Area Time Fig A 20 S Curve acceleration deceleration driving ICPDAS 101 8092F Software User Manual When the fixed pulse trapezoidal driving is performed and also when the deceleration is performed before the acceleration stops the triangle driving profile is coming out The prevention of triangle driving profile in S curve acceleration deceleration driving will be discussed as follows If the initial speed is 0 and if the rate of acceleration is a then the speed at time tin acceleration region can be described as following V t Kt 1 14 Therefore the total output pulse number p t from time O to t is the integrated of speed 1 p t vo dt Kt 1 15 3 The total output pulse is 1 3 2 3 14 2 3 141 3 xat 4at 1 16 From 1 15 1 16 when the output pulse in acceleration of S curve is more than 1 12 of total output pulse it will stop increasing acceleration and start to decrease the acceleration value Velocity Kt Initial Speed Time Acceleration Time Fig A 21 The rule of 1 12 of parabolic acceleration deceleration ICPDAS 102 8092F Software User Manual A 4 Pulse Output Commands A 4 1 2 Axes Interpolation The 1 8092 can be set for linear
2. 66 6 3 3 Multi Segment Continuous Interpolation Using Array 68 6 3 4 2 Axis Ratio Motion 69 6 3 5 Mixed Linear and Circular 2 axis motions in Continuous Interpolation 71 6 4 Set the Interrupt Factors uere tescacecavecencscedsvscecdoesdeccestesseieecsscuss 74 6 4 1 Set the Interrupt Factors 74 6 4 2 Interrupt Disabled na daaraan aa paraa a aparra aa a aaa 76 6 4 3 Read the Interrupt Occurrence 77 6 5 Biiitzwir iua Sec 78 ICPDAS 4 8092F Software User Manual 6 5 1 Holding the Driving Command eene 78 6 5 2 Release the Holding Status and Start the Driving 78 6 5 3 Waiting until the Motion Is Completed eene 79 6 5 4 Stopping the Axes eee rentrer eran nnt vers ER TREE OR EX ERR FER OL RULES 81 6 5 5 Clear the Stop Status 85 6 5 6 End of Interpolation cis rien unen non ERN YR REP a naii 85 6 5 7 Setting the COMPARE value 86 APPENDIX A 1 8092 BASIC FUNCTIONS 97 A 138092F Command Set scscacscssecscstaccetscsscietsveescsecsessaseartevcetbssseseccessusstevtenssde 87 A 2 Pulse Output Comnman
3. 2 axes circular interplation mode setting i8092 SET R cardNo Card cardNo ax1 80000001 i8092 SET R cardNo Card cardNo ax2 8000000L 1414L 1000L Set parameters for X Y axes i8092_ SET SV cardNo AXIS X tempSV 18092 SET V cardNo AXIS X tempV i8092 SET A cardNo AXIS X tempA Set parameters for Z axis i8092 SET R cardNo AXIS Z templong i8092_ SET SV cardNo AXIS 2 tempVZ 18092 SET V cardNo AXIS 2 tempVZ Synchronous action provocative factor D STA II 1st seg 18092 SYNC MODE cardNo AXIS X 0x4010 0x0000 18092 SYNC MODE cardNo AXIS 2 0x0000 0x0002 18092 SET MANDEC cardNo AXIS X tempDP 18092 ARC CW cardNo 0 5000 0 10000 ij8092 SET PULSE cardNo AXIS 2 5000 18092 DRV FDRIVE cardNo AXIS Z 1 Wait for drive stop i8092_STOP_WAIT cardNo AXIS XYZ ICPDAS 175 8092F Software User Manual i8092 STOP WAlT cardNo AXIS_XYZ If 2nd seg 18092 SYNC MODE cardNo AXIS X 0x4010 0x0000 i8092 SYNC MODE cardNo AXIS Z 0x0000 0 0001 i8092 SET MANDEC cardNo AXIS X tempDP i8092 ARC CW cardNo 0 5000 0 10000 i8092 SET PULSE cardNo AXIS Z 5000 18092 DRV FDRIVE cardNo AXIS 2 0 Wait for drive stop Delay 500 Because of the servo lag Start point at F1 Fig A 44 Synchronous action example 3 ICPDAS 176 8092F Software User Manual A 7 8 FRnet Related Functions Table A 14 FRnet related functions
4. Function Name Description i8092 SA Write data to digital output of FRnet interface 18092 FRNET RA Read digital input from FRnet interface i8092 SA Format void 8092 FRNET SA BYTE cardNo WORD wSA WORD data Function This function write data to the FRnet digital output SA means the Sending Address which can be one of the legal group number of FRnet One group comprises 16 bits data Therefore total 128 DO can be defined for one FRnet interface Parameters cardNo is the board number WSA Group number range 0 7 8 15 are used for digital inputs data 16 bit data Return WORD 16 bit DI data Example WORD IN Data IN Data i8092_FRNET_RA 1 8 Read the 16 bit DI which is on module 1 and the group number is 8 ICPDAS 177 8092F Software User Manual i8092_FRNET_RA Format void i8092 FRNET RA BYTE cardNo WORD wRA Function This function reads the FRnet digital input signals RA means the Receiving Address which can be one of the legal group number of FRnet One group comprises 16 bits data Therefore total 128 DI can be defined for one FRnet interface Parameters cardNo is the board number WRA Group number range 8 15 0 7 are used for digital outputs data 16 bit data Return None Example i8092MF_FRNET_SA 1 0 Oxffff INNrite to the 16 bit DO which is on module 1 and the group number is 0 ICPDAS 178 8092F Software User Manual 8 18092 Comma
5. Eo 49 6 1 9 Continuous Pulse nnn nnne nnne 50 6 2 Interpolation Commniands 5 51 6 2 1 Setting the Speed and Acc Dec Mode for Interpolation 51 6 2 2 Setting the Vector Starting Speed 55 0 2 3 Setting the Vector Spe8d iius ERR EnEE PEE ER drag irr a YR GE 55 6 2 4 Setting the Vector Acceleration 56 6 2 5 Setting the Vector Deceleration Value eee 57 6 2 6 Setting the Vector Acceleration Rate 58 6 2 7 Setting the Number of the Remaining Offset Pulses 59 6 2 8 2 Axis Linear Interpolation 60 6 2 9 2 Axis Circular Interpolation Motion an 61 6 2 10 2 Axis Circular Interpolation Motion 63 6 3 Continuous Interpolation eere eere eee eee eene eese etta aeos ee etn aue 65 6 3 1 2 Axis Rectangular Motion eeeeeeeeeeeeeeeeeeeneneen nennen nennen 65 6 3 2 2 Axis Continuous Linear
6. ceres eee eee eene eee 195 ICPDAS 6 8092F Software User Manual 1 Preface 1 1 Introduction B This manual provides complete and detailed description of i8092F functions for users to develop programs for their control of automatic equipments Many examples are included in this manual for reference to write efficient application programs B This manual includes six chapters and two appendices This chapter gives a brief description of this manual Chapter 2 to 6 is the explanations of macro functions MF Appendices A and B are the descriptions of basic functions BF and the registers of MCX312 respectively The functions defined in DLL file are explained here This DLL can be used on different developing software platforms such as eVC VB net and C net and different OS systems MiniOS7 WinCE 1 2 Basic and Macro functions B Basic functions are suitable for those who are familiar with the MCX312 motion chip These functions can directly read write the registers of motion chip However users need to know more details about this motion chip B Macro functions provide a set of much easy to use functions that simplify the programming for users Some necessary settings such as speed range and deceleration point are calculated inside those functions to ease the loading of users on having to understand the motion chip Some useful costumed functions are provided for users to develop applications efficiently B I
7. i8092MF_RATIO_2D cardNo 1 7200 0 End the ratio motion 6 3 5 Mixed Linear and Circular 2 axis motions in Continuous Interpolation void i8092MF_MIX_2D_INITIAL BYTE cardNo WORD nAcc DWORD VSV DWORD VV DWORD VA Description This function does the initial settings for mixed linear and circular 2 axis motions in continuous interpolation Parameters cardNo Module number nAcc 0 gt constant speed VV 1 gt symmetric T curve Acc Dec VSV VV VA VSV Starting speed in PPS VV Vector speed in PPS VA Vector acceleration PPS Sec Return None Example i8092MF MIX 2D INITIAL This function should be defined before the 18092MF MIX 2D CONTINUE I function is used Please refer to the example of this function ICPDAS 71 8092F Software User Manual BYTE i8092MF_MIX_2D_CONTINUE BYTE cardNo WORD WORD nType long cp7 long cp2 long fp1 long fp2 Descript ion This function executes mixed linear and circular 2 axis motion in continuous interpolation However it is a software macro function therefore it requires CPU resource to run this function Parameters Return Example ICPDAS cardNo nAcc nType Module number 0 gt continuous interpolation 12 itis the last command of this continuous interpolation In Acc Dec mode it will perform a deceleration stop In constant speed mode it will directly stop rather than decelerate 1 2i18092MF LINE 2D BYTE c
8. 18092 HOME STEP2 Home search step 1 mode setting 18092 HOME STEP3 Home search step 1 mode setting i8092 HOME STEP4 Home search step 1 mode setting i8092 HOME SAND Home and Encoder Z phase signal condition setting 18092 HOME LIMIT The home search uses an overrun limit signal setting 18092 HOME PCLR Clear the logic position and real position counter at termination ES home search i8092 HOME START Start execution of automatic home search 18092 HOME MODE Set the home search mode 18092 EXTENSION MODE Format void 18092 EXTENSION MODE unsigned char cardNo WORD axis WORD WORD em7 data Function Write data to the WR6 WR7 registers and uses 64h command to set the conditions for synchronous action mode Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 em data is the 32 bit data for writing in the WR6 register em7 data is the 32 bit data for writing in the WR7 register Example Use the function to set the home search type of negative direction and hardware signal home near home limit i8092 EXTENSION 1 Oxf 0 5 00 0x054f ICPDAS 158 8092F Software User Manual i8092 GET EM6 Format WORD i8092 GET EM6 BYTE cardNo WORD axis Function Get the data of EM6 Parameters cardNo board number axis axis or axes Please refer to Table 2 1 Example get the EMG value of the X axis on 1 WORD em
9. 5 5 Waiting for the Homing sequence to be Completed e BYTE i8092MF HOME WAIT BYTE cardNo WORD axis Description This function assigns commands to be performed while waiting for the automatic home search of all assigned axes to be completed Parameters cardNo Module number axis Axis axes Please refer to Table 2 1 Return YES The Homing sequence has been completed NO The Homing sequence is not complete Example if 18092 HOME WAIT 1 AXIS X NO Ilperform some actions here if the X axis on module 1 has not completed llits homing sequence ICPDAS 41 8092F Software User Manual 6 General Motion Control 6 1 Independent Axis Motion Control The motion of each axis can be started independently Two axes are moving at the same time Each axis is moving independently Each axis can be commanded to change motion such as changing the number of pulses or the speed Each axis can be commanded to stop slowly or suddenly to meet the individual requirements 6 1 1 Setting the Acceleration Deceleration Mode void i8092MF_NORMAL_SPEED BYTE cardNo WORD axis WORD nMode Description The function sets the speed mode Parameters cardNo Module number axis Axis Please refer to Table 2 1 nMode 0 gt Symmetric T curve Please set SV V A and AO 1 gt Symmetric S curve Please set SV V K and AO 2 gt Asymmetric T curve Please set SV V A D and AO Return None Example BYTE cardNo 1
10. None Example i8092MF AVTRI DISABLE 1 AXIS X llenable the X axis of module 1 to generate a triangle form in its IIspeed profile if the pulse number for output is too low ICPDAS 23 8092F Software User Manual 2 18 External Pulse Input 2 18 1 Handwheel Manual Pulsar Driving void i8092MF_EXD_MP BYTE cardNo WORD axis long data Description This function outputs pulses according to the input pulses from a handwheel Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 The axis can be either X and Y data Gain a multiplier Return None Example i8092MF_EXD_MP 1 AXIS X 1 time the handwheel inputs a pulse to the X axis module 1 the controller will output 1 pulses to the motor driver Nonval rotation Reverse rotation fo i es a ee ee ms e m g Example of gain 1 i8092MF_EXD_MP 1 AXIS X 2 time the handwheel inputs a pulse to the X axis module 1 the controller will output 2 pulses to the motor driver Normal rotation Reverse rotation a f EE LL CJ LC Er Je 2 NESSUN ae JN we LIL LT XPM FL gage Example of gain 2 ICPDAS 24 8092F Software User Manual 2 18 2 Fixed Pulse Driving Mode void i8092MF_EXD_FP BYTE cardNo WORD axis long data Description This function outputs fixed pulses according to the trigger input the falling edge of the
11. STOP2 STOP1 STOPO ADSND ACNST AASND DSND ASND CMP CMP Status of Driving Finishing DO Displaying the comparison result between logical real position counter and COMP register 1 logical real position counter 2 COMP register 0 logical real position counter COMP register Displaying the comparison result between logical real position counter and COMP register 1 logical real position counter lt COMP register 0 logical real position counter 2 COMP register D1 CMP D2 ASND tbecomes 1 when in acceleration D3 CNST It becomes 1 when in constant speed driving D4 DSND _It becomes 1 when in deceleration In S curve it becomes 1 when acceleration deceleration D5 AASND increases D6 ACNST InS curve it becomes 1 Speed when acceleration deceleration keeps constant speed D7 ADSND In S curve it becomes 1 when ASND 1_ CNST 1 1 DGND 1 Time acceleration deceleration decreases Deceleration Acceleration Deceleration 010 8 STOP2 0 Ifthe driving is stopped by one of extemal decelerating stop signals nSTOP2 0 it will AASND 11 ACNST 1IADSND 1 AASND 1 ACNST 11 ADSNO 1 Time pile a iaaa r a S n d become 1 012 LMT If the driving is stopped by direction limit signal nLMTP it will become 1 D13 LMT If the driving is stopped by direction limit signal nLMTM it will become 1 D14 ALARM Ifthe driv
12. 8092F Software User Manual Example i8092MF_SET_SLMT 1 AXIS XY 20000 3000 0 set the forward software limit as 20000 and the reverse IIsoftware limit as 3000 for all axes on module 1 void i8092MF CLEAR SLMT BYTE cardNo WORD axis Description This function clears the software limits Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF CLEAR SLMT 1 AXIS XY clear the software limits for all axes on module 1 2 11 Setting the Encoder Related Parameters void 8092 SET ENCODER BYTE cardNo WORD axis BYTE nMode BYTE nDivision BYTE nZEdge Description This function sets the encoder input related parameters Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nMode Encoder input type 0 A quad B 1 up down nDivision Division setting for A quad B input signals 0 1 1 1 1 2 2 1 4 2 Sets the trigger level for the 2 phase 0 low active 1 high active ICPDAS 17 8092F Software User Manual Return None Example i8092MF_SET_ENCODER 1 AXIS_ XY 0 0 0 liset the encoder input type as A quad B the division is 1 the Z phase is low active void i8092MF SET EN DIR BYTE cardNo WORD axis BYTE nDir Description This function sets the encoder input direction Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nDir E
13. Target Point 10000 0 12000 Axis1 Fig A 33 2 axes linear interpolation ICPDAS 147 8092F Software User Manual Demo Program linear interpolation Parameters cardNo 1 2 Axis Linear Interpolation i8092 MOTION TYPE cardNo CONST2 II Set 2 Axes Constant Vector Speed Mode i8092_ SET R CardNo Card cardNo ax1 8000000 18092 SET R cardNo Card cardNo ax2 8000000 1414L 1000L i8092 SET V cardNo Card cardNo ax1 1000 i8092 LINE 2D cardNo 3000 4000 2 Axes Interpolation Circular Interpolation Functions i8092 ARC CW Format void 18092 CW unsigned char cardNo long cp1 long cp2 long fp1 long fp2 Function CW direction circular interpolation Parameters cardNo is the board number cp1 is the center for axis1 cp2 is the center for axis2 fp1 is the finish point for axis1 fp2 is the finish point for axis2 Example i8092 CW 1 5000 5000 10000 10000 Axis 2 Start Point 0 0 L Center point 5000 5000 Axis 1 e Finish Point 10000 10000 3L S Fig A 34 CW circular interpolation ICPDAS 148 8092F Software User Manual i8092_ARC_CCW Format void i8092_ARC_CCW unsigned char cardNo long cp1 long cp2 long fp1 long fp2 Function CW direction circular interpolation Parameters cardNo is the board number cp1 is the center for axis1 cp2 is the center for axis2 fp1 is the finish point for axis1 fp2 is the finish point for
14. The total output pulses numbers of the short axis are 7010x8 56568 Furthermore if the initial speed is 500PPS and will be accelerated to 20KPPS after 0 3 SEC the acceleration will be 20000 500 0 3 65000PPS SEC And the output pulses during acceleration will be 500420000 x 0 3 2 3075 Thus if we set the deceleration as same as the acceleration the manual decelerating point will be 56568 3075 53493 Note 1 This formula cannot be used in the constant vector speed driving 2 In circular interpolation only manual deceleration in trapezoidal driving is available the automatic deceleration in S curve driving is not available Start Point 0 0 Finish Point 0 0 Center point 10000 0 Fig A 25 Calculation of manual deceleration point for circular interpolation ICPDAS 106 I 8092F Software User Manual A 4 3 Bit Pattern Interpolation This interpolation driving receives interpolation data that is created by upper level CPU and transformed to bit patterns in a block of a predetermined size and outputs interpolation pulses consecutively at the specified drive speed Every axis has 2 bit data buffers for host CPU one for direction and the other for direction When performing the bit pattern interpolation the host CPU will write the designated interpolation data for 2 or 3 axes into 1 8092F If a bit in the bit pattern data from CPU is 1 1 8092F will output a pulse at the time unit if it is
15. i8092 ARC CCW cardNo 0 1500 1500 1500 Segment 6 i8092 NEXT WAlT cardNo Wait next command i8092 LINE 2D cardNo 0 1500 Il Segment 7 18092 NEXT WAIT cardNo Wait next command i8092_ARC_CCW cardNo 1500 0 1500 1500 II Segment 8 18092 STOP WAIT cardNo Card cardNo plane Delay 500 Because of the servo lag In eVC use Sleep 500 ICPDAS 152 8092F Software User Manual Bit Pattern Interpolation Functions i8092 BP ENABLE i8092 BP DISABLE Format void 18092 BP ENABLE unsigned char cardNo void 18092 BP DISABLE unsigned char cardNo Function Enable disable the bit pattern data stack Parameters cardNo is the board number Example i8092 BP ENABLE 1 i8092 BP DISABLE 1 i8092 BP STACK i8092 BP CLEAR Format void 18092 BP STACK unsigned char cardNo void 18092 BP CLEAR unsigned char cardNo Function Stack clear the bit pattern data Parameters cardNo is the board number Example i8092 BP STACK 1 i8092 BP CLEAR 1 ICPDAS 153 8092F Software User Manual i8092_BP_WAIT Format void i8092_BP_WAIT unsigned char cardNo Function Wait for bit pattern data outputting Parameters cardNo is the board number Example i8092_BP_WAIT 1 i8092 BP LINE2D DEMO Format void i8092 BP LINE2D DEMO unsigned char cardNo long p1 long p2 Function The linear DDA method for the bit pattern interpolation Parameters cardNo is the board number
16. i8092 SET 1 0x1 625 Note For K 65535 to 1 When Multiple 1 954 PPS SEC2 62 5 x 106 PPS SEC2 When Multiple 500 477 x 103 PPS SEC2 31 25 109 PPS SEC2 In this manual jerk is defined the increasing decreasing rate of acceleration deceleration in a time unit However jerk should cover the decreasing rate of acceleration and increasing rate of acceleration ICPDAS 137 1 8092F Software User Manual i8092 SET L Format void 18092 SET L int cardNo WORD axis WORD data Function The function is setting the deceleration rate jerk in a time unit of S curve Acc Dec motion The jerk calculation is shown in the following formula Jerk PPS Sec 62 5x109 K xM Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the value of the acceleration rate it s range is 1 65535 Example Set the jerk 625 PPS Sec for the X axis i8092 SET L 1 0x1 625 b Note For K 65535 to 1 When Multiple 1 954 PPS SEC2 62 5 x 106 PPS SEC2 When Multiple 500 477 x 103 PPS SEC2 31 25 109 PPS SEC2 i8092 SET PULSE Format void 18092 SET PULSE unsigned char cardNo WORD axis DWORD data Function The function is setting total output pulse numbers in fixed pulse driving The value is absolute unsigned number The output pulse numbers can be changed during the driving Parameters cardNo is the board number axis is the motion axis code name as
17. i8092 SET A cardNo Oxf 80 Set acceleration 80 PPS Sec i8092 SET HV cardNo Oxf 500 Set home speed 500 PPS i8092 SET PULSE cardNo Oxf 20000 Set offset pulse 20000 i8092 HOME START cardNo Oxf Starts execution of automatic home search i8092 STOP WAlT cardNo axis Wait drive stop Sleep 500 Delay 500ms In BC use Delay 500 18092 SET LP cardNo axis 0 Clear LP counter i8092_SET_EP cardNo axis 0 Clear EP counter ICPDAS 168 I 8092F Software User Manual a Example of home search using a limit signal only B Operation Input signal and logical level Search direction Search speed Step 1 Near home signal INO is active low 20000 PPS Step 2 Home signal IN1 signal is active low 500 PPS Step 3 Not executed Step 4 35000 pulse offset 20000 PPS MCX314As Over Run Limit in the Search Direction INO IN1 LMTM XINO Active XIN1 X direction PESE Photo Ser oa Step Direction gt Coupler a XLMTM 2923 1 Step 2 NU A Fig A 41 Hardware disposition for home operation example 3 Demo Program Example of home search using a limit signal only Parameters cardNo 1 motion 0 i8092_ SET R cardNo Oxf 800000 Set Multiple 10 i8092 HLMTM LEVEL 1 Oxf 0 Set negative limit signal of low active 18092 LMTSTOP MODE cardNo Oxf 0 Set Limit stop mode of decelerating stop 18092 HOME SAND cardNo Ox
18. ICPDAS 172 8092F Software User Manual Velocity PPS The X axis is passing through 10000 Enabled the provocative factor P gt C Start Y axis dir fixed pulse drive 3000 100 Time X Axis s Motion Y Axis s Motion Fig A 42 Synchronous action example 1 Demo Program At first the X Y axes continuous drive when the X axis is passing through the position 10000 the Y axis stops Parameters cardNo 1 ProvocativePulse 15000 ActivePulse 30000 TotalAxis 0x3 AXIS_XY ProvocativeAxis 0x1 AXIS_X ActiveAxis 0x2 AXIS_Y CompValue 10000 Set parameters s for total axes or you can also set for individual axis i8092_SET_SV cardNo AXIS X 100 i8092_ SET V cardNo AXIS X 3000 i8092_ SET A cardNo AXIS X 160 18092 SET SV cardNo AXIS Y 100 i8092_ SET V cardNo AXIS Y 2000 i8092 SET A cardNo AXIS Y 80 Set output pulse for the provocative axis i8092 SET PULSE cardNo ProvocativeAxis ProvocativePulse Set output pulse for active axis 18092 SET PULSE cardNo ActiveAxis ActivePulse Set a boundary condition COMP in provocative axis i8092 SET CM cardNo ProvocativeAxis CompValue Disable the software limit for i 0 i lt 4 i i8092_SET_WR2 cardNo 1 i Reg cardNo WR2 i amp 0x0003 II Direction continuous drive for the provocative axis 18092 ProvocativeAxis 0x21 Il Action of the active axis gt Stop i8092_SYNC_MO
19. None Example i8092MF_STOP_SLOWLY 1 AXIS XY IIdecelerate and stop the X and Y axes void i80922MF STOP SUDDENLY BYTE cardNo WORD axis Description This function immediately stops the assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i80922MF STOP SUDDENLY 1 AXIS XY llimmediately stop the X and Y axes ICPDAS 81 8092F Software User Manual void i8092MF_VSTOP_SLOWLY BYTE cardNo Description This function stops interpolation motion of the assigned module in a decelerating way Parameters cardNo Module number Return None Example i8092MF_VSTOP_SLOWLY 1 stop the interpolation of card 1 in a decelerating way void i8092MF_VSTOP_SUDDENLY BYTE cardNo Description This function stops interpolation motion of the assigned module immediately Parameters cardNo Module number Return None Example i8092MF_VSTOP_SUDDENLY 1 II stop the interpolation of card 1 immediately ICPDAS 82 8092F Software User Manual void i8092MF_SSTOP_SLOWLY BYTE cardNo WORD axis Description Except for State Control This function provides the similar feature with i8092MF_STOP_ SLOWLY Stop pulse output simply no ERROR_CODE 256 returned Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF_SSTOP_SLOWLY 1 AXIS XY decelerate and stop the X an
20. PULSE BIE PULSE falling edge Low HIGH ain ral PULSE rising edge HIGH dir LOW dir DIR PULSE falling edge HIGH dir LOW dir 2 5 Setting the Maximum Speed void i8092MF_SET_MAX_V BYTE cardNo WORD axis DWORD data Description This function sets the maximum rate for the output pulses speed A larger value will cause a rougher resolution For example when the maximum speed is set as 8000 PPS the resolution is 1 PPS when the maximum speed is set as 16000 PPS the resolution is 2 PPS when maximum speed is set as 80000 PPS the resolution is 10 PPS etc The maximum value is 4 000 000 PPS which means the resolution of speed will be 500 PPS This function change the resolution of speed to reach the desired maximum speed Since the scale in hardware is changed other parameters will be influenced too such as the starting speed the acceleration and the jerk It is recommended to set the maximum speed value as a integral multiplier of 8000 Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data The assigned maximum speed of each axis when the controller performs an interpolation motion However setting the value of axis 1 is enough For axis 1 the maximum value is 4 000 000 PPS Return None ICPDAS 13 8092F Software User Manual Example i8092MF_SET_MAX_V 1 AXIS XY 200000L The maximum speed for the X and Y axes of module 1 is 200KPPS resolution of the
21. accelerating pulses will be counted and the deceleration automatic deceleration starts from the ICPDAS 94 8092F Software User Manual drive speed to initial speed once the remaining pulse numbers are less than the accelerating pulse numbers Usually the user should set the same acceleration and deceleration rates For some cases the acceleration and deceleration can be set individually by setting the D1 of WR3 to 1 When the deceleration is set individually in fixed pulse driving the automatic deceleration will not be performed but the manual deceleration is required The user should set the bit D1 of Register WR3 as 1 and then use decelerating command 03h to set the deceleration When performing the symmetric trapezoidal driving the following parameters should be preset Range R Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Output Pulse Number P ICPDAS 95 I 8092F Software User Manual A 3 2 Trapezoidal Driving Asymmetric When an object is to be moved using stacking equipment the acceleration and the deceleration of vertical transfer need to be changed since gravity acceleration is applied to the object I 8092F performs automatic deceleration in fixed pulse driving in the non symmetric linear acceleration where the acceleration where the acceleration and the deceleration are different It is not necessary to set a manual deceleration point by calculation in advance Fig A 15 shows the case wher
22. select module 1 i8092MF_SET_MAX_V cardNo AXIS_XY 20000 liset the max speed of XY axes to 20K PPS i80922MF NORMAL SPEED cardNo AXIS XY 0 a symmetric T curve for all axes on module 1 i8092MF SET V cardNo AXIS 2000 liset the speed of all axes on module 1 to 2000 PPS i8092MF SET A cardNo AXIS XY 1000 ICPDAS 42 8092F Software User Manual liset the acceleration of all axes on module 1 to 1000 PPS Sec i8092MF SET SV cardNo AXIS XY 2000 liset the start speed of all axes on module 1 to 2000 PPS i8092MF SET AO cardNo AXIS XY 9 liset the number of remaining offset pulses for all axes to 9 pulses i8092MF FIXED MOVE cardNo AXIS XY 10000 all axes on module 1 for 10000 pulses i80922MF NORMAL SPEED cardNo AXIS XY 1 a symmetric S curve for all axes on module 1 i8092MF SET V cardNo AXIS 2000 liset the speed of all axes on module 1 to 2000 PPS i8092MF SET K cardNo AXIS XY 50 liset the acceleration rate of all axes on module 1 to 500 PPS Sec 2 i8092MF SET SV cardNo AXIS XY 200 set the start speed of all axes on module 1 to 200 PPS i8092MF SET AO cardNo AXIS XY 9 liset the number of remaining offset pulses to 9 pulses for all axes i8092MF FIXED MOVE cardNo AXIS XY 10000 limove all axes on module 1 for 10000 pulses in reverse direction i80922MF NORMAL SPEED cardNo AXIS XY 2 an asymmetric T curve for all axes on module 1 i809
23. t reach the setting initial speed during the S curve fixed pulse driving It will calculate the acceleration deceleration point automatically and will arrange the pulse numbers in acceleration equal to that in deceleration The method is calculating the output acceleration pulses and comparing them with the remaining pulses When the remaining pulses are equal to or less the pulses in acceleration it starts the deceleration When setting the offset for deceleration it will start deceleration early for the offset The remaining pulses of offset will be driving output at the initial speed see Fig A 11 The default value for offset is 8 when motion card power on reset It is not necessary to change the shift pulse value in the case of acceleration deceleration fixed pulse driving ICPDAS 90 I 8092F Software User Manual Velocity Velocity Driving Speed Driving Speed 7 Auto Deceleration Change of Output Pulse Initial Initial Speed Specific Output Speed Pulse Finished Time Time Fig A 7 Fixed pulse driving Fig A 8 Changing the output pulse numbers in driving Velocity Velocity Driving Drivin Dis ee Speed Speed Change of Output Pulse Initial Speed Initial Change of Output Pulse Speed Time Time Fig A 10 Changing the lesser pulse numbers than output pulse stop Fig A 9 Changing command during deceleration Velocity Driving Speed In
24. wr5 wr6 wr7 1 2 8 0 8000 0X4000 0x2000 0x1000 0x0800 0x0400 0x0200 0x4001 0x8001 0x0000 unsigned char unsigned short int unsigned long int 0x0 0x2 0x4 0x6 0x8 121 8092F Software User Manual Status buffer define rrO 0x0 define rr1 0x2 define rr2 0x4 define rr3 0 6 define rr4 0x8 define rr5 Oxa define rr6 rr7 Define Axis define AXIS_X 0x1 define AXIS_Y 0x2 define AXIS_XY 0x3 Define drive mode define PFD 0x20 define NFD 0x21 define PCD 0x22 define NCD 0x23 Table0 2 Function for Initial Setting Function Name Description 18092 PULSE MODE Setting the ouput Pulse mode 18092 SET Setting the parameter determining the multiple of drive speed acceleration deceleration and jerk i8092 GET Getting the global variable i8092 HLMTP LEVEL Setting the Active Level of the HLMTP sensior i8092 HLMTM LEVEL Setting the Active Level of the HLMTM sensior 18092 SLMTP MODE Setting the mode of the SLMTP 18092 SLMTM MODE Setting the mode of the SLMTM 18092 COMPARE LP Setting the COMP registers value and logic position i8092 COMPARE EP Setting the registers value and Encoder position i8092 RESET CARD Resetting the motion card ICPDAS 122 8092F Software User Manual 18092 PULSE MODE Format void 18092 PULSE MODE unsigned char cardNo W
25. 1 1 21 28 4 0 0 6 8 36 0 0 21 29 12 1 1 719 37 1 1 22 29 13 0 1 7 10 38 O 1 22 30 44 1 1 8 11 39 1 1 23 31 15 1 1 9 12 40 1 1 24 32 16 0 0 9 12 41 0 09896 757 Pony 30 47 1 1 10113 42 1 1 25 33 18 0 1 10 14 43 0 1 25 34 19 1 1 41 15 44 1 EE 26 35 20 1 1 12 16 45 1 1 27 36 21 0 Oxb5ad 0 Oxbdf7 12 16 46 O 0 27 36 22 1 1 131171 47 1 1 28 37 23 O 1 13 18 48 0 1 28 38 24 1 1 44 19 49 1 1 29 39 25 1 1 15120 s 4 99 ag 49 Note Z1 Z2 are the output pulse on the each interval X is the sum of Z1 Y is the sum of Z2 Hex1 is the 16 bits character made of 16 ones or zeros Z1 and Hex2 is the 16 bits character made of 16 ones or zeros Z2 ICPDAS 157 8092F Software User Manual A 7 6 Automatic Home Search Table A 8 Home Search Function Function Name Description 18092 EXTENSION MODE Write data into the WR6 WR7 registers and use 60h command to set the conditions for automatic search mode 18092 GET EM6 i8092_GET_EM6 i8092_ GET EM7 18092 GET EM7 18092 INO LEVEL Setting the active level of the near home signal INO 18092 IN1 LEVEL Setting the active level of the home signal IN1 18092 IN2 LEVEL Setting active level of the encoder Z phase signal IN2 i8092 SET HV The home search speed HV setting 18092 HOME STEP1 Home search step 1 mode setting
26. 4 http www icpdas com 185 f amp A v2 0 1 1 Invalid Up down pulse input is not available D12 Setting active level of input signal nALARM 0 active on the Low ALM L level 1 active on the Hi level Setting enable disable of servo alarm input signal nALARM 0 ALM E disable 1 enable When it is enabled MCX312 will check the input signal If it is active D14 ALARM bit of RR2 register will become 1 The driving stops Setting logical level of nINPOS input signal 0 active on the Low INP L level 1 active on the Hi level Setting enable disable of in position input signal nINPOS from servo INP E driver 0 disable 1 enable When it is enabled bit n DRV of RRO main status register does not return to 0 until nINPOS signal is active after the driving is finished D13 D14 D15 D15 D0 will be set to 0 while resetting B 4 Mode Register3 WR3 Each axis is with mode register WR3 The axis specified by NOP command or the condition before decides which axis s register will be written WR3 can be used for manual deceleration individual deceleration S curve acceleration deceleration the setting of external operation mode the setting of input signal filter and so on H E D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 DS D4 D3 D2 D1 DO FL2 FLO FE4 EE2 FE1 FEO JOUTSL VRING AVTRI Exoei EXOPO SACC DSNDE MANLD 00 MANLD Setting manual automat
27. EMG is asserted Reserved Reserved HOME Occurs when both Z phase and HOME are asserted refer to 6 5 4 Occurs when the EMG software is asserted Example if 18092 _ ERROR_CODE 1 AXIS X amp 10 Check if either the software limit or hardware limit 2 8 the reverse direction is asserted 3 7 Setting the general Dinigtal output void i8092MF SET OUTO BYTE cardNo WORD axis WORD nLevel Description This Function sets the Digital Output status Paramenter cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y nLevel DO output 0 OFF 1 ON Return no Example i8092MF SET OUTO 1 AXIS XY 1 set the DO of X and Y to ON ICPDAS 35 I 8092F Software User Manual 4 FRnet Functions for i8092F only 4 1 Read FRnet DI Signals WORD i8092MF_FRNET_IN BYTE cardNo WORD wRA Description This function reads the FRnet digital input signals RA means the Receiving Address which can be one of the legal group number of FRnet One group comprises 16 bits data Therefore total 128 DI can be defined for one FRnet interface Parameters cardNo Module number Group number range 8 15 Note 0 7 are used for digital outputs Return WORD 16 bit DI data Example WORD IN_Data IN_Data i8092MF_FRNET_IN 1 8 Read the 16 bit DI which is on module 1 and the group number is 8 ICPDAS 36 I 8092F Software
28. I 8092F Software User Manual Return None Example i8092MF_RATIO_INITIAL IlInitial setting for i8092MF_RATIO_2D function Please refer to the example of i8092MF_RATIO_2D function e BYTE i8092MF_RATIO_2D BYTE cardNo WORD nType long data WORD nDir Description This function performs a two axis ratio motion Parameters cardNo nType data nDir Return YES NO Example Module number 0 gt Perform the ratio motion 1 gt Declare the end of ratio motion The pulse number of X axis 8 388 607 8 388 607 Direction of the Y axis 0 1 CCW An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error No errors BYTE cardNo 1 select module 1 int sv 300 set starting speed to 300 PPS int v 18000 set vector speed to 18000 PPS long a 500000 set acceleration value to 500K PPS Sec int loop1 loop2 i8092MF_SET_MAX_V cardNo 0Xf 160000 liset maximum speed value to 18000 PPS i8092MF_RATIO_INITIAL cardNo sv v a 0 36 ratio is 0 36 for loop2 0 loop2 lt 5 loop2 for loop1 0 loop1 lt 5 loop1 ICPDAS i8092MF_RATIO_2D cardNo 0 3600 0 70 8092F Software User Manual perform the ratio motion in the CW direction i8092MF RATIO 2D cardNo 0 3600 1 the ratio motion in the CCW direction i8092MF_RATIO_2D cardNo 0 7200 0 i8092MF_RATIO_2D cardNo 0 3600 1
29. Manual Description This function can be used to assign commands to be performed while waiting for all motion to be completed stopped Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return YES Motion is complete NO Motion is not complete EXAMPLE ICPDAS BYTE cardNo 1 select module 1 i8092MF_SET_MAX_V cardNo AXIS XY 20000 set the maximum speed of all axes on module 1 to 20K PPS i80922MF NORMAL SPEED cardNo AXIS XY 0 liset the speed profile of all axes on module 1 to be symmetric T curve i8092MF SET V cardNo AXIS XY 2000 liset the speed of all axes on module 1 to 2000 PPS i8092MF SET A cardNo AXIS XY 1000 liset the acceleration value of all axes on module 1 to 1000 PPS S i8092MF SET SV cardNo AXIS XY 2000 liset the start velocity of all axes on module 1 to 2000 PPS i8092MF SET AO cardNo AXIS XY 9 liset the value of remaining offset pulses to 9 pulses i8092MF FIXED MOVE cardNo AXIS XY 10000 move all axes on module 1 for 10000 pulses if 8092MF STOP WAlT cardNo AXIS X NO perform some actions here if the X axis has not finished its IImotion 80 I 8092F Software User Manual 6 5 4 Stopping the Axes void i8092MF_STOP_SLOWLY BYTE cardNo WORD axis Description This function decelerates and finally stops the assigned axes slowly Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return
30. SLOWLY Slow down stop 18092 STOP SUDDENLY Emergent stop i8092 DRV HOLD Holding for later driving 8092 START Drive holding release starting motion ICPDAS 134 8092F Software User Manual i8092 SET SV Format void i8092_SET_SV unsigned cardNo WORD axis WORD data Function This function can set the start speed If the stop type is slow down stop the motion curve will be decelerating to the start speed and then stop Set the start speed is SV the multiple is M and then the driving start is Driving start speed PPS SVxM Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the value of SV data range is 1 8000 other values are invalid Example Set the start velocity 500 PPS for X axis i8092 SET SV 1 0x1 500 i8092 SET V Format void 18092 SET V unsigned char cardNo WORD axis WORD data Function The function is setting the speed of constant speed period in trapezoidal driving In constant speed driving the drive speed is the initial speed The drive speed calculation is shown in the following formula Driving Speed PPS VxM Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 data is value of acceleration the range is 1 8000 other values are invalid Example Set the driving velocity 1000 PPS for X axis i8092 SET V 1 0x1 1000 Note 1 If the s
31. Software User Manual A 8 3 Driving Commands Code Command 20h direction fixed pulse driving 21h direction fixed pulse driving 22h direction continuous driving 23h direction continuous driving 24h Drive start holding 25h Drive start holding release stop status clear 26h Decelerating stop 27h Sudden stop A 8 4 Interpolation Commands Code Command 30h 2 axis linear interpolation 31h 3 axis linear interpolation 32h CW circular interpolation 33h CCW circular interpolation 34h 2 bit pattern interpolation 35h 3 axis bit pattern interpolation 36h BP register writing enable 37h BP register writing disable 38h BP data stack 39h BP data clear 3Ah 1 step interpolation 3Bh Deceleration valid 3Ch Deceleraiton invalid 3Dh Interpolation interrupt clear A 8 5 Other commands ICPDAS Code Command 62h Automatic home search execution 65h Synchronous action activation OFh NOP for axis switching 180 8092F Software User Manual Appendix MCX312 Registers This part gives the users some refereces about how to access the registers in the MCX312 chip For more details users still have to refer to this chip s manual provided by NOVA electronics Inc B 1 Command Register WRO Command register is used f
32. as shows in Table 2 1 only set for single axis Example Read the real position counter for the X Y axes i8092_GET_EP 1 0 1 18092 GET 1 0x2 i8092 GET CV Format WORD i8092 GET CV unsigned char CardNo WORD axis Function The function can read the current drive speed and it will be set in read registers RR6 and RR7 When the driving stops the value becomes 0 The date value will increase from the setting value of start speed SV to the setting value of drive speed V Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 only set for single axis Example Read the current velocity for the X Y axes i8092 GET OCV 1 0 1 i8092 GET OCV 1 0x2 ICPDAS 130 8092F Software User Manual i8092_GET_CA Format WORD i8092_GET_CA unsigned char CardNo WORD axis Function The function can read the current drive acceleration will be set in read registers RR6 and RR7 When the driving stops the value becomes 0 The data value will increase from zero to the setting value of drive acceleration A Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 only set for single axis Example Read the current acceleration for the X Y axes i8092_READ_CA 1 0 1 i8092_READ_CA 1 0x2 i8092 SET CP i8092 SET CM Format void 18092 SET CP unsigned char CardNo WORD axis long dwdata void 18092 SET CM unsigned char CardNo WORD
33. axes as shows in Table2 1 data is the 32 bit hexadecimal value setting in the WR1 register Example Set the X axis s INO signal enabled and Hi active i8092 SET WR1 1 0x1 0x0003 i8092 SET WR2 Format void 18092 SET WR2 unsigned char cardNo WORD axis WORD data Function Set the mode register WR2 for 2 axes Parameters cardNo is the board number data is the 32 bit hexadecimal value setting in the WR3 register Example Set the all axes software limit enabled as comparing with the real position counter i8092 SET WR2 1 Oxf 0x0023 ICPDAS 115 8092F Software User Manual i8092_SET_WR3 Format void i8092_SET_WR3 unsigned char cardNo WORD axis WORD data Function Set the mode register WR1 for 2 axes Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 data is the 32 bit hexadecimal value setting in the WR3 register Example Set the non symmetry S curve mode for x y axes i8092 SET WR3 1 0x7 0x0007 i8092 SET WR4 Format void 18092 SET WR4 unsigned char cardNo WORD data Function Setting the mode register WR1 for 2 axes Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 data is the 32 bit hexadecimal value setting in the WR4 register Example Set the 2 axes OUT1 signals of Hi active level i8092 SET _WR4 1 Oxf 0x0202 ICPDAS 116 8092F Software User Manual i8092 SET WR5 Format voi
34. axis Description This function turns off the external input driving control functions Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 The axis can be either X and Y Return None Example i8092MF_EXD_DISABLE 1 AXIS_X disable the external input driving control function X axis on module 1 ICPDAS 27 8092F Software User Manual 2 19 Configure hardware with pre defined configuration file shorti8092MF LOAD CONFIG BYTE cardNo Description This function loads the pre defined configuration file and set the target 18092 module automatically The configuration file is generated by the PACEzGo Parameters cardNo Module number Return 0 successfully 1 cannot open the pre defined configuration file Example i8092MF LOAD CONFIG 1 the configuration file and configure the module 1 ICPDAS 28 8092F Software User Manual 3 Reading and Setting the Registers 3 1 Setting and Reading the Command Position LP void i8092MF_SET_LP BYTE cardNo WORD axis long wdata Description This function sets the command position counter value logical position counter LP Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 wdata Position command 2 147 483 648 2 147 483 647 Return None Example i8092MF_SET_LP 1 0 Set the LP for the X Y Z and U axes of module 1 as 0 which means that all
35. axis is the motion axis code name as shows in Table 2 1 Example Get the range value i8092 GET R 1 0 1 i8092 HLMTP LEVEL i8092 HLMTM LEVEL Format void i8092 HLMTP LEVEL unsigned char cardNo WORD axis WORD nLevel void 8092 HLMTM LEVEL unsigned char cardNo WORD axis WORD nLevel Function Set the logical level of direction hardware limit input signal Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 nLevel is the active level nLevel 0 Low active nLevel 1 Hi active Other values are invalid Example Set the positive direction hardware limit as Low active for 2 axes i8092 HLMTP 1 Oxf 0 ICPDAS 124 8092F Software User Manual i8092_SLMTP_MODE i8092_SLMTM_MODE Format void 18092 SLMTP_MODE unsigned char cardNo WORD axis WORD nMode void i8092 SLMTM_MODE unsigned char cardNo WORD axis WORD nMode Function Set the direction software limit Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nMode n 0 Enable n 1 Disable Example Enable the positive direction software limit for 2 axes i8092 SLMTP LEVEL 1 0x3 0 i8092 COMPARE LP Format void 18092 COMPARE LP unsigned char cardNo WORD axis Function The function selects the logical position counter LP as the comparing target of COMP registers Parameters cardNo is the board number axis is the motion axis code as sh
36. axis2 Example i8092 CCW 1 5000 5000 10000 10000 Start Point 0 0 Finish Point 10000 10000 Fig A 35 CCW circular interpolation ICPDAS 149 8092F Software User Manual i8092_CIRCLE_CW Format void 18092 CIRCLE CW unsigned char cardNo long cp1 long cp2 Function CW direction circular interpolation Parameters cardNo is the board number cp1 is the center for axis1 cp2 is the center for axis2 fp1 is the finish point for axis1 fp2 is the finish point for axis2 Example i8092 CIRCLE CW 1 0 10000 Note The function is convenient to profile for a total circle it is accounting to the i8092 CW function 18092 CIRCLE CCW Format void 18092 CIRCLE CCW unsigned char cardNo long cp1 long cp2 Function CW direction circular interpolation for constant speed Parameters cardNo is the board number cp1 is the center for axis1 cp2 is the center for axis2 fp1 is the finish point for axis1 fp2 is the finish point for axis2 Example 18092 CIRCLE CCW 1 0 10000 Note The function is convenient to profile for a total circle it is accounting to the i8092 ARC function ICPDAS 150 8092F Software User Manual i8092_NEXT_WAIT Format void 18092 NEXT WAlT unsigned char cardNo Function Using to waiting for the command of the next segment Parameters cardNo is the board number Example i8092 NEXT WAIT 1 Continuous inte
37. before decides which axis s register will be read This register is for reflecting the error information When an error occurs the error information bit is set to 1 When one or more of D6 to 00 bits of RR2 register are 1 n ERR bits of main status register RRO become 1 RR2 H D15 D14 D13 D12 011 D1O D9 7 De DS D4 D3 D2 D1 MULT EMG laca HLMIT SUMIT sume DO SLMT During the direction driving when logical real position counter 2COMP COMP enabled and used as software limit D1 During the direction driving when logical real position counter S SLMT COMP COMPenabled and used as software limit D2 HLMT When external direction limit signal nLMTP is on its active level HLMT When external direction limit signal nLMTM is on its active level When the alarm signal ALARM for servo motor is on its active ALARM level EMG When emergency stop signal EMGN becomes Low level D4 D5 This bit is only for the X axis of main chip at the multichip MULT interpolation When an error occurs in any axis of sub chip during multichip interpolation it will become 1 D6 In driving when hardware software limit is active the decelerating http www icpdas com 193 f amp IRE ALS XB v2 0 stop or sudden stop will be executed Bit SLMT will not become 1 during the reverse direction driving B 11 Status Register 3 RR3 Each axis is with status register 3 The axis spe
38. continuous motion command for several independent axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 The axis can be either X and Y data The specified speed positive value for CW motion negative value for CCW motion Return YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the errors NO No error Example ICPDAS BYTE cardNo 1 select module 1 i8092MF_SET_MAX_V cardNo AXIS_XY 20000 liset the maximum speed of all axes on module 1 to 20K PPS i80922MF NORMAL SPEED cardNo AXIS XY 0 liset the speed profile for all axes as a symmetric i8092MF SET V cardNo AXIS XY 2000 liset the speed of all axes on module 1 to 2000 PPS i8092MF SET A cardNo AXIS XY 1000 liset the acceleration value of all axes to 1000 PPS S i8092MF SET SV cardNo AXIS XY 2000 liset the start velocity of all axes to 2000 PPS i80922MF CONTINUE MOVE cardNo AXIS XY 1000 limove all axes on module 1 at a speed of 1000 PPS 50 I 8092F Software User Manual 6 2 Interpolation Commands 1 8092 is a motion module of 2 axes so first axis of interpolation is fixed X axis and second axis of interpolation is Y axis 6 2 1 Setting the Speed and Acc Dec Mode for Interpolation void i8092MF_VECTOR_SPEED BYTE cardNo WORD nMode Description This function assigns the mode of vector speed of interpolation Each interpolation mode will refer to construct a wo
39. descrip poetae aee Den eee ero ques 8 2 BASIC SETTINGS gt 2 1 Code numbers for axes 9 2 2 Registration of Modules and getting the LIB version 9 2 5 Resetting Module reiecta e 12 2 4 Pulse Output Mode Setting eee e eee eee ee eren ee ee ee teneo eee enco 12 2 5 Setting the Maximum Speed 4 eee eere eee ee eren ee ee eee een aee tno 13 2 6 Setting the Active Level of the Hardware Limit Switches 14 2 7 Setting the Motion Stop Method When Limit Switch Is Sensed 15 2 8 Setting the Trigger Level of the NHOME Sensor 15 2 9 Setting Trigger Level of the Home sensor eere ee eere 16 2 10 Setting and Clearing the Software Limits 16 2 11 Setting the Encoder Related Parameters 17 2 12 Setting the Servo Driver ON OFF e 18 2 13 Setting the SERVO ALARM Function eeeee eee eee eren eene eno 19 2 14 Setting the Active Level of the In Position Signals 20 2 15 Setting the Time Constant of the Digital Filter 20 2 16 Position Counter Variable Ring 4 ecce eee ee ee eee eerte n
40. for X Axis Set the compared source to be EP and the COMP value to 5000 ICPDAS 86 I 8092F Software User Manual Appendix A 1 8092F Basic Functions A 1 i8092F Command Set Table 1 1 8092F motion command classification Function Classification Statement Registers Management Functions Set the command register WRO mode registers WR1 WR3 output register WR4 and interpolation mode register WR5 Get the status registers RRO RR7 Initial Functions Set the initial status of the system There are about the registration the card name the slot number the output pulse mode and hardware limit signal and software limit signal Basic Motion Command Functions Provides the T S Curve acceleration deceleration symmetric asymmetric for 2 axes Interpolation Functions Provides the 2 axes linear interpolation circular interpolation and 2 axes bit pattern interpolation Automatic Home Search Provides the automatic home search function the hardware signals setting and the extension mode function setting Interrupt Control Functions Uses the MCX312 s interrupt factors and the interrupt service routine ISR to design the path planning or command the continuous motion Axis I O Signal Functions Include the alarm In position external signal settings and the servo input status settings Register Management Functions Include the
41. i8092MF SET D BYTE cardNo WORD axis DWORD data Description This function sets the deceleration value for the assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 ICPDAS 45 8092F Software User Manual data Return None Example The deceleration value The units are PPS Sec This value is related to the maximum speed value defined by i8092MF_SET_MAX_V function The maximum available deceleration value is MAX V 125 The minimum deceleration value is MAX_V 64 and all other deceleration values are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor i8092MF_SET_MAX_V 1 AXIS_X 20000 liset the maximum speed value of the X axis as 20 000 PPS therefore do not set any deceleration value that is larger than 1 20 000 125 PPS sec And 20 000 125 2 500 000 i8092MF SET D 1 AXIS X 100000 liset the deceleration value of the X axis on module 1 to 100K PPS Sec ICPDAS 46 8092F Software User Manual 6 1 6 Setting the Acceleration Rate void i8092MF_SET_K BYTE cardNo WORD axis DWORD data Description The function sets the acceleration rate i e Jerk value for the assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data The acceleration rate jerk value The units are PPS Sec This value is related to the maximum speed val
42. in Table 2 1 data is value of acceleration it s range is 1 8000 other values are invalid Example Set the acceleration 80 PPS Sec for X axis i8092 SET A 1 0x1 80 ICPDAS 136 8092F Software User Manual i8092 SET D Format void 18092 SET D unsigned char cardNo WORD axis WORD data Function The function use when acceleration deceleration is set individually D is the parameter determining the deceleration of the trapezoidal driving For S curve acceleration deceleration the designated deceleration can be set until a specific value D is driving The deceleration calculation is shown in the following formula Driving Deceleration PPS Sec Dx125xM Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the value of deceleration it s range is 1 8000 other values are invalid Example Set the deceleration 80 PPS Sec for X axis i8092 SET 0 1 0x1 80 i8092 SET K Format void 18092 SET cardNo WORD axis WORD data Function The function is setting the value of acceleraton rate jerk in a time unit of S curve Acc Dec motion The jerk calculation is shown in the following formula Jerk PPS Sec 62 5x109 K xM Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the value of the acceleration rate it s range is 1 65535 Example Set the jerk 625 PPS Sec for the X axis
43. input mode 3 Negative direction DIR Positive Direction Fig A 6 Pulse Direction input mode 4 ICPDAS 89 I 8092F Software User Manual A 2 2 Fixed Pulse Driving When host CPU writes a pulse numbers into I 8092F for fixed pulse driving and configures the performance such as acceleration deceleration and speed 1 8092 will generate the pulses and output them automatically When output pulse numbers are equal to the command pulse numbers 1 8092F stops the output The profile is showing in Fig 7 Concerning the execution of fixed pulse driving in acceleration deceleration it is necessary to set the following parameters Range R Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Deceleration D PPS Sec Output Pulse Numbers P A 2 3 Changing Output Pulse Numbers in Driving The output pulse numbers can be changed in the fixed pulse driving If the command is for increasing the output pulse the pulse output profile is shown as Fig A 8 or A 9 If the command is for decreasing the output pulses the output pulse will be stopped immediately as shown in Fig A 10 Furthermore when in the S curve acceleration deceleration driving mode the output pulse number change will occur to an incomplete deceleration S curve A 2 4 Offset Setting for Acceleration Deceleration Driving The offset function can be used for compensating the pulses when the decelerating speed doesn
44. interpolation To execute the linear interpolation the user can according to the present point coordinates set the finish point coordinates and the interpolation command s as shows in Fig A 22 For individual axis control the command pulse number is unsigned and it is controlled by direction command or direction command For interpolation control the command pulse number is signed The resolution of linear interpolation is within 0 5 LSB We define the longest distance movement in interpolation is the long axis And the other is short axis The long axis outputs an average pulse train The driving pulse of the short axis depends on the long axis and the relationship of the two axes The range for each axis is a 24 bit signed counter from 2 223 When performing the linear interpolation the following parameters should be preset Range R Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Acceleration rate K PPS Sec Manual decelerating Point DP Finish Position FP Y 4 Target Point 3000 MERE 2 0 4000 x Fig A 222 2 axes linear interpolation ICPDAS 103 8092F Software User Manual 4 2 Circular Interpolation 1 8092 can be selected for circular interpolation The circular interpolation is starting from the current position start point After setting the center point of circular the finish position and the CW or CCW direction the user can start the circular interpolat
45. it requires CPU resource to run this function Parameters cardNo nAcc VSV VV VA VD nType J Module number 0 gt a constant speed interpolation Please set VV 1 gt asymmetric T curve interpolation Please set VSV VV VA and VD The starting speed in PPS Interpolation vector speed in PPS Acceleration in PPS Sec Deceleration in PPS Sec Maximum segment 1024 0 1023 It contains the interpolation commands defined as follows 1 2i18092MF LINE 2D BYTE cardNo long fp1 long fp2 2 218092MF ARC CW BYTE cardNo long long cp2 long long 1 2 3 gt i8092MF_ARC_CCW BYTE cardNo long long cp2 long fp7 long fp2 4 2i18092MF CIRCLE CW BYTE cardNo long cpf long cp2 5 2i18092MF CIRCLE CCW BYTE cardNo long cp1 long cp2 7 gt It indicates the end of continuous interpolation 1 1 cp2 fpi I fp2 I Return ICPDAS It contains a list of segment center point data at axis 1 8 388 607 8 388 607 It contains list of segment center point data at axis 2 8 388 607 8 388 607 This array contains a list of segment end point data at axis 1 8 388 607 8 388 607 This array contains a list of segment end point data at axis 2 8 388 607 8 388 607 68 I 8092F Software User Manual YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error NO No errors Example BYTE cardNo 1 select module 1 int
46. level from the Low level ICPDAS 110 8092F Software User Manual A 5 Automatic Home Search Home search is often used when the machine was first opened or the system was occurred the alarm or error signal Both of two above situations user can take the home search motion to let the machine return the operation origin 1 8092 provide the functions that automatically executes a home search sequence such as high speed near home search gt low speed home search encoder Z phase search offset driving without CPU intervention Users should dispose the hardware signals as the same as the below figure The figure shown below illustrates the example of 1 axis driving system 2 axes can be assigned in the same way Encoder StepperServa Limit Home Near Home 45 TTE 1773 7T TNI Limit Cw Pulse CCW Pulse Lmor Counter Acar Seno ON OFF LC AB Z Motor Drivcs MCX312 Servo Ready 1 4 Manual Opcraticn Psitioning Conplction XINPOS VE 9 Alam e XALARIVI EC uBz xecas xin2 c Fig A 29 X axis hardware signal disposition ICPDAS 111 8092F Software User Manual A 6 Interrupt Control A 6 1 Interrupt for Independent axis A 6 2 Interrupt for Interpolation ICPDAS 112 8092F Software User Manual A 7 1 8092 Function Library We develop the simple but powerful high level functions set application programming interface API by using the specific command and data r
47. manual deceleration mode the user can set the bit DO of WR3 register to 1 The decelerating point calculates as Manual Decelerating Point Output Pulse Numbers Pulse Number for Deceleration Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Set the manual deceleration point 8000 for the XY axes motion i8092 SET MANDEC 1 0x3 8000 Note The suitable time for setting manual deceleration point 1 Asymmetry S curve acceleration deceleration 2 Circular interpolation i8092 FDRIVE Format void i8092 DRV FDRIVE unsigned char cardNo WORD axis WORD nDir Function Set fixed pulse drive Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nDir is the direction of the motion nDir 0 positive nDir 1 negative Example Set the negative fixed pulse drive i8092 DRV FDRIVE 1 0x3 1 ICPDAS 140 8092F Software User Manual i8092_ DRV CDRIVE Format void 18092 DRV CDRIVE unsigned char cardNo WORD axis WORD nDir Function Set continuous drive Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nDir is the direction of the motion nDir 0 positive nDir 1 negative Example Set the positive continuous drive 18092 DRV CDRIVE 1 0x3 0 i8092 SET SYMMETRY Format void 18092 SET SYMMETRY unsigned char cardNo WORD axis Functio
48. nEXP signal from a handwheel Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 The axis can be either X and Y data Number of fixed pulses Return None Example i8092MF_EXD_FP 1 AXIS_X 5 Each time the controller detects a falling edge of an XEXP signal it will output 5 pulses to the X axis ee a XPM CEDE SS x is gui Example of fixed pulse driving using an external signal ICPDAS 25 8092F Software User Manual 2 18 3 Continuous Pulse Driving Mode void i8092MF_EXD_CP BYTE cardNo WORD axis long data Description The controller will continuously output pulses in positive direction if the falling edge of nEXP signal from a handwheel is detected Conversely it will continuously output pulses in negative direction if the falling edge of nEXP signal is detected Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 The axis can be either X and Y data Pulse output speed in PPS Return None Example i8092MF_EXD_CP 1 AXIS_X 20 Each time the controller detects a falling edge of an XEXP it will continuously drive X axis at the speed of 20 PPS XEXPP Low period XM L tuwpred XPP UUU aaas XPM Continuous driving using an external signal ICPDAS 26 8092F Software User Manual 2 18 4 Disabling the External Signal Input Functions void i8092MF_EXD_DISABLE BYTE cardNo WORD
49. set get of the logic position counters and the encoder position counters and get the current velocity and acceleration ICPDAS 87 8092F Software User Manual A 2 Pulse Output Command A 2 1 Signal Types 1 8092 has two modes for pulse output command One is fixed pulse command output mode the other is continuous pulse command output mode User can choose the modes by setting the specific registers There are two ways to choose the desired pulse mode a adjusting hardware jumper and b setting registers by software programming The output pulse command modes are showing in Table 2 2 Moreover the detail illustration for the pulse modes are shown in Fig A 1 Fig A 6 Positive direction PULSE nP HIGH DIR nP Negative direction HIGH PULSE nP LILI UU Fig A 1 CW CCW Input mode 1 gt Positive direction PULSE nP LOW DIR nP Negative direction LOW PULSE nP JOU LI Le Fig 2 CW CCW Input mode 2 ICPDAS 88 I 8092F Software User Manual Positive Direction DIR Negative direction Fig A 3 Pulse Direction input mode 1 Positive Direction DIR Negative direction Fig A 4 Pulse Direction input mode 2 PULSE Positive Direction DIR Negative direction Fig A 5 Pulse Direction
50. shows in Table 2 1 data is the value of the pulse it s range is 0 268435455 other values are invalid Example Set the driving pulse number final point 10000 for the X axis i8092 SET PULSE 1 0x1 10000 ICPDAS 138 8092F Software User Manual i8092 SET AO Format void 18092 SET AO unsigned char cardNo WORD axis WORD data Function The function is executing the acceleration counter offset It is often used while the machine is using stepping motor It can avoid the overshoot for high speed deceleration Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the value of the deceleration it s range is 0 65535 Other values are invalid Example i8092 SET AO 1 0 1 200 i8092 SET AUTODEC Format void 18092 SET AUTODEC unsigned char cardNo WORD axis Function Automatic deceleration setting Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Enable the automatic deceleration for 2 axes i8092 SET_AUTODEC 1 Oxf b Note The function is useless in circular interpolation for T curve deceleration ICPDAS 139 8092F Software User Manual i8092 SET MANDEC Format void 18092 SET MANDEC unsigned char cardNo WORD axis WORD dp Function Set the manual deceleration point in fixed pulse acceleration deceleration driving or interpolation motion when the manual deceleration mode is engaged In
51. speed driving the following parameters will be preset accordingly E Range B Initial Speed SV Drive Speed V Just set one of SV and V can be attained the effect B Output Pulse Numbers P Only applicable for the fixed pulse driving Velocity Driving Speed Initial Speed Time Fig A 13 Constant speed driving ICPDAS 93 I 8092F Software User Manual A 3 Profile Acceleration Deceleration Planning According to the motion control we should used acceleration deceleration planning for improving the capability of path planning and reducing the position error The speed driving profile in 1 8092 can be configured as T curve and S curve acceleration deceleration A 3 1 Trapezoidal Driving Symmetric T curve Description The linear acceleration deceleration driving is also called the trapezoidal driving About the correlation parameters are total displacement S start speed SV driving speed V acceleration A By above the parameters we can plan the trapezoidal driving Acceleration equation V SV AxTA 1 1 The time for the end of constant speed 2 1 2 V The time for the start of constant speed V SV A 1 3 TA The T Curve acceleration deceleration planning are shown in Fig A 14 Velocity V SV TA i a dme TM Fig A 14 Symmetric T curve acc dec planning Trapezoidal driving is starting from the initial speed to the designated drive speed The
52. speed will be 200000 8000 25 PPS 2 6 Setting the Active Level of the Hardware Limit Switches void i8092MF SET HLMT BYTE cardNo WORD axis BYTE nFLEdge BYTE nRLEdge Description This function sets the active logic level of the hardware limit switch inputs Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nFLEdge Active level setting for the forward limit switch 0 low active 1 high active nRLEdge Active level setting for the reverse limit switch 0 low active 1 high active Return None Example i8092MF_SET_HLMT 1 0 0 liset all the trigger levels as low active for all limit switches module 1 ICPDAS 14 8092F Software User Manual 2 7 Setting the Motion Stop Method When Limit Switch Is Sensed void i8092MF_LIMITSTOP_MODE BYTE cardNo WORD axis BYTE nMode Description This function sets the motion stop mode of the axes when the corresponding limit switches are detected Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nMode 0 stop immediately 1 decelerating to stop Return None Example i8092MF_LIMITSTOP_MODE 1 AXIS_X 0 I set X axis to stop immediately if any limit switch on X axis is triggered 2 8 Setting the Trigger Level of the NHOME Sensor void i80922MF SET NHOME BYTE cardNo WORD axis BYTE nNHEdge Description This function sets the trigger level of the near home sensor NH
53. t V C TA 0 TA TS t TA 1 10 The constant value C is the slope of the line V 2VS TA 2TS C5 1 11 Boundary condition of the connection for 1 2 5 1 12 We can find that E 1 13 21782 TS x TA 2TS Velocity VS gems quieran Sige ge an bus iv gas ov eee ome TS TS Time TA Fig A 19 Partial S curve planning In case of S curve acceleration deceleration driving the acceleration profile is not linear The ICPDAS 100 1 8092 Software User Manual value of acceleration deceleration is shaped as the trapezoid see Fig A 20 In acceleration there are three regions with different acceleration values At the beginning the acceleration increase linearly from 0 to the specific value A with a specific rate of acceleration K this shows the driving speed increase parabolically in this region Then the driving speed increases in a constant acceleration in region b And in section c the acceleration decelerates linearly to O with the rate of deceleration K So the acceleration of S curve includes regions a b and c In deceleration as same as acceleration the driving speed decelerate parabolically in three regions d e and f Velocity Drive Speed r Time Acceleration Specific value l l l i l l l l l l
54. the Function Velocity Time Fig A 17 Triangle prevention of fixed pulse driving 2 Output pulse number Pa Number of pulses utilized at acceleration Pd Number of pulses utilized at deceleration ICPDAS 98 I 8092F Software User Manual A 3 4 S curve Acceleration Deceleration Symmetry Complete S curve Description The complete S Curve is composed of two two degree velocity curves if we set the time of the acceleration is TA Velocity equation of segment 1 V t Ct t lt TA 2 1 4 Velocity equation of segment 2 V t V C TA 1 t gt TA 2 1 5 Boundary condition V 0 0 V TA 2 V 2 V 0 20 1 6 By the BCs and then we can find that _ 1 7 Velocity V V 2 TA 2 Time TA Fig A 18 Complete S curve acc planning ICPDAS 99 I 8092F Software User Manual Partial S curve Description Partial S curve is composed of three segments 1 2 3 one straight line and two S curve lines S curve is the 1 3 segments for S curve acceleration the straight line is 2 segment for linear acceleration the total motion time is defined TA and the time of the linear acceleration is TA 2x TS However there is the same acceleration value in the join of the three segments Velocity equation of segment 1 C t lt 5 1 8 1 Velocity equation of segment 2 V t C9t TS t TA TS 1 9 Velocity equation of segment 3 V
55. 0 I 8092F will not output any pulse at the time unit For example if the user want to generate the X Y profile see Fig A 27 the host CPU must write a set of pattern into those specific registers XPP the direction register for X axis XPM the direction register for X axis YPP and YPM the and directions registers With in the time unit 1 8092 will check the registers once and decide to output a pulse or not depending on the bit pattern 4 56 48 40 32 24 16 8 0 01000000 00000000 00011111 11011011 11110110 11111110 00000000 00000000 XPP X direction 01111111 11110101 00000000 00000000 00000000 00000000 00101011 11111111 XPM X direction 00000000 00000000 00000000 11111111 00000000 00001111 11111111 11010100 YPP Y direction 00001010 11111111 11111100 00000000 00111111 11000000 00000000 00000000 YPM Y direction Fig A 26 Bit pattern data for X Y profile Stacking counter SC is 2 bit counter Its value is between 0 and 3 which can be read from D14 13 of register RRO SC will decide which register for the data from the host CPU The initial value of SC is 0 So when host CPU writes bit pattern data into BP1P or BP1M the data will be stored in SREG and then SC will count up to 1 and the next data from the host CPU will be written into REG1 By this way the REG2 becomes the register when SC 2 The host CPU is not able to write any bit pattern data into MCX312 w
56. 0 Multiple 10 i8092_ SET SCURVE cardNo 0x3 II Set S Curve Mode i8092 SET ASYMMETRY cardNo 0 3 Set Non Symmetry Mode i8092 SET SV cardNo 0x3 100 SV 100 linitial Speed 21000 PPS i8092 SET V cardNo 0 3 1000 V 1000 Drive Speed 10000 PPS i8092 SET A cardNo 0x3 800 1 A 800 Acceleration 1000K PPS Sec i8092 SET D cardNo 0x3 80 D 80 Decelerationz100K PPS Sec i8092 SET K cardNo 0x3 1250 I K 1250 Jerk 500K PPS Sec 18092 SET L cardNo 0x3 125 II L 125 Decelerating Rate 50K PPS Sec i8092_ SET PULSE cardNo 0x3 50000 X Axis Driving Pulse 50000 i8092_DRV_HOLD card 0x3 Holding for driving starting 18092 DRV FDRIVE cardNo 0x1 1 X Axis Negative Fixed Pulse Drive i8092_DRV_FDRIVE cardNo 0x2 0 II Y Axis Positive Fixed Pulse Drive i8092 START card 0x3 Holding Release Velocity PPS 10000 1000 ommum m Time Sec Jerk 500K Deceleration increase rate 50K ee I i 1000K 100K EE MEE UE ee Time Sec Fig A 41 Asymmetric S curve acc dec ICPDAS 144 8092F Software User Manual A 7 5 Interpolation Functions The below figure is the MCX312 Interpolation functional diagram It consists of same functioned X and Y axes control sections and interpolation counting sections CLK 16MHz Standard Interpol
57. 00000 Multiple 1 i8092 SET SV cardNo Card cardNo plane 50 i8092 SET V cardNo Card cardNo plane 500 i8092 SET A cardNo Card cardNo plane 80 i8092 BP ENABLE cardNo BP Interpolation Enabled i8092 BP LINE2 DEMO cardNo 30 40 Linear DDA Data Stack i8092 BP DISABLE cardNo BP Interpolation disabled 40 T T T T 35 pert E 30 os 25 4 gt 20 i s 15r 4 10 f 4 5 0 1 1 0 5 10 15 20 25 30 Fig A 38 Use linear DDA method for bit pattern interpolation ICPDAS 156 I 8092F Software User Manual Use the linear method set P1 X axis 30 P2 Y axis 40 and the linear DDA data calculated as bellows Table A 7 DDA data for the bit pattern interpolation Index 21 Hex1 Z2 Hex2 X Y Index Z1 Hex1 22 Hex2 X Y 1 0 0 olol 26 0 0 15 20 2 1 1 1 1 27 1 1 16 21 3 0 1 112 28 0 1 16 22 4 1 1 2 3 29 1 1 17 23 5 1 1 3 4 30 1 1 18 24 6 0 0 3 4 31 0 0 18 25 7 1 1 415 32 1 1 19 25 8 0 1 4 6 33 0 1 19 26 9 a 9993 a ee 84 1 1 20 27 10 1 1 6 8 35
58. 12 gt Interrupt occurs when the value of logical real position counter is larger than equal to that of COMP register D13 Interrupt occurs at the start of the constant speed drive during an C END acceleration deceleration driving D14 Interrupt occurs at the end of the constant speed drive during an C STA acceleration deceleration driving D15 D END interrupt occurs when the driving is finished D15 D0 will be set to 0 while resetting http www icpdas com 183 f amp FIRE XB XB v2 0 B 3 Mode Register2 WR2 Each axis is with mode register WR2 The axis specified by NOP command or the condition before decides which axis s register will be written WR2 can be used for setting 1 external limit inputs 2 driving pulse types 3 encoder signal types and 4 the feedback signals from servo drivers H L D15 D14 D13 D12 D11 D10 D9 D8 D7 DS D4 D3 D2 D1 DO INP E INP L ALM E ALM L PIND1 PINDO PINMD DIR L PLS L PLSMD CIMPSL HLMT HLMT LMTMD SLMT SLMT DO Enable disable setting for COMP register which is used as the SLMT direction software limit 1 enable 0 disable Once it is enabled during the direction driving if the value of logical real position counter is larger than that of COMP the decelerating stop will be performed The DO SLMT bit of register RR2 will become 1 Under this situation further written direction driving c
59. 1er i1 ree ree rere terrier 107 A 4 4 Continuous 109 A Automatic Home Search siiveissccsccsssccsssisuenssacpnscdsecusssothecsscadavessninscbouses 111 Interrupt 112 A 6 1 Interrupt for Independent 112 A 6 2 Interrupt for Interpolation 112 A 7 1 8092F Function Library 2 113 A 7 1 Register management 114 A 7 2 Functions for Initial 121 A 7 3 Motion Status Management 127 A 7 4 Basic Motion Command Functions eese 134 A 7 5 Interpolation Functions eese nennt nnn 145 A 7 6 Automatic Home Search 158 AT T Interrupt Function 170 A 7 8 FRnet Related Functions 2 orco cr tentia 177 8 18092 Command Lists sssssessosssssssosossssssssosossossssossssosessssssossesssssssssosssss 179 A 8 1 Data Setting s ssssssssssssennnnnunnnrennnnnnnnnnnnnnnnnnnnnn
60. 2 4 nINPOS nALARM 8 nEXPP nEXPM EXPLSN 16 nIN3 FLn Sets the filter time constant 0 7 as follows Code Removable max noise width Input signal delay time 0 1 75 SEC 2 SEC 1 224 SEC 256 SEC 2 448 SEC 512 u SEC 3 896 SEC 1 024mSEC 4 1 792mSEC 2 048mSEC 5 3 584mSEC 4 096mSEC 6 7 168mSEC 8 192mSEC 7 14 336mSEC 16 384mSEC Return None Example Note ICPDAS i8092MF_SET_FILTER 1 AXIS_ XY 21 3 the filter time constants of X and Y axes as 1 024mSEC These filters include EMG nLMTP nLMTM nINO nIN1 nINPOS nALARM Hand nIN3 21 1 4 16 1 EMG nLMP nLMPM nINO nIN1 II 4 nINPOS nALARM II 16 nIN3 The default wiring design is nINO is connected to the NEAR HOME NHOME sensors nIN1 is connected to the HOME sensors and nIN2 is connected to the index of Encoder input Z phase 21 8092F Software User Manual 2 16 Position Counter Variable Ring void i8092MF_VRING_ENABLE BYTE cardNo WORD axis DWORD nVRing Description This function enables the linear counter of the assigned axes as variable ring counters Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nVRing Maximum value of the ring counter 2 147 483 648 2 147 483 647 Return None Example i8092MF VRING ENABLE 1 AXIS X 9999 set the X axis of module 1 to be a ring counter The encoder Ivalues will be 0 to 9999 1222 The encoder value is 0 to 9999 When the counter va
61. 2 axis Motion Control Module User Manual I 8092F Version 2 3 Macro Function Library in for WinCon and 1 8000 series PAC controllers LTD TMK AT BCD o ICPDAS 1 8092F Software User Manual Warranty All products manufactured by ICPDAS Inc are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICPDAS Inc assumes no liability for damages consequent to the use of this product ICPDAS Inc reserves the right to change this manual at any time without notice The information furnished by ICPDAS Inc is believed to be accurate and reliable However no responsibility is assumed by ICPDAS Inc for its use or for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 1997 2005 by ICPDAS Inc LTD All rights reserved worldwide Trademark The names used for identification only maybe registered trademarks of their respective companies License The user can use modify and backup this software on a single machine The user may not reproduce transfer or distribute this software or any copy in whole or in part ICPDAS 2 8092F Software User Manual I PREPA CE ues ud uou 1 1 T frod ctioli ees ertt eee IRR eue heit eere 7 1 2 Basic and Macro f nctlons eee retener torrente core nu ob cene eeb eeu na nura 7 1 3 Funciton
62. 2 axis linear continuous interpolation 1 end of 2 axis linear continuous interpolation fpt The assigned number of pulses for the axis 1 in Pulses 8 388 607 8 388 607 fp2 The assigned number of pulses for the axis 2 in Pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error NO No errors Example ICPDAS BYTE 1 select module 1 int sv 300 IIstarting speed 300 PPS int v 18000 vector speed 18000 PPS long 500000 acceleration 500000 PPS Sec int loop1 i8092MF SET MAX V cardNo AXIS XY 160000 i8092MF LINE 2D INITIAL cardNo AXIS X AXIS Y sv v for loop1 0 loop1 10000 loop1 i8092MF LINE 2D CONTINUE cardNo 0 100 100 i8092MF LINE 2D CONTINUE cardNo 0 100 100 i8092MF_LINE_2D_CONTINUE cardNo 1 100 100 67 8092F Software User Manual 6 3 3 Multi Segment Continuous Interpolation Using Array e BYTE i8092MF_CONTINUE_INTP BYTE cardNo WORD nAcc DWORD VSV DWORD VV DWORD VA DWORD VD BYTE nType long cp1 long cp2 long long fp2 1 Description This function executes a multi segment continuous interpolation Those segments are stored in arrays declared in the arguments The speed profile can be either a constant speed or a symmetric T curve The deceleration point will be calculated automatically However it is a software macro function therefore
63. 2MF SET V cardNo AXIS XY 2000 liset the speed of all axes on module 1 to 2000 PPS i8092MF SET A cardNo AXIS XY 1000 liset the acceleration of all axes on module 1 to 1000 PPS Sec i8092MF SET D cardNo AXIS XY 500 liset the deceleration of all axes on module 1 to 500 PPS i8092MF SET SV cardNo AXIS 200 liset the start speed of all axes on module 1 to 200 PPS i8092MF SET AO cardNo AXIS XY 9 liset the number of remaining offset pulses to 9 pulses for all axes i8092MF FIXED MOVE cardNo axis 10000 all axes on module 1 for 10000 pulses Note Relevant parameters must be set to achieve the desired motion ICPDAS 43 8092F Software User Manual 6 1 2 Setting the Start Speed void i8092MF_SET_SV BYTE cardNo WORD axis DWORD data Description This function sets the start speed for the assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data The range is the same as for speed and must not be zero or larger than the maximum speed The maximum value is 4 000 000 PPS For interpolation set the speed value for axis1 is enough Return None Example i8092MF SET SV 1 AXIS X 1000 liset the starting speed for the X axis on module 1 to 1000 PPS 6 1 3 Setting the Desired Speed void i8092MF SET V BYTE cardNo WORD axis DWORD data Description This function sets the desired speed for the assigned axes Parameters cardNo Module num
64. 30 I 8092F Software User Manual 3 3 Reading the Current Velocity DWORD i8092MF GET CV BYTE cardNo WORD axis Description This function reads the current velocity value Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y Return Current speed in PPS Example DWORD dwdata dwdata 8092 GET CV 1 AXIS X lreads the current velocity of the X axis on module 1 3 4 Reading the Current Acceleration DWORD i8092MF GET CA BYTE cardNo WORD axis Description This function reads the current acceleration value Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y Return Current acceleration in PPS Sec Example DWORD dwdata dwdata 8092 GET CA 1 AXIS X lreads the current acceleration value of the X axis on module 1 ICPDAS 31 8092F Software User Manual 3 5 Reading the DI Status e BYTE i8092MF GET DI BYTE cardNo WORD axis WORD nType Description This function reads the digital input DI status Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y nType 0 gt DRIVING Check whether the axis is driving or not 1 gt LIMIT Check whether the limit is engaged or not 2 gt LIMIT Check whether the limit is engaged or not 3 gt EMERGENCY Check whether EMG signal is on or not 4 gt ALARM Check the ALARM input s
65. 4 Motion Status Management Functions Function Name Description i8092_SET_LP The logic position counter setting i8092_ SET EP The Real position counter setting i8092 GET LP The logic position counter setting 18092 GET EP Read the Real position counter ij8092 GET CV Read the current driving speed 18092 GET CA Read the current acceleration deceleration 18092 SET CP Setting the positive direction software limit i8092 SET CM Setting the negative direction software limit 18092 VRING ENABLE Setting the position counter variable ring 18092 VRING DISABLE Disable the position counter variable ring 18092 AVTRI ENABLE Setting Triangle prevention of fixed pulse driving 18092 AVTRI DISABLE Disable Triangle prevention of fixed pulse driving ICPDAS 127 8092F Software User Manual PPIN ECB PMIN Read Write Rea Wave 32 bit Transformation Compare RR1 DO P COMP COMP Register 32 bit Compare uw P COMP COMP Register 32 bit Motion Range Software Limit COMP COMP Fig A 29 Management for Position Register and Software Limit i8092 SET LP Format void i8092 SET LP unsigned char CardNo WORD axis long dwdata Function Set the logic position counter it can be set zero to reset the counter values Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 only set for single axi
66. 6Data i8092_GET_EM6 1 0 1 i8092 GET EM7 Format WORD i8092 GET 7 cardNo WORD axis Function Get the data of EMT Parameters cardNo board number axis axis or axes Please refer to Table 2 1 Example get the EM7 value of the X axis on card 1 WORD em 7Data em7Data 18092 GET EMT 1 0 1 ICPDAS 159 I 8092F Software User Manual i8092_INO_LEVEL Format void 18092 INO LEVEL unsigned char cardNo WORD axis WORD nLevel Function Set the logic level of the INO signal Parameters cardNo is the board number axis is the motion axis code name as shows in mm 2 1 nLevel is the setting the active level of home signal IN1 nLevel 0 Low active nLevel 1 Hi active Example i8092 INO LEVEL 1 Oxf 0 8092_IN1_LEVEL Format void i8092_IN1_LEVEL unsigned char cardNo WORD axis WORD nLevel Function Set the logic level of the IN1 signal Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nLevel is setting the active level of the near home signal INO nLevel 0 Low active nLevel 1 Hi active Example i8092_IN1_LEVEL 1 Oxf 0 ICPDAS 160 8092F Software User Manual i8092 IN2 LEVEL Format void 18092 IN2 LEVEL unsigned char cardNo WORD axis WORD nLevel Function Set the logic level of the IN2 signal Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nLevel is the set
67. 92F Software User Manual 2 14 Setting the Active Level of the In Position Signals void i8092MF_SET_INPOS BYTE cardNo WORD axis BYTE nMode BYTE nlEdge Description This function sets the INPOS input signal related parameters Note Sometimes this signal is used to connect the SERVO READY input signal Users should take care of what signal the daughter board is wired Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nMode Mode 0 disable INPOS input 1 enable INPOS input nlEdge Set the trigger level 0 low active 1 high active Return None Example i8092MF_SET_INPOS 1 AXIS_X 1 0 lenable the INPOS function of the X axis on module 1 and set it to be low active Note Please refer to the example shown in Fig 2 12 for wiring of the general DI input 2 15 Setting the Time Constant of the Digital Filter void i8092MF SET FILTER BYTE cardNo WORD axis WORD FEn WORD FLn Description This function selects the axes and sets the time constant for digital filters of the input signals Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 FEn Enabled filters The sum of the code numbers 0 31 are used to select input signals Please refer to the following table ICPDAS 20 8092F Software User Manual Code number Enabling filters 1 EMG nLMTP nLMTM nINO nIN1 2 nIN
68. CPDAS 165 8092F Software User Manual i8092 HOME MODE Format void i 8092 HOME MObDE unsigned char cardNo WORD axis WORD Hometype Function Home search demo function Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 HomeType is one of the 8 combination cases of various homing steps 8 cases are defined in the following table Table A 9 Signals for home search types Home Type Comment 0 Dir hardware signal used home near home limit 1 Dir hardware signal used home near home limit 2 Dir hardware signal used home limit step1 disabled 3 Dir hardware signal used home limit step1 disabled 4 Dir hardware signal used home near home limit encoder Z 5 Dir hardware signal used home near home limit encoder Z 6 Dir hardware signal used home limit encoder Z 7 Dir hardware used home limite encoder Z Example Set the type 0 of the home search for all axes 18092 HOME 1 Oxf 0 Start the home search motion i8092 HOME START 1 Oxf ICPDAS 166 8092F Software User Manual B Example of home search using a near home INO home signal IN1 and Z phase signal B Operation Input signal and logical level Search direction Search speed Step 1 Near home signal INO is active low 20000 PPS Step 2 Home signal IN1 is active low 500 PPS Step 3 Z phase s
69. DE cardNo ActiveAxis 0x0 0x0010 1 Direction continuous drive for the active axis i8092 COMMAND cardNo ActiveAxis 0x21 ICPDAS 173 1 8092F Software User Manual Velocity PPS The X axis is passing through 10000 Enabled the provocative factor P lt C Stop Y axis dir fixed pulse drive 3000 r X Axis s Motion Y Axis s Motion 100 Time Fig A 43 Synchronous action example 2 ICPDAS 174 8092F Software User Manual Demo Program Advanced application for synchronous motion X Y axes circular interpolation Z axis fixed pulse drive Parameters cardNo 1 tempSV 100 initial speed for XY circular interpolation tempV 2000 Drive speed for XY circular interpolation tempA 80 The acceleration for XY interpolation tempVZ 687 The constant speed for Z axis tempDP 13963 Deceleration point for XY circular interpolation Description Set the inclined plane is X Y axes and the vertical plane is Z axis And the radius of the circle is 5000 and the angle of inclination is 30 II Set parameters s for total axes or you can also set for individual axis i8092 SET SV cardNo TotalAxis tempSV 18092 SET V cardNo TotalAxis tempV i8092 SET A cardNo TotalAxis tempA Select the master axis 18092 AXIS ASSIGN cardNo AXIS X AXIS Y 0 Acc mode setting i8092_MOTION_TYPE cardNo ACCMODE II T curve acc mode setting i8092 SET TCURVE cardNo Card cardNo plane Deceleration enabled ij8092 DEC
70. Example i8092 BP LINE2D DEMOY 1 30 40 According to the below flow chart user can use linear interpolation DDA algorithm to produce the BP data However L JP p P4 P2 are the pulse number of each axis ICPDAS 154 8092F Software User Manual BP LINE2D DEMO cardNo p1 p2 qi D q pi Hex data Pulse output to X axis BP1 Register Binary data Start BP interpolation for x axis BP data stack gnit Y qnG L Start BP interpolation for axis Pulse output to Y axis BP2 ow Binary data Register Hex data cod Fig A 37 Bit pattern interpolation by using the linear DDA method Note The following bit pattern demo program is only valid in 1 8000 User use the polling method to implement the bit pattern by calling the i8092 BP LINE2 DEMO function and use interrupt method to implement by calling the i8092 BP LINE DEMO function ICPDAS 155 I 8092F Software User Manual Demo Program Bit pattern interpolation by using the linear data Parameters cardNo 1 master 0 1 AXIS X 2 0 2 AXIS Y P1 30 P2 40 i8092_ AXIS ASSIGN cardNo 0x1 0 2 0 18092 MOTION TYPE cardNo ACCMODE 18092 SET AUTODEC cardNo Card cardNo plane Auto Deceleration Enabled i8092 SET TCURVE cardNo Card cardNo plane II Set T Curve Mode i8092 SET R cardNo Card cardNo plane 80
71. LP counters on module 1 will be cleared long i8092MF_GET_LP BYTE cardNo WORD axis Description This function reads the command position counter value logical position counter LP Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y Return The current LP value 2 147 483 648 2 147 483 647 Example long X_LP X_LP i8092MF_GET_LP 1 Reads the LP value of the X axis module 1 ICPDAS 29 8092F Software User Manual 3 2 Setting and Reading the Encoder Counter void i8092MF_SET_EP BYTE cardNo WORD axis long wdata Description This function sets the encoder position counter value real position counter or EP Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 wdata Position command 2 147 483 648 2 147 483 647 Return None Example i8092MF_SET_EP 1 AXIS XY 0 Set the EP for the X Y Z and U axes of module 1 as 0 This command clears all EP counters on module 1 long i8092MF GET EP BYTE cardNo WORD axis Description This function reads the encoder position counter value EP Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y Return Current EP value 2 147 483 648 2 147 483 647 Example long X EP X EP i8092MF_GET_EP 1 AXIS X the encoder value EP of the X axis on module 1 ICPDAS
72. OME Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nNHEdge Active level setting for the near home sensor 0 low active 1 high active Return None Example i8092MF SET NHOME 1 AXIS XY 0 liset the trigger level of NHOME of X and Y axes on module 1 to be active low ICPDAS 15 8092F Software User Manual 2 9 Setting Trigger Level of the Home sensor void i8092MF_SET_HOME_EDGE BYTE cardNo WORD axis BYTE nHEdge Description This function sets the trigger level of the home sensor HOME Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nHEdge Active level setting for the home sensor 0 low active 1 high active Return None Example i8092MF_SET_HOME_EDGE 1 AXIS_ XY 1 liset the trigger level as high active for all home sensors on module 1 2 10 Setting and Clearing the Software Limits void i8092MF_SET_SLMT BYTE cardNo WORD axis long dwFL long dwRL BYTE nType Description This function sets the software limits Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 dwFL Value of the forward software limit 2 147 483 648 2 147 483 647 dwAL Value of the reverse software limit 2 147 483 648 2 147 483 647 nType Position counter to be compared 0 logical position counter LP i e the command position 1 encoder position counter EP i e the real position Return None ICPDAS 16
73. ORD axis WORD nMode Function The function can set the output pulse modes and explain in Sec 1 1 Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nMode is the value 0 3 as shows in the following table ee Waveform of input pulse Mode Value Direction APP PULSE APM DIR CW 0 PULSE LOW CCW 1 LOW PULSE 2 PULSE LOW PULSE 3 PULSE HIGH DIR 4 PULSE LOW 5 PULSE HIGH Example It sets that choosing all axes with CW CCW Dir mode 18092 SET PULSE 1 Oxf 2 i8092 SET Format void 18092 SET R unsigned char cardNo WORD axis DWORD data Function R means Range is the parameter determining the multiple of drive speed acceleration deceleration and jerk The calculation of the multiple is shown in the following formula Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example i8092 SET 1 Oxf 8000000 Note If the maximum value of parameter for setting the drive speed V is 8000 and the drive speed is set 4OKPPS The user can set V 8000 and R 1600000 Because 40K is 5 times of 8000 we set the R 8000000 5 1600000 i8092 GET Format DWORD i8092 GET R unsigned char cardNo WORD axis Function Get the range value from the global variable Parameters cardNo is the board number
74. RD nType Function Set the operation of step 3 when the home signal and the encoder z phase signal become active Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nType 0 disable nType 1 enable Example Disable the SAND WR7 D9 condition i8092_HOME_SAND 1 Oxf 0 i8092 HOME LIMIT Format void 18092 HOME LIMIT unsigned char cardNo WORD axis WORD nType Function Set the home search using an overrun limit signal Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nType 0 disable nType 1 enable Example Disable the LIMIT WR7 D10 condition i8092 HOME LIMIT 1 Oxf 0 ICPDAS 164 8092F Software User Manual 18092 HOME _PCLR Format void 18092 HOME PCLR unsigned char cardNo WORD axis WORD nType Function Clear the logic position and real position counter at termination home search Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nType 0 disable nType 1 enable Example Enable the PCLR WR7 D8 condition i8092 HOME PCLR 1 Oxf 0 18092 HOME START Format void 18092 HOME START unsigned char cardNo WORD axis Function Start execution of automatic home search Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Start home search operation 18092 HOME START 1 Oxf I
75. Table 2 1 Example i8092 DRV_HOLD 1 Oxf ICPDAS 142 8092F Software User Manual 8092 START Format void 18092 DRV START unsigned char cardNo WORD axis Function Drive status holding release finishing status clearing setting Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example i8092_DRV_SATRT 1 Oxf Demo Program T S curve acc dec motion Symmetry Parameters cardNo 1 motion axes 0x3 AXIS_XY i8092_SET_R cardNo 0x3 800000 R 800000 Multiple 10 i8092_SET_TCURVE cardNo 0x3 II Set T Curve Mode i8092_ SET SYMMETRY cardNo 0x3 Set symmetry mode for X Y axes i8092 SET SV cardNo 0x3 100 SV 100 linitial Speed 21000 PPS i8092 SET V cardNo 0 3 1000 V 1000 Drive Speed 10000 PPS i8092_SET_A cardNo 0x3 80 II A 80 Accelerationz 100K PPS Sec i8092 SET PULSE cardNo 0x3 25000 Driving Pulse 25000 i8092 DRV HOLD card 0x3 Holding for driving starting i8092 DRV FDRIVE cardNo 0x3 0 II X Axis Positive Fixed Pulse Drive 18092 START card 0x3 Holding Release Velocity PPS Acceleration 100K PPS Sec 10000 Output Pulse 25000 1000 TA 0 09 Time Sec Fig A 31 Symmetry T curve acc dec ICPDAS 143 8092F Software User Manual Demo Program T S curve acc dec motion Asymmetry Parameters cardNo 1 motion axes 0x3 AXIS_XY i8092 SET R cardNo 0x3 8000000 R 80000
76. User Manual 4 2 Write data to FRnet DO void i8092MF_FRNET_OUT BYTE cardNo WORD wSA WORD data Description This function write data to the FRnet digital output SA means the Sending Address which can be one of the legal group number of FRnet One group comprises 16 bits data Therefore total 128 DO can be defined for one FRnet interface Parameters cardNo Module number WSA Group number range 0 7 Note 8 15 are used by digital inputs data 16 bit data Return None Example i8092MF_FRNET_OUT 1 0 0xffff IWrite Oxffff to the 16 bit DO which is on module 1 and the group number is 0 ICPDAS 37 8092F Software User Manual 5 Auto Homing The 1 8092F module provides an automatic homing function After setting the appropriate parameters the assigned axes are able to perform automatic homing Settings are required to be made in four steps for performing the automatic HOME search Search for the near home sensor NHOME at a normal speed V Search for the HOME sensor at low speed HV Search for the Encoder Z phase index at low speed HV Move a specified number of offset pulses to the predefined origin point at normal speed V Some steps can be omitted A detailed description of the related functions is provided in the following sections Fully automated homing can reduce both programming time and CPU processing time 5 1 Setting the Homing Speed void i8092MF SET HV BYTE cardNo WORD axis DWORD dat
77. Y axes use sub chip Only X axis http www icpdas com 189 f amp IRE AS XE v2 0 When it is 1 the external MPLS controlled single step pag EXPLS interpolation mode is engaged D13 When it is 1 the command controlled single step interpolation CMPLS mode is engaged D14 Interrupt enable disable setting during interpolation 0 disable CIINT 1 enable Interrupt enable disable setting during bit pattern interpolation D15 BPINT 0 disable 1 enable B 7 Data Register WR6 WR7 Data registers are used for setting the written command data The low word data writing 16 bit WD15 WDO is for register RR6 setting and the high word data writing 16 bit WD31 WD16 is for register RR7 setting WR6 H D15 D14 D13 D12 D11 D1O D9 D8 WD15 WD14 WD13 WD12 VVD11 VVDIO VvD9 WD8 WR7 H D15 D1i4 013 012 D11 D1O D9 D8 VWVD31 VVD30 VvD29 VVD28 VVD27 WD26 VVD25 VVD24 L D7 D6 D5 D4 D3 D2 D1 DO WD7 WD6 VWD5 WD4 WDS WD2 WD1 L D7 DS D4 D3 D2 D1 DO WD23 VD22 WD21 WD20 WD19 WD18 WD17 WD16 The user can write command data with a designated data length into the write register It does not matter to write WR6 or WR7 first when 8 bit data bus is used the registers WR6L WR6H WR7L WR7H The written data is binary formatted 2 complement is for negatives For com
78. a Description This function sets the homing speed Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data Homing speed in PPS Return None EXAMPLE i8092MF SET HV 1 AXIS X 500 liset the homing speed of the X axis on module 1 to 500 PPS ICPDAS 38 I 8092F Software User Manual 5 2 Using an Limit Switch as the HOME sensor void i8092MF_HOME _LIMIT BYTE cardNo WORD axis WORD nType Description This function sets the Limit Switch to be used as the HOME sensor Parameters cardNo Module number axis Axis axes Please refer to Table 2 1 nType 0 Does not use the LIMIT SWITCH as the HOME sensor 1 Use the LIMIT SWITCH as the HOME sensor Return None EXAMPLE i8092MF_HOME_LIMIT 1 AXIS X 0 Do not use the Limit Switch as the HOME sensor 5 3 Setting the Homing Mode void i8092MF SET HOME MODE BYTE cardNo WORD axis WORD nStep1 WORD nStep2 WORD nStep3 WORD nStep4 long data Description This function sets the homing method and other related parameters Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nStept 0 Step 1 is not executed 1 Moves in a positive direction 2 Moves in a negative direction nStep2 0 Step 2 is not executed 1 Moves in a positive direction 2 Moves in a negative direction nStep3 0 Step 3 is not executed 1 Moves in a positive direction ICPDAS 39 I 8092F Software User Manual 2 Moves in
79. ardNo long fp1 long fp2 2 18092 ARC CW BYTE cardNo long cp1 long cp2 long fp7 long fp2 3 gt i8092MF_ARC_CCW BYTE cardNo long long cp2 long fp7 long fp2 4 2i18092MF CIRCLE CW BYTE cardNo long cp7 long cp2 5 218092MF CIRCLE CCW BYTE cardNo long cp1 long cp2 2 fpt fp2 YES NO It assigns the center point data at X axis 8 388 607 8 388 607 It assigns the center point data at Y axis 8 388 607 8 388 607 It assigns the end point data at X axis 8 388 607 8 388 607 It assigns the end point data at Y axis 8 388 607 8 388 607 An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error No errors BYTE cardNo 1 select module 1 int sv 300 int v 18000 starting speed 300 PPS vector speed 18000 PPS long a 500000 acceleration 500000 PPS Sec unsigned short loop1 i8092MF_SET_MAX_V cardNo AXIS_XY 160000 72 8092F Software User Manual i8092MF_MIX_2D_INITIAL cardNo 1 sv v a for loop1 0 loop1 lt 10000 loop1 i8092MF_MIX_2D_CONTINUE cardNo 0 1 0 1 0 100 100 i8092MF MIX 2D CONTINUE cardNo 0 2 100 00 0 100 100 i8092MF_MIX_2D_CONTINUE cardNo 1 4 100 100 0 0 ICPDAS 73 8092F Software User Manual 6 4 Set the Interrupt Factors 6 4 1 Set the Interrupt Factors void i8092MF_INTFACTOR_ENABLE BYTE cardNo WORD axis WORD nINT Description This fun
80. are outputting the bit is 1 D9 CNEXT Displaying the possibility of continuous interpolation data writing When the bit is 1 it is ready for inputting parameters for next node and also ready for writing interpolation command data D12 10 ZONEm Displaying the quadrant of the current position in circular interpolation D12 D11 p10 Quadrant 0 lo 0 0 1 1 0 1 0 12 0 1 1 13 1 0 4 1 1 5 1 1 lo 6 1 1 1 7 D14 13 BPSC1 0 In bit pattern interpolation driving it displays the value of the stack counter SC D14 D13 Stack Counter SC Value 0 0 0 0 1 1 1 0 2 1 1 3 In bit pattern interpolation driving when SC 3 it shows the stack is full When SC 2 there is one word 16 bit space for each axis When SC 1 there is a 2 word 16 bit x 2 for each axis When SC 0 it shows all the stacks are empty and the bit pattern interpolation is finished B 9 Status Register 1 RR1 Each axis is with status register 1 The axis specified by NOP command or the condition before decides which axis s register will be read The register can display the comparison result between logical real position counter and COMP the acceleration status of acceleration deceleration driving jerk of S curve acceleration deceleration and the status of driving finishing http www icpdas com 191 XXE v2 0 H L D15 D14 013 012 D11 D10 D9 D8 D7 D6 DS D4 D3 D2 D1 EMG ALARM LMT LMT
81. ata Description This function sets the deceleration value for the interpolation motion Parameters cardNo Module number data The vector deceleration value in PPS Sec This value is related to the maximum speed value defined by i8092MF SET MAX V function The maximum available deceleration value is MAX V 125 The minimum deceleration value is MAX V 64 and all other deceleration values are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor Return None Example i8092MF SET MAX V 1 AXIS X 20000 liset the maximum speed value of the X axis as 20 000 PPS I therefore do not set any deceleration value that is larger than 20 000 125 PPS sec And 20 000 125 2 500 000 i8092MF_SET_VD 1 100000 liset the vector deceleration value of interpolation motion module 1 to 100K PPS Sec ICPDAS 57 8092F Software User Manual 6 2 6 Setting the Vector Acceleration Rate void i8092MF_SET_VK BYTE cardNo DWORD data Description Set the acceleration rate jerk value for interpolation motion Parameters cardNo Module number data The acceleration rate jerk value The units are PPS Sec This value is related to the maximum speed value defined by 8092 SET MAX V function The maximum available acceleration rate value is MAX V 781 25 The minimum acceleration value is MAX V 0 0119211 and all other acceleration val
82. ation ANT Interrupt INTN Generator Control Section AX1P AX1P AX2P AX2P Linear Interpolation AX1P AX1P AX2P Circle Interpolation Pulse Separate Bit Interpolation X axis control section X axis axis control section Y axis 1 0 Fig A 32 MCX312 Functional Block Diagram Table A 6 Interpolation Functions Function Name Description i8092 MOTION TYPE 2 or 3 axes constant vector speed setting i8092 SET FINISH Interpolation s finish point setting 18092 LINE2D 2 axes linear interpolation mode 18092 SET CENTER Circular interpolation s center setting 18092 CW direction arc interpolation mode i8092_ARC_CCW CCW direction arc interpolation mode i8092 CIRCLE CW CW direction circle interpolation mode i8092 CIRCLE CCW CCW direction circle interpolation mode i8092 NEXT WAIT Wait for next interpolation command i8092 BP ENABLE Bit pattern interpolation enabled i8092 BP DISABLE Bit pattern interpolation disabled i8092 BP CLEAR Bit pattern interpolation cleared i8092 BP STACK Bit pattern data stack 8092 BP WAIT Wait for bit pattern data write ICPDAS 145 8092F Software User Manual i8092 MOTION TYPE Format void 18092 MOTION TYPE unsigned char CardNo WORD type Function S
83. ation is commanded the bits of the assigned axis axes should be set 0 D15 RESET IC command resetting When this bit is set to 1 but others are 0 the IC will be reset after command writing After command writing the BUSYN signal will be on the Low level within 875 nSEC When CLK 16 MHz maximum When 8 bit data bus is used the reset is activated when the command 80h is written to register WROH RESET bit should be set to 0 when the other commands are written B 2 Mode Register1 WR1 Each axis is with mode register WR1 The axis specified by NOP command or the condition before decides which axis s register will be written The register consists of the bit for setting enable disable and enable logical levels of input signal STOP2 STOPO decelerating stop sudden stop during the driving and bit for occurring the interrupt enable disable Once SP2 SP0 are active when the fixed continuous driving starts and also when STOP signal becomes the setting logical level the decelerating stop will be performed during the acceleration deceleration driving and the sudden stop will be performed during the constant speed driving WR1 D15 Di4 D13 D12 D11 D10 Dg Da D7 De D5 D4 D3 D2 D1 DO Interrupt Enable Disable Driving Stop Input Signal D5 3 1 SPm E The bit for setting enable disable of driving stop input signal STOPm 0 disable 1 enable The bit for setting enable logical levels for input signal STOPm 0 stop o
84. attern interpolation mode will be finished and stopped if the host CPU write 1 into both and directions buffer registers When the ending code is executed the SC will become 0 automatically 2 The host CPU stops writing any command into 1 8092 When SC 0 and when no other data is updated I 8092F will stop outputting pulse Then the bit pattern interpolation is finished B Utilizing the stop command to pause the interpolation The interpolation driving will be paused if a sudden stop or decelerating stop command is written into the master axis ax1 which is executing the bit pattern interpolation 1 8092 will continue the bit pattern interpolation if the host CPU enables the bit pattern interpolation again If the host CPU wants to finish the interpolation after writing stop command all of the interpolation bit data in the buffer must be cleared in using BP register ICPDAS 108 I 8092F Software User Manual A 4 4 Continuous Interpolation The continuous interpolation is executing a series of interpolation processes such as linear interpolation circular interpolation linear interpolation During the continuous interpolation the driving will not stop contrarily The pulses are output continuously When executing the continuous interpolation the host CPU has to write the next interpolation command into MCX312 before the previous interpolation command is finished Polling If D9 CNEXT of register RRO is 1 MCX312 is read
85. axis long dwdata Function Set the COMP registers value to be the positive direction software limit Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 dwdata is the register value Data range 2 2 Example Set the positive direction software limit to be 100000 for the X Y axes 18092 SET COMPP 1 0x3 100000 Set the positive direction software limit to be 100000 for the X Y axes 18092 SET COMPM 1 0x3 100000 ICPDAS 131 8092F Software User Manual i8092_VRING_ENABLE i8092_VRING_DISABLE Format void 18092 VRING ENABLE unsigned char cardNo WORD axis DWORD nVRing void i8092 VRING DISABLE unsigned char cardNo WORD axis Function Enable disable the setting of any value as the maximum value This function is useful for managing the position of the axis in circular motions that return to the home position after one rotation rather than linear motions Parameter cardNo is the board number axis is the motion axis code name as shows in Table 2 1 nVRing is the value of the COMP COMP registers Data range 2 2 Example For instance set as follows for a rotation axis that rotates one cycle with 10000 pulses To enable the position variable ring function And set 9999 in Ithe COMP registers as the maximum value of the logical position counter i8092_VRING_ENABLE 1 Oxf 1 9999 999 0 1 9998 s 5000 Fig A 30 Opera
86. be cleared to 0 and the interrupt signal will return to the non active level For a 8 bit data bus all the bits are cleared when the RR3L register is read http www icpdas com 194 5 v2 0 B 12 Input Register RR4 RR5 RR4 and RR5 are used for displaying the input signal status The bit is 0 if the input is on the Low level the bit is 1 if the input is on the Hi level These input signals can be used as general input signal when they are not used as function except for nLMTP M signal RR4 L H D15 D14 013 D12 011 D10 Dg D8 D7 DS D4 D3 D2 D1 DO XLM XINS XIN4 XING XIN2 XIN1 XINO X ALM X INP X EX X EX ENG XST2 XST1 XSTO RR5 D15 D14 D13 p12 D11 D1O D9 D8 D7 05 D4 D3 D2 D1 DO YLM 1 135 YIN4 FY INS YIN2 INT INO ALM Y INP Y ST2 Y ST1 Y STO Bit Input Bit Input Name Signal Name Signal n STO n STOPO n INO nINO n ST1 n STOP1 n IN1 nIN1 n ST2 n STOP2 n IN2 nIN2 EMG EMGN n IN3 nIN3 n EX nEXPP n IN4 nIN4 n EX nEXPM n IN5 nIN5 n INP nINPOS n LM nLMTP n ALM nALARM n LM nLMTM B 13 Data Read Register RR6 7 According to the data read command the data of internal registers will be set into registers RR6 and RR7 The low word 16 bits D15 DO is set in RR6 register and the high word 16 bits D31 D16 is set in RR7 register for data
87. ber axis Axis or axes Please refer to Table 2 1 data The range is the same as for speed and must not be zero or larger than the maximum speed The maximum value is 4 000 000 PPS For interpolation set the speed value for axis1 is enough Return None Example i8092MF SET V 1 AXIS X 120000 liset the speed for the X axis on module 1 to 120000 PPS ICPDAS 44 8092F Software User Manual 6 1 4 Setting the Acceleration void i8092MF_SET_A BYTE cardNo WORD axis DWORD data Description This function sets the acceleration value for the assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data The acceleration value The units are PPS Sec This value is related to the maximum speed value defined by i8092MF_SET_MAX_V function The maximum available acceleration value is MAX V 125 The minimum acceleration value is MAX V 64 and all other acceleration values are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor Return None Example i8092MF SET MAX V 1 AXIS X 20000 liset the maximum speed value of the X axis as 20 000 PPS therefore do not set any acceleration value that is larger than 1 20 000 125 PPS sec 20 000 125 2 500 000 i8092MF_SET_A 1 AXIS X 100000 liset the acceleration value of the X axis on module 1 to 100K PPS Sec 6 1 5 Setting the Deceleration void
88. cified by NOP command or the condition before decides which axis s register will be read This register is for reflecting the interrupt factor When interrupt happens the bit with the interrupt factor becomes 1 The user should set the interrupt factor through register WR1 to perform the interrupt To generate an interrupt interrupt enable must be set for each factor in the WR1 register RR3 H E D15 D14 D13 D12 011 D1O D9 D8 D7 D6 DS D4 D3 D2 D1 D END C STA C END 2 P C PZC D1 gt C Once the value of logical real position counter is larger than that of COMP register D2 P lt C Once the value of logical real position counter is smaller than that of COMP register D3 P C Once the value of logical real position counter is smaller than that of COMP register D4 P 2 C Once the value of logical real position counter is larger than that of COMP register 05 C END When the pulse output is finished in the constant speed drive during an acceleration deceleration driving D6 C STA When the pulse output is started in the constant speed drive during an acceleration deceleration driving D7 D END When the driving is finished When one of the interrupt factors occurs an interrupt the bit of the register becomes 1 and the interrupt output signal INTN will become the Low level The host CPU will read register RR3 of the interrupted axis the bit of RR3 will
89. counter is larger than that of COMP register Interrupt occurs at the end of the constant 0x010 gt 0 020 C END speed drive or completion of Acceleration Offset Pulse output Interrupt occurs at the start of the constant 0x040 C STA speed drive or begin of Acceleration Offset Pulse output 0x080 D END Interrupt occurs when the driving is finished Example i8092MF_GET_RR3 cardNo AXIS_X IIread the Interrupt status of AXIS X ICPDAS 77 8092F Software User Manual 6 5 Other functions 6 5 1 Holding the Driving Command void i8092MF_DRV_HOLD BYTE cardNo WORD axis Description This command is usually used when users desire to starti multi axis driving simultaneously When this command is issued users may write other driving commands to the control card All the driving commands will be held after i8092MF_DRV_HOLD is issued and these commands will be started once the i8092MF_DRV_START is issued However if in driving this command will not cause the driving to be stopped But the next command will be held Parameters cardNo Module number axis Axis or Axes Please refer to Table 2 1 for the axis definition Return None Example Please refer to the example in section 6 5 2 6 5 2 Release the Holding Status and Start the Driving void i8092MF_DRV_START BYTE cardNo WORD axis ICPDAS 78 8092F Software User Manual Description This command releases the holdi
90. ction sets the interrupt factors Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nINT Interrupt factors Value Symbol Statement Interrupt occurs when the value of logical real position counter is larger than or equal to that of 1 gt register The COMP must be pre configired with i8092MF_SET_COMPARE please refer to Section 6 5 7 Interrupt occurs when the value of logical real position counter is smaller than that of COMP 2 P lt C register The COMP must be pre configired with i8092MF_SET_COMPARE please refer to Section 6 5 7 Interrupt occurs when the value of logical real position counter is smaller than that of COMP 3 P gt C register The COMP must be pre configired with i8092MF_SET_COMPARE please refer to Section 6 5 7 Interrupt occurs when the value of logical real position counter is larger than or equal to that 4 P lt C of COMP register The COMP must be pre configired with i8092MF_SET_COMPARE please refer to Section 6 5 7 Interrupt occurs at the end of the constant speed 5 C END drive or completion of Acceleration Offset Pulse output Interrupt occurs at the start of the constant speed drive or begin of Acceleration Offset Pulse output 7 D END Interrupt occurs when the driving is finished 6 C STA Return None ICPDAS 74 8092F Software User Manual Example ICPDAS HANDLE hiNT Int
91. d 55 6er rtetee res rero anon 88 2 1 Signal TYPeS c 88 2 2 Fixed Pulse Driving ssascasciievesdencsnenstiwonrivens ma 90 2 3 Changing Output Pulse Numbers in Driving eene 90 A 2 4 Offset Setting for Acceleration Deceleration Driving 90 A 2 5 Continuous Drive Pulse 92 A 2 6 Constant Speed 93 Profile Acceleration Deceleration Planning 94 A 3 1 Trapezoidal Driving 94 A 3 2 Trapezoidal Driving Asymmetric sess sesuss 96 A 3 3 Triangle Prevention 2 2 2 eon o oru en oec cora epa rene 98 A 3 4 S curve Acceleration Deceleration Symmetry 99 A 4 Pulse Output Commands 2 ee iuu o eoo necp cuota nece ero eo oe eo eie 103 A 4 1 2 Axes InterpolatiOn 7e 1e1eei ei cce uoce iiu ucro race tote Ere te Ru Ee ceo tes 103 A 4 2 Circular Interpolation 104 A 4 3 Bit Pattern Interpolation 1 1
92. d 18092 SET WR5 unsigned char cardNo WORD data Function Set the interpolation register WR5 Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 data is the 32 bit hexadecimal value setting in the WR5 register Example Set the x y axes of constant vector speed mode i8092 SET WR5 1 Oxf 0x0300 i8092 GET RRO Format void 18092 GET RRO unsigned char cardNo WORD axis Function Get the main status register RRO Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 Example Get the x axis main status register i8092 GET RRO 1 0 1 ICPDAS 117 8092F Software User Manual i8092 GET RR1 Format void 18092 GET RR1 unsigned char cardNo WORD axis Function Get the main status register RR1 Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 Example Get the x axis status register 1 i8092 GET RR1 1 0x1 i8092 RR2 Format void 18092 GET RR2 unsigned char cardNo WORD axis Function Get the main status register RR2 Parameters cardNo is the board number axis is the motion axes as shows in Table 2 1 Example Get the x axis status register 2 i8092 GET 2 1 0 1 ICPDAS 118 8092F Software User Manual i8092_GET_RR3 Format void i8092_GET_RR3 unsigned char cardNo WORD axis Function Get the main status register RR3 Parameters cardN
93. d Y axes void i8092MF SSTOP SUDDENLY BYTE cardNo WORD axis Description Except for State Control This function provides the similar feature with i8092MF VSTOP SUDDENLY Stop pulse output simply no ERROR CODE 256 returned Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF SSTOP SUDDENLY 1 AXIS XY llimmediately stop the X and Y axes ICPDAS 83 I 8092F Software User Manual void i8092MF_SVSTOP_SLOWLY BYTE cardNo Description Except for State Control This function provides the similar feature with i8092MF_VSTOP_ SLOWLY Stop pulse output simply no ERROR CODE 256 returned Parameters cardNo Module number Return None Example i8092MF SVSTOP SLOWLY 1 stop the interpolation of card 1 in a decelerating way void 8092 SVSTOP SUDDENLY BYTE cardNo Description Except for State Control This function provides the similar feature with i8092MF VSTOP SUDDENLY Stop pulse output simply no ERROR CODE 256 returned Parameters cardNo Module number Return None Example 8092 SVSTOP SUDDENLY 1 II stop the interpolation of card 1 immediately ICPDAS 84 8092F Software User Manual 6 5 5 Clear the Stop Status void i8092MF_CLEAR_STOP BYTE cardNo Description After using anyone of the stop functions mentioned in section 6 5 4 please solve the malfunction then issue this function to clear the sto
94. e BYTE i8092MF LINE 2D BYTE cardNo long fp1 long fp2 Description This function executes a 2 axis linear interpolation motion Parameters cardNo Module number fpt The displacement of the X axis in Pulses 8 388 607 8 388 607 fp2 The displacement of the Y axis in Pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF GET ERROR CODEY function to identify the error NO No errors Example i8092MF LINE 2D 1 12000 10000 llexecute the 2 axis linear interpolation motion on module 1 A Axis2 Target Point 10000 l 0 12000 1 2 axis linear interpolation motion ICPDAS 60 I 8092F Software User Manual 6 2 9 2 Axis Circular Interpolation Motion an Arc e BYTE i8092MF_ARC_CW BYTE cardNo long cpf long cp2 long long fp2 Description This function executes a 2 axis circular interpolation motion in a clockwise CW direction Parameters cardNo Module number cpt The relative position of the center to the current position of X axis in pulses 8 388 607 8 388 607 cp2 The relative position of the center to the current position of Y axis in pulses 8 388 607 8 388 607 fpt The displacement of the X axis in pulses 8 388 607 8 388 607 fp2 Displacement of the Y axis in pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF GET ERROR CODE function to identify the er
95. e eeee ee ee eee eere eerte teet e eee ee eee eese esos 37 SAUTO HOMIJNQG cditio eos ue cesa o te ro 5 1 Setting the Homing Speed e eee nda kken pn eer S 38 5 2 Using an Limit Switch as the HOME sensor eere ee ener 39 5 3 Setting the Homing Modle ee eeee eee eee eren ee ee eee een sese eterna esee tno 39 5 4 Starting the Homing Sequence 4 eere eere eene eee eese sese tno 41 5 5 Waiting for the Homing sequence to be Completed 41 6 GENERAL MOTION CONTROL 42 6 1 Independent Axis Motion Control c eeee ecce e eere ee eene rena 42 6 1 1 Setting the Acceleration Deceleration Mode 42 6 1 2 Setting the Start Speoed uie crier ne ex Ya naa aio uec 44 6 1 3 Setting the Desired Speed eee 44 6 1 4 Setting the Acceleration eeeeeeeeeeeeseeeee eese eeee nennen nennen nennen nnne 45 6 1 5 Setting the Deceleration 45 6 1 6 Setting the Acceleration Rate 47 6 1 7 Setting the Value of the Remaining Offset 48 6 1 8 Fixed Pulse Output
96. e the deceleration is greater than the acceleration and Fig A 16 shows the case where the acceleration is greater than the deceleration In such asymmetric linear acceleration also the deceleration start point is calculated within the IC based on the number of output pulse P and each rate parameter i TA 75 Time TM Fig A 15 Asymmetric T curve acc dec driving A D Fig A 16 Asymmetric T curve acc dec driving A gt D ICPDAS 96 I 8092F Software User Manual When performing the asymmetric trapezoidal driving the following parameters should be set Range R Acceleration A PPS Sec Deceleration D PPS Sec Initial Speed SV PPS Driving Speed V PPS Output Pulse Number P Note In the case of A gt D the following condition is applied to the ratio of the acceleration and the deceleration D gt A x a where CLK 16 MHz x ICPDAS 97 I 8092F Software User Manual A 3 3 Triangle Prevention The triangle prevention function prevents a triangle form in linear acceleration fixed pulse driving even if the number of output plses is low When the number of pulses that were utilized at acceleration and deceleration exceeds 1 2 of the total number of output pulses during acceleration the IC MCX312 stops acceleration and enters a constant speed mode The triangle prevention function is disabled at resetting And set the WR6 D3 AVTRI bit of the extension mode by setting command 60h to 1 can enable
97. egisters of MCX312 These libraries are composed of motion and interpolation commands status display and I O signal management make programming your controller easy Finally all setup and motion control functions are easily executed by calling into either a static or dynamic link library DLL The development procedure of the software library is written by eVC eMbedded Visual C After that we use eVC to recompile the library become DLL Dynamic Link Library and use MFC Microsoft Foundation Class to develop the HMI Human Machine Interface for motion control With inclusion of DLL and HMI our package has the advantage that users do not need to design complicated path planning and code function driver to control the multi axes motor Finally the capability and validity of the functions are tested by experiment in a 2 axis machine Each function will be displayed in following format i8092_FUNCTION_NAME cardNo axis parameter1 parameter2 where cardNo is the module number of i8092 axis can be one axis or two axes Users can refer to Table 2 1 for more information WRO Register D15 D14 D12 D11 D10 D9 D8 D7 D0 RESET Y X Axis X Y XY Code 0x1 0x2 0x3 Name AXIS X AXIS Y AXIS XY ICPDAS 113 8092F Software User Manual A 7 1 Register management functions The definition of the WRn RRn registers are detail shown in appendix B Table A 3 Register management functio
98. ennen 22 2 17 Triangle prevention of fixed pulse driving 23 2 18 External Pulse bonne 24 2 18 1 Handwheel Manual Pulsar Driving 24 2 18 2 Fixed Pulse Driving 25 2 18 3 Continuous Pulse Driving Mode esee 26 2 18 4 Disabling the External Signal Input Functions sssss 27 2 19 Configure hardware with pre defined configuration file 28 3 READING AND SETTING THE REGISTERS 29 3 1 Setting and Reading the Command Position LP 29 3 2 Setting and Reading the Encoder Counter 30 3 3 Reading the Current Velocity 5 eecicie reru ne rene der teo 31 3 4 Reading the Current Acceleration ecce eere ee ee ee eere enean 31 3 5 Reading the DI sto cadres oco ende 32 3 6 Reading and Clearing the ERROR Status e eeeeeeeee 34 3 7 Setting the general Dinigtal output 35 ICPDAS 3 8092F Software User Manual 4 FUNCTIONS FOR 18092 ONLY 36 4 1 Read FRnet DI Signals ooi e icons onde eene 36 4 2 Write data to FRnet DO c
99. er Low if logical real position counter lt COMP register Hi if logical real position counter COMP register Low if logical real position counter 2COMP register When drive pulse is outputting the level becomes Hi When the driving command is engaged the level becomes Hi once the driving status is in acceleration When the driving command is engaged the level becomes Hi once the driving status is in constant speed driving When the driving command is engaged the level becomes Hi once the driving status is in deceleration 012 8 FE4 0 Set whether the input signal filter function enables or signal passes through 0 through 1 enable Specification bit Filter Enable signal D8 FEO EMGN nLMTP nLMTM nSTOPO nSTOP1 D9 FEI nSTOP2 010 FE2 nINPOS nALARM D11 nEXPP 012 FE4 nINO nIN1 nIN2 nIN3 nIN4 nIN5 2 The EMGN signal is set using the D8 bit of the WR3 register of the X axis D15 13 FL2 0 Set a time constant of the filter Removable Input signal FL2 0 maximum noise delay time width 0 1 75uSEC 2uSEC 1 224uSEC 256uSEC 2 448 uSEC 512uSEC 3 896uUSEC 1 024mSEC 4 1 792mSEC 2 048mSEC 5 3 584mSEC 4 096mSEC 6 7 168mSEC 8 192mSEC 7 14 336mSEC 16 384mSEC D15 DO will be set to 0 while resetting http www icpdas com 188 f amp FIRE XB XB v2 0 B 5 Output Register WR4 This register is used for setting the general purpose output s
100. errupt event handle HANDLE i8092_hThread IST handle DWORD WINAPI i8092 ThreadFunction LPVOID IParam IST function BYTE CardNo 1 BYTE Slot121 IIMFC button event Create the thread and set the interrupt factor void CI8092QCDlg OnTestint DWORD dwrThreadlD 0 HWND hWnd NULL Create thread 18092 ThreadFunction i8092_hThread CreateThread NULL 0 18092 ThreadFunction hWnd 0 amp dwThreadlD BYTE axiszAXIS XY 8092 SET MAX V CardNo axis 20000 8092 NORMAL SPEED CardNo axis 0 i18092MF SET V CardNo axis 20000 8092 SET A CardNo axis 100000 i18092MF SET SV CardNo axis 20000 i8092MF SET AO CardNo axis 0 IlInitialize the interrupt hINTP Slot Register Interrupt Slot1 Set the interrupt factor D END 8092 INTFACTOR ENABLE CardNo AXIS X 7 II 4 Axis fixed pulse drive i8092MF FIXED MOVE CardNo AXIS XY 10000 while 80922MF STOP WAIT CardNo Oxf NO for motion done DoEvents Sleep 1 INST function DWORD WINAPI i8092 ThreadFunction LPVOID IParam DWORD dwEvent WORD RR3 X if hINTP NULL Wait the event object dwE vent WaitForSingleObject hINTP INFINITE switch dwEvent 75 8092F Software User Manual case WAIT_OBJECT_0 Get the interrupt event object successfully While the driving stop clear the position counter i8092MF_SET_LP CardNo AXIS_X 0 M eis Other user codes in the IST of
101. et 2 axes constant vector speed mode Parameter cardNo is the board number type is the parameter setting the constant vector speed modes type 0 constant vector speed mode is invalid type 1 2 axes constant vector speed mode Example Set the 2 axes constant vector mode i8092 MOTION TYPE 1 1 i8092 SET FINISH Format void 18092 SET FINISH BYTE cardNo WORD axis long data Function Set the value of the finish point for motion in Pulses Parameter cardNo Module number axis axis or axes Please refer to Table 2 1 data Pulse number Range 2 147 483 648 2 147 483 648 Example set the value of finish point i8092 SET FINISH 1 1 1000 ICPDAS 146 8092F Software User Manual Linear interpolation functions About the linear interpolation functions are designed in three modes constant tangential speed T curve tangential acceleration deceleration S curve tangential acceleration deceleration Users need to set the following parameters Range R Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Finish Point FP Pulses i8092_LINE_2D Format void i8092_LINE_2D umsigned char CardNo long fp1 long fp2 Function Two axes linear interpolation Parameter cardNo is the board number 1 1 finish point for axis1 data range is 8388608 8388607 1 2 finish point for axis2 data range is 8388608 8388607 Example i8092 LINE2D 1 12000 10000 Axis2
102. etting drive speed is lower than the initial speed the acceleration deceleration will not be performed and the driving is constant speed During the encoder Z phase searching at a low peed driving the user want to perform the sudden stop once the Z phase is detected the drive speed should be set lower than the initial speed Drive speed can be altered during the driving When the drive speed of next constant speed period is set the acceleration deceleration will be performed to reach the new setting drive speed then a constant speed driving starts ICPDAS 135 8092F Software User Manual Note 2 In fixed pulse S curve acceleration deceleration driving there is no way to change the drive speed during the driving In continuous S curve acceleration deceleration driving the S curve profile cannot be exactly tracked if the speed alterations during the acceleration deceleration It is better to change the drive speed in the constant speed period i8092 SET Format void 18092 SET A unsigned char cardNo WORD axis WORD data Function The function is setting the acceleration or deceleration of the trapezoidal driving For S curve acceleration deceleration it shows the linear acceleration until a specific value A driving The acceleration calculation is shown in the following formula Driving Acceleration PPS Sec 125 Parameters cardNo is the board number axis is the motion axes code name as shows
103. f 0 II Set Z phase and home signal disabled 18092 HOME STEP1 cardNo Oxf 1 1 Set Step1 is executed and negative direction for 2 axes 18092 HOME STEP2 cardNo Oxf 1 1 Set Step2 is executed and negative direction for 2 axes 18092 HOME STEP3 cardNo Oxf 1 0 Set Step3 is executed and positive direction for 2 axes 18092 HOME STEP4 cardNo Oxf 1 0 Set Step4 is executed and positive direction for 2 axes i8092_ SET SV cardNo Oxf 500 SV 500 Start Speed 5000 PPS i8092 SET V cardNo Oxf 2000 V22000 Drive Speed 20000 PPS i8092 SET A cardNo Oxf 80 II A 80 Accelerationz 10K PPS Sec i8092_ SET HV cardNo Oxf 500 1 HV 500 Home Speed 5000 PPS i8092_ SET PULSE cardNo Oxf 3500 Set offset pulse 3500 18092 HOME START cardNo Oxf Starts execution of automatic home search 18092 STOP WAlT cardNo axis Wait drive stop Delay 500 Delay 500ms In eVC use Sleep 500 i8092 SET LP cardNo axis 0 Clear LP counter i8092_ SET EP cardNo axis 0 Clear EP counter ICPDAS 169 I 8092F Software User Manual A 7 7 Interrupt Function Table A 10 Synchronous Action functions d x Pi i8092_BPINT_ENABLE BR fie fir 7078 M P BF i8092 BPINT DISABLE 18092 CIINT ENABLE Ses Cloke i8092 CIINT DISABLE Pe fib ib URP T i8092 INTFACTOR ENABLE RAA 8 i8092 INTFACTOR DISABLE 5 EHETER T i8092 SYNC MODE Format void 18092 SYNC MODE uns
104. f possible do not mix these two groups of functions together Some internal parameters may be changed beyond users consideration ICPDAS 7 8092F Software User Manual 1 3 Funciton description All functions are listed in following form Function name parameter1 parameter2 Description Explanation of this function Parameters Definitions of the parameters and how to use them Return The return value of this function Example Simple example program in C Remark Comments ICPDAS 8 8092F Software User Manual 2 Basic Settings 2 1 Code numbers for axes The axis assignments follow the definitions listed below X 1 Y 2 If X and Y axes are assigned simultaneously then the code number is 3 An assignment for either single axis or multiple axes at the same time is possible Available axis code numbers are listed below The type of the axis argument used in the functions is defined as WORD Table 2 1 Axis assignments and their corresponding codes Axis X Y XY Code 0x1 0x2 0x3 Name AXIS X AXIS Y AXIS XY 2 2 Registration of Modules and getting the LIB version e BYTE i8092MF REGISTRATION BYTE cardNo BYTE slot Description This function registers a module that is installed in slot number slot by assigning a card number Registration must be performed for each 1 8092F motion control module before other functions are called After registration each module can be identified b
105. he motion stop was due to the STOP command not because an error happened Please refer to 6 5 5 and following example to clear ERROR NO No error EXAMPLE If 18092 GET ERROR 1 YES module 1 and ERROR is found WORD ErrorCode 18092 GET ERROR CODE 1 AXIS X WORD ErrorCode Y 2i18092MF GET ERROR CODE 1 AXIS Y if Errorcode X ErrorCode Y 256 means that motion was stopped due to the stop command was issued not because any error happened Please take some actions to clear the malfunction then clear the STOP status i8092MF CLEAR STOP 1 WORD i8092MF GET ERROR CODE BYTE cardNo WORD axis Description This function reads the ERROR status Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y ICPDAS 34 8092F Software User Manual Return 0 gt no error For non zero return values please refer to the following table If there are not only one errors the return value becomes the sum of these error code values For example a return code 48 means that ALARM and EMGERENCY occurs at the same time Cause of stop Explanation SOFT LIMIT Occurs when the forward software limit is asserted SOFT LIMIT Occurs when the reverse software limit is asserted LIMIT Occurs when the forward hardware limit is asserted LIMIT Occurs when the reverse hardware limit is asserted ALARM Occurs when the ALARM is asserted EMERGENCY Occurs when the
106. hen SC 3 When the bit pattern interpolation pulse is outputting DO in SREG Stack Register will be shifted output first and then in the order of D1 D When all of SREGs Stack Registers have been shifted output the data in REG1 will be shifted to SREG the data in REG2 will be shifted to REG1 and the SC will count down to 2 Then the host CPU is able to write a new data into MCX312 again In order to make MCX312 output the bit pattern data continuously the host CPU should write the data into MCX312 before SC counts down to 0 MCX312 will output an interrupt requirement signal to host CPU when SC counts down from 2 to 1 ICPDAS 107 8092F Software User Manual SC 3 BP Data1 Send Data JL N C 2 Interrupt Asix SC gt BP Data aaa i Interrupt y Fig A 27 Bit pattern data stack Asix B The limitation for the speed of bit pattern interpolation driving The maximum pulse output speed is 4MHz in bit pattern interpolation mode However the maximum speed will depend on the data update rate of host CPU if the bit pattern data are more than 48bits For example of the X and Y axes bit pattern interpolation if the host CPU needs 100usec to update new 16 bit data for X and Y axes The maximum speed is 16 1000 SEC 2160KPPS B The ending of bit pattern interpolation There are 2 ways can terminate the bit pattern interpolation 1 Write an ending code into buffer register of ax1 The bit p
107. ic deceleration for the fixed acceleration deceleration driving 0 automatic deceleration 1 manual deceleration The decelerating point should be set if the manual deceleration mode is engaged 01 DSNDE Setting decelerating rate which is in accordance with the rate of the acceleration or an individual decelerating rate 0 acceleration 1 deceleration When 0 is set acceleration value is used as acceleration deceleration during acceleration deceleration driving When 1 is set acceleration value is used during acceleration driving and deceleration value is used during deceleration driving 1 should be set for non symmetrical trapezoidal acceleration deceleration driving D2 SACC Setting trapezoidal driving S curve driving 0 trapezoidal driving 1 S curve driving Before S curve driving is engaged jerk K should be set http www icpdas com 186 f amp IRE v2 0 D4 3 EXOP1 0 Setting the external input signals nEXPP nEXPM for driving D4 D3 EXOP1 0 0 external signals disabled 0 1 continuous driving mode 1 0 fixed driving mode 1 1 manual pulsar mode When the continuous driving mode is engaged the direction drive pulses will be output continuously once the nEXPP signal is on the Low level the direction pulses will be output continuously once the nEXPM signal is on the Low level When the fixed driving mode is engaged the direction fixed driving starts once
108. ignal 5 gt HOME Check the HOME input signal 6 gt NHOME Check the Near HOME input signal 7 IN3 Check the IN3 input signal 8 gt INPOS Check the INPOS input signal 9 gt INDEX Check the encoder Z phase input signal Return YES on NO off Example if 8092MF GET DI 1 AXIS X 1 YES get the status of limit sensor of X axis on module 1 e WORD i8092MF GET DI ALL BYTE cardNo WORD axis Description This function reads All digital inputs DI status Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y ICPDAS 32 8092F Software User Manual Return a 16 bits value 0 Low 1 High bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 Example ICPDAS WORD DI_Flag i8092MF_GET_DI_ALL 1 AXIS X NHOME signal HOME signal Z PHASE signal EMG signal Only AXIS X signal EXP signal READY INPOS signal ALARM signal N A N A N A IN3 signal N A N A LMT signal LMT signal II get all status of module 1 33 8092F Software User Manual 3 6 Reading and Clearing the ERROR Status BYTE i8092MF_GET_ERROR BYTE cardNo Description This function checks whether an error occurs or not Parameters cardNo Module number Return YES Some errors happened Please use i8092MF_GET_ERROR_CODE to get more information If GET ERROR CODE 256 it means that t
109. ignal IN2 is active high 500 PPS Step 4 35000 pulse offset 20000 PPS MCX314As X Near Home X Home X Z Phase C Motor Driver Output Fig A 39 Hardware disposition for home operation example 1 Note In this example the user should connect the INO IN2 signals as shown in the diagram on the left hand side Demo Program Example of home search using a near home INO home signal IN1 and the Z phase signal Parameters cardNo 1 motion axis 0xf AXIS ALL i8092 SET R 1 Oxf 800000 Set Multiple 10 i8092 HLMTM LEVEL cardNo Oxf 0 Set negative limit signal of low active 18092 LMTSTOP MODE cardNo Oxf 0 Set Limit stop mode of decelerating stop 18092 HOME STEP1 cardNo Oxf 1 1 Set Step1 is executed and negative direction for 2 axes 18092 HOME STEP3 cardNo Oxf 1 0 Set Step3 is executed and positive direction for 2 axes 18092 HOME STEP4 cardNo Oxf 1 0 Set Step4 is executed and positive direction for 2 axes i8092 SET SV cardNo Oxf 500 Set start velocity 500 PPS i8092 SET V cardNo Oxf 2000 Set drive velocity 2000 PPS i8092_ SET A cardNo Oxf 80 II Set acceleration 80 PPS Sec i8092 SET HV cardNo Oxf 500 Set home speed 500 PPS i8092 SET PULSE cardNo Oxf 20000 Set offset pulse 20000 i8092 HOME START cardNo Oxf Starts execution of automatic home search 18092 STOP WAIT cardNo Oxf Wait drive stop Sleep 500 In BC
110. ignals nOUT7 0 This 16 bit register locates 8 output signals of each axis It can be also used as a 16 bit general purpose output It is Low level output when the bit is set 0 and Hi level output when the bit is set 1 D15 D114 D113 D12 a D11 D10 D9 D8 D7 06 DS D4 D3 D2 D1 DO YOUT7 YOUT6 YOUTS YOUT4 YOUT3 YOUT2 YOUT1 YOUTQ XOUT7 XOUT6 XOUTS xour4 XOUIT3 XOUT2 XOUT1 XOUTO D15 D0 will be set to 0 while resetting and nOUT7 0 signals become Low level 4 8 Interpolation Mode Register WR5 This register is used for setting constant vector speed mode multichip interpolation mode 1 step interpolation mode and interrupt during the interpolation H L D15 D14 D13 D12 D11 D10 DS D8 D7 D6 05 D4 D3 D2 D1 see on odes Dem meom EL EE MERE DC MCI Interrupt Step multichip Constant Vector Speed D9 8 LSPD1 0 Constant vector speed mode setting of interpolation driving D15 D0 will be set to 0 while resetting D9 D8 Code Binar constant vector 0 0 speed invalid 0 1 2 axis constant vector speed 1 10 setting not available 1 11 setting not available When 2 axis constant vector speed mode is engaged the user should set the range R of the Y axis to be 1 414 times of the range R of the X axis D11 10 MLT1 0 Multichip interpolation mode setting 011 D10 Setting 001 01 disable multichip interpolation main chip sub chip X 1 01 Y Both X and
111. igned char cardNo WORD axis WORD sm data WORD sm7 data Function Writes data to the WR6 WR7 registers and uses 64h command to set the conditions for synchronous action mode Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 sm6data is the data for the WR6 register sm7data is the data for the WR6 register Example Set the X axis 0x1 as the Provocative axis Y axis 0x2 as the Active Iaxis However the activation factor is the logic position counter value llexceeded the value of COMP register P gt C and the action is the positive fixed pulse driving i8092 SET 1 0 1 0x2001 0x0 i8092 SET 1 0x2 0x0 0x0010 ICPDAS 170 8092F Software User Manual i8092_GET_SB Format void i8092_GET_SB unsigned char cardNo WORD axis Function Read the synchronous action buffer register Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Get the data from the x axis s buffer register i8092_GET_SB 1 0 1 i8092_GET_SM6 Format WORD i8092_GET_SM6 BYTE cardNo WORD axis Function Get the value of SM6 register Parameters cardNo board number axis axis or axes Please refer to Table A2 1 Example Get the value of SM6 of X axis on board 1 WORD sm6Data sm6Data 18092 GET SMe 1 0 1 18092 GET SM7 Format WORD i8092 GET SM7 BYTE cardNo WORD axis F
112. in Table 5 They are including the setting for range R multiple M start speed SV driving speed V acceleration A deceleration D acceleration rate K output pulse P T Curve acceleration deceleration and S Curve acceleration deceleration The whole command procedures should be set with the initial command registers After setting correlation parameters the CPU sends command or data through MCX312 finally command enters in the logic position counter and then sends to the driver to control the motor Table A 5 Basic Motion Command Functions Function Name Description i8092_ SET SV Initial speed setting i8092_ SET V Drive speed setting i8092 SET A Acceleration setting i8092_ SET D Deceleration setting i8092_ SET Acceleration rate setting i8092_ SET L Deceleration rate setting i8092_ SET PULSE Set output pulse number i8092_ SET AO Acceleration Counter Offsetting i8092 SET TCURVE T Curve acc dec mode enabled i8092 SET SCURVE S Curve acc dec mode enabled i8092 SET AUTODEC Auto deceleration setting i8092 SET MANDEC Manual deceleration setting i8092 DRV FDRIVE Fixed pulse drive mode setting i8092 CDRIVE Continuous drive mode setting i8092 SET SYMMETRY Symmetric T S curve Acc Dec setting i8092 SET ASYMMETRY Asymmetric T S curve Acc Dec setting i8092 STOP WAIT Drive and wait for stopping 18092 STOP
113. ing is stopped by nALARM from servo drivers it will become 1 015 EMG If the driving is stopped by external emergency signal EMGN it will become 1 The Status Bits of Driving Finishing These bits are keeping the factor information of driving finishing The factors for driving finishing in fixed driving and continuous driving are shown as follows http www icpdas com 192 BAX BXE V2 0 a when all the drive pulses are output in fixed driving b when deceleration stop or sudden stop command is written c when software limit is enabled and is active d when external deceleration signal is enabled and active e when external limit switch signals nLMTP nLMTM become active f when nALARM signal is enabled and active and g when EMGN signal is on the Low level Above factors a and b can be controlled by the host CPU and factor c can be confirmed by register RR2 even the driving is finished As for factors g the error status is latched in RR2 until next driving command or a clear command 25h is written After the driving is finished if the error factor bits D15 D12 become 1 n ERR bit of main status register RRO will become 1 Status bit of driving finishing can be cleared when next driving command is written or when the finishing status clear command 25h is used B 10 Status Register 2 RR2 Each axis is with status register 2 The axis specified by NOP command or the condition
114. ion Note The coordinates setting value is the relative value of the start point coordinates In Fig A 23 it explains the definition of CW and CCW circular interpolations The CW circular interpolation is starting from the start point to the finish position with a clockwise direction the CCW circular interpolation is with a counter clockwise direction When the finish point is set to 0 0 a circle will come out When performing the circular linear interpolation the following parameters should be preset Range R Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Finish Position FP Manual decelerating Point DP Circular Center Position C 2 CCW circular interpolation Finish point Start point Center point 1 Finish point Start point CW circular interpolation Fig A 233 Circular interpolation In Fig A 24 it explains the long axis and the short axis First we define 8 quadrants in the X Y plane and put the numbers 0 7 to each quadrant We find the absolute value of ax1 is always larger than that of ax2 in quadrants 0 3 4 and 7 so we call ax1 is the long axis ax2 is the short axis in these quadrants in quadrants 1 2 5 and 6 ax2 is the long axis ax1 is the short axis The short axis will output pulses regularly and the long axis will output pulses depending on the interpolation calculation ICPDAS 104 8092F Software User Manual Start point Short Ax
115. irection ICPDAS 62 8092F Software User Manual 6 2 10 2 Axis Circular Interpolation Motion e BYTE i8092MF_CIRCLE_CW BYTE cardNo long cp1 long cp2 Description This function executes a 2 axis circular interpolation motion in a clockwise CW direction Parameters cardNo Module number cpt The relative position of the center to the current position of X axis in pulses 8 388 607 48 388 607 cp2 The relative position of the center to the current position of Y axis in pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF GET ERROR CODEY function to identify the errors NO No errors Example i8092MF CIRCLE CWY 1 0 10000 llexecute a circular motion a complete circle in CW direction on module 1 e BYTE i8092MF CIRCLE CCW BYTE cardNo long cp7 long cp2 Description This function executes a 2 axis circular interpolation motion in a counter clockwise CCW direction Parameters cardNo Module number The relative position of the center to the current position of X axis in pulses 8 388 607 8 388 607 cp2 The relative position of the center to the current position of Y axis in pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify ICPDAS 63 I 8092F Software User Manual the error NO No errors Example i8092MF_CIRCLE_CCW 1 0 10000 llexecute a circular motion a circle in CCW direc
116. is Finish point d Fig A 24 The 0 7Quadrants in circular interpolation calculation Note The calculation steps for the manual deceleration length of circular interpolation 1 First judge the start point and finish point located on which quadrant 2 Calculate the pulse number of the start point and finish point on the quadrant Take notice of the different motion direction CW CCW 3 Calculate the whole quadrant numbers that passed through in the path planning 4 The result of step3 step4 is the total pulse number 5 Users can get the suitable multiple from the setting maximum speed if the multiple M and then the real start speed RSV SVxM real driving speed RV VxM real acceleration Ax125xM By the equation RSV RV RAXTA and you can get the time and displacement for the acceleration area 6 If the pulse numbers of deceleration segment are same as the acceleration segment it can figure easily manual decelerating point total output pulse output pulse during acceleration ICPDAS 105 I 8092F Software User Manual Fig A 25 shows the circular interpolation of a real circle with radius 10000 in a trapezoidal driving The user should calculate the decelerating point before driving because the automatic deceleration will not be active In the figure the circle tracks through all the 8 quadrants 0 7 In quadrant 0 Y axis is the short axis and it s displace is about 10000 2 7071
117. itial Speed Time Fig A 11 Offset pulse in fixed pulse driving ICPDAS 91 8092F Software User Manual 2 5 Continuous Drive Pulse Output When the continuous driving is performed it will drive pulse output in a specific speed until stop command or external stop signal is happened The main application of continuous driving is home searching teaching or speed control Two stop commands are for stopping the continuous driving One is decelerating stop and the other is sudden stop Four input pins IN3 INO of each axis can be connected for external decelerating and sudden stop signals Enable disable active levels and mode setting are possible And it is necessary to set the following parameters B Range Initial Speed SV PPS Driving Speed V PPS Acceleration A PPS Sec Velocity4 Driving Speed Stop Command or External Stop Signal Initial Speed Time Fig A 12 Continuous driving ICPDAS 92 8092F Software User Manual A 2 6 Constant Speed Driving When the driving speed command set in 1 8092 is lower than the initial speed the acceleration deceleration will not be performed instead a constant speed driving starts If the user wants to perform the sudden stop when the home sensor or encoder Z phase signal is active it is better not to perform the acceleration deceleration driving but the low speed constant driving from the beginning For processing constant
118. le 1 int sv21000 starting speed 1000 PPS ICPDAS 65 I 8092F Software User Manual int v 10000 vector speed 10000 PPS int 5000 lacceleration 5000 PPS Sec int d 5000 deceleration 5000 PPS Sec i8092MF SET MAX V cardNo AXIS XY 16000 liset the maximum speed to 16000 PPS i8092MF_RECTANGLE cardNo AXIS X AXIS Y 1 0 0 20000 10000 1000 sv v a d llexecute a rectangular motion on the XY plane axis2 Sb5 Sp4 Sp Sp3 Sp2 Sp P axis1 Spo 5 1 p nDir 6 3 2 2 Axis Continuous Linear Interpolation e BYTE i8092MF LINE 2D INITIAL BYTE cardNo DWORD VSV DWORD VV DWORD VA Description This function sets the necessary parameters for a 2 axis continuous linear interpolation using symmetric T curve speed profile Parameters cardNo Module number VSV Starting speed in PPS VV Vector speed in PPS VA Vector acceleration PPS Sec Return None ICPDAS 66 I 8092F Software User Manual Example i8092MF_LINE_2D_INITIAL This function should be defined before the i8092MF_LINE_2D_CONTINUE function is used Please refer to the example of this function e BYTE i8092MF_LINE_2D_CONTINUE BYTE cardNo WORD nType long 1 1 long fp2 Description This function executes a 2 axis continuous linear interpolation However it is a software macro function therefore it requires CPU resource to run this function Parameters cardNo Module number nType 0
119. liset the vector deceleration to 500 PPS Sec i8092MF_SET_VAO cardNo 20 liset the value of remaining offset pulses to 20 i8092MF LINE 2D cardNo 10000 5000 llexecute the 2 axis linear interpolation motion long fp1 4000 long fp2 10000 int sv 200 int v 2000 i8092MF SET MAX V cardNo AXIS XY 8000 i8092MF VECTOR SPEED cardNo 4 2 axis linear motion using an asymmetric S curve velocity profile i8092MF SET VSV cardNo sv liset the starting velocity to sv PPS i8092MF SET VV cardNo v liset the vector speed to v PPS i8092MF SET VK cardNo 50 liset the acceleration rate to 500 PPS Sec 2 i8092MF SET VL cardNo 30 liset the deceleration rate to 300 PPS Sec 2 i8092MF SET VAO cardNo 20 liset the value of remaining offset pulses to 20 i8092MF LINE 2D cardNo fp1 fp2 llexecute the 2 axis linear motion long fp1 11000 long fp2 9000 long c1 10000 long c2 0 int sv 100 int v 3000 int a 5000 int d 5000 i8092MF SET MAX V cardNo AXIS XY 8000 i8092MF VECTOR SPEED cardNo 5 2 axis circular motion using a symmetric T curve velocity profile i8092MF SET VSV cardNo sv liset the starting vector speed to sv PPS i8092MF SET VV cardNo v liset vector speed to v PPS 8092 SET VA cardNo liset the vector acceleration to a PPS Sec i8092MF SET VAO cardNo 0 liset the value of remaining offset pulses to 0 Pulse 53 I 8092F Software User Manual i8092MF_ARC_CW ca
120. lue reach 9999 an adding pulse will cause the counter to reset to 0 When the counter value is 0 a lessening pulse will let the counter set to 9999 Max ring encoder value 9999 Note 1 This function will set the LP and EP simultaneously 2 If this function is enabled the software limit function cannot be used void i8092MF VRING DISABLE BYTE cardNo WORD axis Description This function disables the variable ring counter function Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None ICPDAS 22 8092F Software User Manual Example i8092MF VRING DISABLE 1 AXIS X disable the ring counter function for the X axis module 1 2 17 Triangle prevention of fixed pulse driving void i8092MF AVTRI ENABLE BYTE cardNo WORD axis Description This function prevents a triangle form in linear acceleration T curve fixed pulse driving even if the number of output pulses is low Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF AVTRI ENABLE 1 AXIS X I set the X axis of module 1 not to generate a triangle form in its speed profile void i8092MF AVTRI DISABLE BYTE cardNo WORD axis Description This function disable the function that prevents a triangle form in linear acceleration fixed pulse driving Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return
121. mand data the user should use designated data length For instance the circular interpolation of the finish point should be set by a signed 32 bit format with the data length of 4 bytes although its calculatable data range is from 8 388 608 to 8 388 607 signed 24 bit format The contents of WR6 and WR7 are unknown while resetting B 8 Main Status Register RRO This register is used for displaying the driving and error status of each axis It also displays interpolation driving ready signal for continuous interpolation quadrant of circular interpolation and stack counter of bit pattern interpolation D15 D14 D13 D12 D11 D10 Dg D8 D7 D6 D5 D4 D3 D2 D1 DO P eee peser espe om T o Temm 2588 50 SS Error Status of Each Axis Driving Status of Each Axis http www icpdas com 190 f amp FIRE XE v2 0 01 0 Displaying driving status of each axis When the bit is 1 the axis is an outputting drive pulse when the bit is 0 the driving of the axis is finished Once the in position input signal nINPOS for servomotor is active nINPOS will return to 0 after the drive pulse output is finished 05 4 n ERR Displaying error status of each axis If any of the error bits 06 00 of each axis s RR2 register and any of the error finish bits D15 D12 of each axis s RR1 register becomes 1 this bit will become 1 D8l DRV Displaying interpolation driving status While the interpolation drive pulses
122. motion i8092MF DEC ENABLE cardNo llenable the deceleration function i8092MF VECTOR SPEED cardNo 1 liset module 1 to perform 2 axis linear motion using a symmetric S curve velocity profile i8092MF SET VSV cardNo 500 liset the starting vector speed to 500 PPS i8092MF SET VV cardNo 2000 set the vector speed to 2000 PPS i8092MF SET VA cardNo 1000 liset the vector acceleration to 1000 PPS Sec i8092MF LINE 2D cardNo 20000 10000 llexecute the 2 axis linear interpolation motion i8092MF VECTOR SPEED cardNo 2 2 axis linear motion using a symmetric S curve velocity profile i8092MF SET VSV cardNo 200 liset the starting vector speed to 200 PPS i8092MF SET VV cardNo 2000 set the vector speed to 2000 PPS i8092MF SET VK cardNo 50 IIset the acceleration rate to 500 PPS Sec i8092MF SET VAO cardNo 20 liset the value of remaining offset pulses to 20 i8092MF LINE 2D cardNo 10000 10000 llexecute the 2 axis linear interpolation motion i 8092MF DEC ENABLE cardNo llenable the deceleration function i8092MF VECTOR SPEED cardNo 3 2 axis linear motion using an asymmetric T curve velocity profile i8092MF SET VSV cardNo 100 liset the start vector speed to 100 PPS i8092MF SET VV cardNo 2000 liset the vector speed to 2000 PPS i8092MF SET VA cardNo 1000 liset the vector acceleration to 1000 PPS Sec i8092MF SET VD cardNo 500 52 8092F Software User Manual ICPDAS
123. n Set symmetry acceleration deceleration Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Set the symmetry acc dec motion for 2 axes i8092 SET SYMMETRY 1 Oxf i8092 SET ASYMMETRY Format void 18092 SET ASYMMETRY unsigned char cardNo WORD axis Function Set asymmetry acceleration deceleration Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Set the asymmetry acc dec motion for 2 axes i8092 SET ASYMMETRY 1 Oxf ICPDAS 141 8092F Software User Manual i8092 STOP SLOWLY Format void 18092 STOP SLOWLY unsigned char cardNo WORD axis Function Motion command for stopping slowly Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Stop slowly command for 2 axes 18092 STOP SLOWLY 1 Oxf 18092 STOP SUDDENLY Format void 18092 STOP SUDDENLY unsigned char cardNo WORD axis Function Motion command for stopping suddenly Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example Stop suddenly command for 2 axes i8092_ STOP SUDDENLY 1 Oxf i8092 HOLD Format void 18092 DRV HOLD unsigned char cardNo WORD axis Function Set holding for drive starting Parameters cardNo is the board number axis is the motion axis code name as shows in
124. n nDir is the operation direction of the step nDir 0 positive nDir 1 negative Example Set the step 2 enabled and negative direction of the home search 18092 HOME STEP2 1 Oxf 1 1 ICPDAS 162 8092F Software User Manual i8092_HOME_STEP3 Format void 18092 HOME STEP3 unsigned char cardNo WORD axis WORD nType WORD nDir Function Use the signal IN2 to operate the home search Parameter cardNo is the board number axis is the motion axis code name nType is the specified the encoder z phase signal IN2 executed or not nType 0 non execution nType 1 execution nDir is the operation direction of the step nDir 0 positive nDir 1 negative Example Set the step 3 enabled and negative direction of the home search 18092 HOME STEP3 1 Oxf 1 1 i8092 HOME STEP4 Format void 18092 HOME STEP4 unsigned char cardNo WORD axis WORD nType WORD nbDir Function Set the offset drive in the last step Parameter cardNo is the board number axis is the motion axis code name nType is the specified the near home signal INO executed or not nType 0 non execution nType 1 execution nDir is the operation direction of the step nDir 0 positive nDir 1 negative Example Set the step 4 enabled and negative direction of the home search i8092 HOME STEPA 1 Oxf 1 1 ICPDAS 163 I 8092F Software User Manual i8092_ HOME SAND Format void 18092 HOME SAND unsigned char cardNo WORD axis WO
125. n the Low level 1 stop on the Hi level When driving stops triggered by the nSTOP2 signal the real D6 EPCLR position counter is cleared When the nSTOP2 signal is changed to the Active level while this bit is set to 1 the driving stops and the real position counter EP is cleared The WR1 D5 SP2 E bit must be set to 1 and the Enable level must be set in the WR1 D4 SP2 L bit D4 2 0 SPm L D7 EPINV Reverse increase decrease of real position counter http www icpdas com 182 XXE v2 0 EPINV position counter A B phase mode Count up when A phase is advancing Count down when B phase is advancing Up Down pulse Count up when PPIN pulse input mode Count down when PMIN pulse input A B phase mode Count up when B phase is advancing Count down when phase is advancing Up Down pulse Count up when PMIN pulse input mode Count down when PPIN pulse input D8 SMOD Setting for prioritizing to reach specified drive speed during S curve acceleration deceleration driving 1 enable For the following bits the interrupt is set 1 enable 0 disable D9 P2C Interrupt occurs when the value of logical real position counter is larger than or equal to that of COMP register Interrupt occurs when the value of logical real position counter is D10 P lt C Smaller than that of COMP register D11 lt Interrupt occurs when the value of logical real position counter is smaller than that of COMP register D
126. ncoder input direction 0 positive dir 12 negative dir Return None Example i8092MF SET EN DIR 1 AXIS XY 0 liset the encoder input direction to positive direction 2 12 Setting the Servo Driver ON OFF void i8092 SERVO ON BYTE cardNo WORD axis Description This function outputs a DO signal ENABLE to enable the motor driver Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092 SERVO ON 1 AXIS XY llenables all drivers on module 1 ICPDAS 18 8092F Software User Manual void i8092 SERVO OFF BYTE cardNo WORD axis Description This function outputs a DO signal ENABLE to disable the motor driver Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092 SERVO OFF 1 AXIS XY I disables all drivers on module 1 2 13 Setting the SERVO ALARM Function void i8092MF SET ALARM BYTE cardNo WORD axis BYTE nMode BYTE nAEdge Description This function sets the ALARM input signal related parameters Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nMode 0 disable ALARM function 1 enable ALARM function nAEdge Sets the trigger level 0 low active 1 high active Return None Example i8092MF_SET_ALARM 1 AXIS XY 1 0 the ALARM for X and Y axes on module 1 and set them low active ICPDAS 19 80
127. nd Lists For the advanced users who can develop their applications by using the basic function several lists of command codes and their corresponding ranges are listed below For more information users can refer to the manual of MCX312 motion chip A 8 1 Data Setting Commands Data Symbol Code Command Data Range length Byte R 00h Range setting 8 000 000 16 000 4 K 01h Acc rate Jerk setting 0 65 535 2 A 02h Acceleration Acc setting 1 8 000 2 D 03h Deceleraton Dec setting 1 8 000 2 SV 04h Initial speed setting 1 8 000 2 V 05h Driving speed setting 1 8 000 2 06h Output pulse numbers 0 275 4 FP 06h Finish point setting 231 23 4 07h Manual deceleration point 0 65 535 2 setting 08 Circular center point setting 231 427 4 LP 09h Logical position counter setting 231 23 4 0Ah Real position counter setting 231 2371 4 0Bh register setting 25 427 4 CM 0Ch COMP register setting 231 4 2 4 AO 0Dh Acceleration counter offset 0 65535 2 setting A 8 2 Data Reading Commands Data Symbol Code Command Data Range Length Byte LP 10h Logic position counter 22314931 4 reading EP 11h Real position counter reading 231 231 4 CV 12h Current driving speed reading 1 8 000 2 CA 13h Current Acc Dec value reading 1 8 000 2 SB 14h Synchronous buffer register 2314931 4 reading ICPDAS 179 8092F
128. negative direction nStep4 0 Step 4 is not executed 1 Moves in a positive direction 2 Moves in a negative direction data Offset value 0 2 147 483 647 The Four Steps Required for Automatic Homing Step Action Speed Sensor 1 Searching for the Near Home sensor V NHOME INO 2 Searching for the HOME sensor HV HOME IN1 3 Searching for the encoder Z phase HV Z phase IN2 signal 4 Moves to the specified position V Return None Example Use the following functions to set the homing mode of the X axis i18092MF SET V 1 0x1 20000 i18092MF SET HV 1 0x1 500 8092 SET HOME 1 0 1 2 2 1 1 3500 i8092MF_HOME_START 1 0x1 start auto homing i8092MF_WAIT_HOME 1 0x1 wait until homing is completed Step Input Signal Direction Speed 1 Near HOME INO is active 20000 PPS V 2 HOME IN1 is active 500 PPS HV 3 Z phase IN2 is active 500 PPS HV No sensor is required Move 3500 4 pulses along the X axis F 20090 EPS 4 ICPDAS 40 I 8092F Software User Manual 5 4 Starting the Homing Sequence void 8092 _START BYTE cardNo WORD axis Description This function starts the home search of assigned axes Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF_HOME_START 1 AXIS X start the automatic homing sequence for the X axis on module 1
129. ng status and start the driving of the assigned axes immediately Parameters cardNo Module number axis Axis or Axes Please refer to Table 2 1 for the axis definition Return None Example BYTE cardNo 1 select card 1 i8092MF_DRV_HOLD cardNo AXIS XY hold the driving command to XY i8092MF SET MAX V cardNo AXIS XY 10000 liset the maximum speed of X axis and Y axis to be 10K PPS i80922MF NORMAL SPEED cardNo AXIS XY 0 set the driving mode to be symmetric T curve i8092MF SET V cardNo AXIS X 2000 liset the speed of X axis to 2 000 PPS i8092MF SET A cardNo AXIS X 1000 the acceleration of X axis to 1 000 PPS S i8092MF SET SV cardNo AXIS X 2000 liset the starting speed to 2 000 PPS i8092MF SET V cardNo AXIS Y 2000 liset the speed of Y axis to 2 000 PPS i8092MF SET A cardNo AXIS Y 1000 liset the acceleration of Y axis to 1 000 PPS S i8092MF SET SV cardNo AXIS Y 2000 liset the starting speed to 2 000 PPS i8092MF FIXED MOVE cardNo AXIS X 5000 X axis to move 5 000 Pulse This command is be held i8092MF FIXED MOVE cardNo AXIS Y 15000 Y axis to move 15 000 Pulse This command is be held i8092MF_DRV_START cardNo AXIS XY IIrelease the holding status X and Y axes will start to move simultaneously 6 5 3 Waiting until the Motion Is Completed e BYTE i8092MF_STOP_WAIT BYTE cardNo WORD axis ICPDAS 79 8092F Software User
130. nnnnnnnnnnnnnnnnnnnn nnn 179 A 8 2 Data Reading Commands eee nnns 179 A 8 3 Driving Comman0dQs eese nennen nnn nnne nnne nnn nnn nnn 180 A 8 4 Interpolation Commands eee eeeeeeeeeseeeseeeeeeeeeneees 180 A 8 5 Other commands 180 ICPDAS 5 8092F Software User Manual APPENDIX B MCX312 REGISTERS 181 B 1 Command Register WRO eee e ecce sese eno 181 2 Reais ter le nueces eee hene acer och e eae 182 B 3 Mode Register2 W RO oiii 184 4 Register3 WRO ise cea tees 186 B 5 Output Register WR4 enia ee cierre deste ce enero e ea erase denken uiae 189 B 7 Data Register WRG WR7 reete eese et tte erue eno Sepe eee eee sue sanas 190 B 8 Main Status Register RR e ecce etta sese enuo 190 B 9 Status Register I REL 191 10 Status Register 2 tren pabe ce sha auo oce 193 Bil Status Register 3 eoe been eee eine 194 B 12 Input Register 4 195 B 13 Data Read Register RR6 RR7
131. ns Function Name Description i8092 SET COMMAND The command register WRO for 2 axes setting i8092 SET WR1 The mode register WR1 for 2 axes setting i8092 SET WR2 The mode register WR2 for 2 axes setting i8092 SET WR3 The mode register WR3 for 2 axes setting i8092 WR4 The output register WR4 setting 8092 5 The interpolation register WR5 setting i8092 GET RRO The main status register RRO getting i8092 GET RR1 The status register 1 RR1 getting i8092 RR2 The status register 2 RR2 getting i8092 The status register getting i8092_GET_RR4 The input register RR4 getting i8092_GET_RR5 The input register RR5 getting i8092 COMMAND Format void 18092 COMMAND unsigned char cardNo WORD axis WORD cmd Function Setting the command register WRO for 2 axes Parameters cardNo is the board number axis is the motion axes as shown in Table2 1 cmd is the command code setting in the WRO register Available command codes are shown in section A 8 Example Set all axes for axis switching i8092_COMMAND 1 0x3 Oxf ICPDAS 114 8092F Software User Manual i8092 SET WR1 Format void 18092 SET WR unsigned char cardNo WORD axis WORD data Function Set the mode register WR1 for 2 axes Parameters cardNo is the board number axis is the motion
132. o is the board number axis is the motion axes as shows in Table 2 1 Example Get the x axis main status register i8092 GET RRO 1 0 1 i8092 RR4 Format void 18092 GET RR4 unsigned char cardNo Function Get the input register Parameters cardNo is the board number Example Get the input register 4 i8092 1 ICPDAS 119 8092F Software User Manual i8092 GET RR5 Format void 18092 GET RR5 unsigned char cardNo WORD data Function Get the input register RR5 Parameters cardNo is the board number Example Get the input register 5 i8092 GET RRS5 1 ICPDAS 120 8092F Software User Manual A 7 2 Functions for Initial Setting We define some constant and structure for 18092 in i8092 h file Define card number and slot number define define define Define constant of decision define define define define define define CARD1 CARD2 MAX_SLOT_NO YES NO ON OFF SERVO ON flag SERVO OFF flag Define movement mode define define define ACCMODE CONST2 CONST3 Interrupt factor define define define define define define define define define define D_END C_STA C END CP GE CPL CM_L CM_GE CI INT BP INT IDLE Transfer data type define define define BYTE WORD DWORD Command buffer define define define define define define define define ICPDAS wr0 wr1 wr2 wr3 wr4
133. ommands will not be executed Note When a position counter variable ring is used a software over run limit cannot be used Enable disable setting for COMP register which is used as the SLMT direction software limit 1 enable 0 disable Once it is enabled during the direction driving if the value of logical real position counter is smaller than that of COMP the decelerating stop will be performed The D1 SLMT bit of register RR2 will become 1 Under this situation further written direction driving commends will not be executed D1 D2 The bit for controlling stop type when the hardware limits are LMTMD nLMTP and nLMTM input signals active 0 sudden stop 1 decelerating stop D3 Setting the logical level of direction limit input signal nLMTP 0 HLMT active on the Low level 1 active on the Hi level Setting the logical level of direction limit input signal nLMTM D4 HLMT O active on the Low level 1 active on the Hi level Setting if real position counter or logical position counter is going to D5 CMPSL be compared with COMP register 0 logical position counter 1 real position counter Setting output pulse type 0 independent 2 pulse type 1 1 pulse DS PLSMD 1 direction type http www icpdas com 184 5 v2 0 When independent 2 pulse type is engaged direction pulses are output through the output signal nPP PLS and direction pulses through nPM DIR When 1 pulse 1 direction t
134. or the axis assignment and command registration for each axis in MCX312 The register consists of the bit for axis assignment bit for setting command code and bit for command resetting After the axis assignment and command code have been written to the register this command will be executed immediately The data such as drive speed setting and data writing command must be written to registers WR6 and WRT first Otherwise when the reading command is engaged the data will be written and set through IC internal circuit to registers RR6 and RR7 When using the 8 bit data bus the user should write data into the high word byte H then low word byte L It requires 250 nSEC maximum to access the command code when CLK 16MHz The input signal BUSYN is on the Low level at this moment Please don t write the next command into WRO before BUSYN return to the Hi level WRO H L D15 014 013 D12 011 D10 D9 D8 D7 DS DA D3 D2 D1 DO RESET Y X Axis Assignment Command Code D5 0 Command code setting Please refer to chapter 5 and the chapters following for further description of command codes D9 8 Axis assignment When the bits of the axis are set to 1 the axis is assigned The assignment is not limited only for one axis but for multi axes simultaneously It is possible to write the same parameters also However the data reading is only for one assigned axis Whenever the interpol
135. ows in Table 2 1 Example Set the comparing target to LP for all axes i8092_COMPARE_LP 1 0x3 ICPDAS 125 8092F Software User Manual 18092 COMPARE EP Format void 18092 COMPARE EP unsigned char cardNo WORD axis Function The function selects the real position counter EP as the comparing target of COMP registers Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 Example Set the comparing target to EP for all axes i8092 COMPARE 1 0x3 i8092 RESET CARD Format void 18092 RESET CARD void Function Command for resetting the motion card Parameter None Example Set the reset command i8092_ RESET CARD Note When the bit WRO D15 is set to 1 but others are 0 the IC will be reset after command writing ICPDAS 126 8092F Software User Manual A 7 3 Motion Status Management Functions The logic position counter is counting the driving pulses in MCX312 When one direction plus is outputting the counter will count up 1 When one direction pulse is outputting the counter will count down 1 The real position counter will count input pulse numbers from external encoder The type of input pulse can be either A B quadrature pulse type or Up Down pulse CW CCW type See Chapter 2 6 3 Host CPU can read or write these two counters any time The counters are signed 32 bits and the counting range is between 2 231 Table A
136. p status Paramters cardNo Module number Return None Example i8092MF CLEAR STOP 1 IIclear the error status of card 1 6 5 6 End of Interpolation void i8092MF_INTP_END BYTE cardNo WORD type Description 1 If the current motion status is running a interpolation motion and you would like to issue a single axis motion or change the coordinate definition you should call this function before the new command is issued 2 You redefine the MAX V for each axis In this way you do not have to execute i8092MF_INTP_END function Parameters cardNo Module number type 0 gt 2 axis interpolation 1 gt 3 axis interpolation Return None Example i8092MF_INTP_END 1 0 declear the end of a 2 axis interpolation on card 1 ICPDAS 85 I 8092F Software User Manual 6 5 7 Setting the COMPARE value void i8092MF_SET_COMPARE BYTE cardNo WORD axis WORD nSELECT WORD nTYPE long data Description This function sets the values of COMPARE registers Howerer it will disable the functions of software limits Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nSELECT Select the COMPARE register 0 gt COMP 1 gt COPM nTYPE Select the souece for comparison 0 gt Position P LP 1 gt Position P EP data Set the COMPARE value 2 147 483 648 2 147 483 647 Return None Example i8092MF_SET_COMPARE cardNo AXIS X 0 1 5000 Set the comparison function
137. rdNo c1 c2 fp1 1 2 lexecute the 2 axis CW circular motion long c1 300 long c2 0 int sv 100 int v 3000 int a 125 int d 12 i8092MF_SET_MAX_V cardNo AXIS XY 8000 i8092MF VECTOR SPEED cardNo 6 2 axis circular motion using an asymmetric T curve velocity profile i8092MF_SET_VSV cardNo sv liset the starting vector speed to sv PPS i8092MF SET VV cardNo v liset vector speed to v PPS 8092 SET VA cardNo liset acceleration to a PPS Sec i18092MF SET VD cardNo liset the deceleration to d PPS Sec 8092 SET VAO cardNo 0 liset the value of remaining offset pulses to 0 i8092MF CIRCLE CW cardNo c1 c2 llexecute the 2 axis CW circular motion Note Relevant parameters should be set before issuing the motion command ICPDAS 54 8092F Software User Manual 6 2 2 Setting the Vector Starting Speed void i8092MF_SET_VSV BYTE cardNo DWORD data Description This function sets the starting speed of the principle X axis for the interpolation motion Parameters cardNo Module number data The vector starting speed value in PPS Return None Example i8092MF_SET_VSV 1 1000 liset the starting speed of the axis 1 for the interpolation motion module 1 to 1000 PPS 6 2 3 Setting the Vector Speed void i8092MF_SET_VV BYTE cardNo DWORD data Description This function sets the vector speed of the interpolation motion Users do not need to assign an
138. reading RR6 H D15 D14 D13 D12 D11 D10 D9 D8 RD15 RD14 RD13 RD12 RD11 RD10 RD9 RDS L D7 D6 D5 D4 D3 D2 D1 DO RD7 RD6 RDS RD4 RDS RD2 RD1 RDO L D7 D5 D4 D3 D2 D1 DO RD23 RD22 RD21 RD20 RD18 RD17 RD16 The data is binary formatted 2 s complement is for negatives H D15 D14 D13 D12 D11 D10 D9 D8 RD31 RD29 RD28 RD27 RD26 RD25 RD24 ICPDAS 195 I 8092F Software User Manual
139. rking coordinate system The X axis necessarily have to be the first axis Different modes need different settings Please refer to the mode definitions Parameters cardNo nMode Return None Example Module number 0 gt 2 axis linear or circular motion at a constant vector speed Set VV and VSV and VV VSV 1 gt 2 axis linear motion using a symmetric T curve velocity profile set VSV VV VA and VAO 2 gt 2 axis linear motion using a symmetric S curve velocity profile set VSV VV VK and VAO 3 gt 2 axis linear motion using an asymmetric T curve velocity profile set VSV VV VA VD and VAO 4 gt 2 axis linear motion using an asymmetric S curve velocity profile set VSV VV VK VL and VAO 5 gt 2 axis circular motion using a symmetric T curve velocity profile set VSV VV VA and VAO 6 gt 2 axis circular motion using an asymmetric T curve velocity profile set VSV VV VA VD and VAO BYTE cardNo 1 select module 1 i8092MF_SET_MAX_V cardNo AXIS_XY 20000 liset the maximum speed of all axes to 20K PPS i8092MF_VECTOR_SPEED cardNo 0 liset module 1 to perform 2 axis linear or circular motion llat a constant vector speed i8092MF SET VSV cardNo 1000 ICPDAS 51 8092F Software User Manual ICPDAS liset the starting vector speed to 1000 PPS i8092MF_SET_VV cardNo 1000 set the vector speed to 1000 PPS i8092MF_LINE_2D 1 12000 10000 llexecute the 2 axis linear interpolation
140. ror NO No errors Example i8092MF_ARC_CW 1 5000 5000 10000 10000 lssues a command to perform a circular motion an arc Ilin a CW direction Please refer to the following figure Axis 2 LU cem Point 0 0 e 7 j N Center point 5000 5000 Y Finish Point 10000 10000 ta 2 axis circular motion in a CW direction ICPDAS 61 8092F Software User Manual e BYTE i8092MF_ARC_CCW BYTE cardNo long cp1 long cp2 long fp1 long fp2 Description This function execute a 2 axis circular interpolation motion in a counter clockwise CCW direction Parameters cardNo Module number cpt The relative position of the center to the current position of X axis in pulses 8 388 607 8 388 607 cp2 The relative position of the center to the current position of Y axis in pulses 8 388 607 8 388 607 fpt The displacement of the X axis in pulses 8 388 607 8 388 607 fp2 Displacement of the Y axis in pulses 8 388 607 8 388 607 Return YES An error has occurred Use the i8092MF GET ERROR CODEY function to identify the errors NO No errors Example i8092MF_ARC_CCW 1 5000 5000 10000 10000 IIlssues a command to perform a circular motion an arc Ilin CCW direction Refer to the following figure Start Point 0 0 Center point 5000 5000 X Finish Point 10000 10000 2 axis circular motion in a CCW d
141. rpolation User can use the linear and circular interpolation to implement a specific curve motion There are two ways to implement polling and interrupt Fig A 48 shows an example of executing continuous beginning at point 0 0 form segment 1 2 3 to the segment 8 In segment 1 3 5 and 7 the linear interpolation will be executed in segment 2 4 6 and 8 the circular interpolation will be executed and the track is a quadrant circle with radius 1500 The interpolation driving is at a constant vector speed 1500 PPS Y4sog 1500 0 0 4500 6000 Fig A 36 Continuous interpolation ICPDAS 151 8092F Software User Manual Demo Program Constant Speed Continuous Interpolation Parameters CradNo 1 i8092_SET_R cardNo Card cardNo ax1 800000 i8092_SET_R cardNo Card cardNo ax2 800000 1414L 1000L i8092_MOTION_TYPE cardNo 0x3 1 2 axes constant vector speed 18092 Card cardNo ax1 1500 II Set V SV i8092 LINE 2D cardNo 4500 0 II Segment 1 i8092 NEXT WAIT cardNo Wait next command i8092 ARC CCW cardNo 0 1500 1500 1500 II Segment 2 i8092 NEXT WAlT cardNo Wait next command i8092 LINE 2D cardNo 0 1500 Il Segment 3 i8092_NEXT_WAIT cardNo 1 Wait next command i8092_ARC_CCW cardNo 1500 0 1500 1500 Segment 4 i8092_NEXT_WAIT cardNo Wait next command i8092 LINE 2D cardNo 4500 0 Il Segment 5 i8092 NEXT WAIT cardNo II Wait next command
142. s dwdata input value for logic position counter Data range 2 2 Example Clear the logic position counter value i8092 SET LP 1 0x1 0 i8092 SET LP 1 0x2 0 ICPDAS 128 8092F Software User Manual i8092 SET EP Format void 18092 SET EP unsigned char CardNo WORD axis long dwdata Function Set the logic position counter it can be set zero to reset the counter values Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 only set for single axis dwdata input value for real position counter Data range 2 2 Example Clear the logic position counter value 18092 SET 1 0 1 0 18092 SET 1 0x2 0 long 18092 LP Format long i8092_GET_LP unsigned char CardNo WORD axis Function The function can read he current value of logic position counter and it will be set in read registers RR6 and RR7 Parameters cardNo is the board number axis is the motion axis code as shows in Table 2 1 only set for single axis Example Read the logic position counter for the X Y axes i8092_GET_LP 1 0x1 18092 GET LP 1 0x2 ICPDAS 129 8092F Software User Manual i8092 GET EP Format long i8092 GET EP unsigned char CardNo WORD axis Function The function can read the current value of real position counter and it will be set in read registers RR6 and RR7 Parameters cardNo is the board number axis is the motion axis code
143. ses Speed Offset Pulse Initial Speed time Offset for Deceleration ICPDAS 48 8092F Software User Manual 6 1 8 Fixed Pulse Output BYTE i8092MF_FIXED_MOVE BYTE cardNo WORD axis long data Description Command a point to point motion for several independent axes Parameters cardNo Module number axis Axis Please refer to Table 2 1 The axis can be either X and Y data Pulses 268 435 455 268 435 455 Return YES Some errors happen Use i8092MF_GET_ERROR_CODE to identify the errors NO No error Example ICPDAS BYTE cardNo 1 select module 1 i8092MF_SET_MAX_V cardNo AXIS XY 20000 liset the max velocity of all axes on module 1 to be 20K PPS i80922MF NORMAL SPEED cardNo AXIS XY 0 liset the speed profile of all axes on module 1 to be symmetric T curve i8092MF SET V cardNo AXIS XY 2000 liset the speed of all axes on module 1 to be 2000 PPS i8092MF SET A cardNo AXIS XY 1000 I set the acceleration value of all axes on module 1 to be 1000 PPS S i8092MF SET SV cardNo AXIS XY 2000 liset the start velocity of all axes on module 1 to be 2000 PPS i8092MF SET AO cardNo AXIS XY 9 liset the remaining offset pulses to be 9 PPS i8092MF FIXED MOVE cardNo AXIS XY 10000 II move 10000 Pulses for each axis on module 1 49 8092F Software User Manual 6 1 9 Continuous Pulse Output e BYTE i8092MF_CONTINUE_MOVE BYTE cardNo WORD axis long data Description This function issues a
144. sv 100 set the starting speed to 100 PPS int v 3000 set the speed to 3000 PPS int a 2000 set the acceleration to 2000 PPS Sec int d 2000 set the deceleration to 2000 PPS Sec i8092MF_SET_MAX_V cardNo AXIS_XY 20000 liset the maximum speed to 20K PPS BYTE nType 10 1 2 1 2 1 7 0 0 0 0 long 1 10 0 10000 0 0 0 0 0 0 0 0 long 2 10 0 0 0 10000 0 0 0 0 0 0 long 1 10 10000 10000 1000 10000 31000 0 0 0 0 0 long 2 10 10000 10000 0 10000 10000 0 0 0 0 0 data of the required segments in arrays i8092MF_CONTIUNE_INTP cardNo AXIS X AXIS Y 0 1 sv v a d nType cp1 cp2 fp1 fp2 llexecute the 2 axis continuous interpolation deceleration point will be calculated automatically this example the final position of this motion will return to the starting point 6 3 4 2 Axis Ratio Motion e BYTE i8092MF RATIO INITIAL BYTE cardNo DWORD SV DWORD V DWORD A float ratio Description This function sets the Initial values for ratio motion motion in ratio using a symmetric T curve speed profile However it is a software macro function therefore it requires CPU resource to run this function Parameters cardNo Module number SV Set the value for the starting speed in PPS V Set the value for the vector speed in PPS A Set the acceleration value in PPS Sec ratio Set the ratio value between the two assigned axes ICPDAS 69
145. the interrupt Slot Interrupt Done Slot1 Get the interrupt status 18092 GET RR3 CardNo AXIS X Disable the interrupt factor i8092MF INTFACTOR DISABLE CardNo AXIS X Close the interrupt Slot Interrupt Close Slot1 break case WAIT TIMEOUT break case WAIT FAILED break return 1 Note Please refer the three functions Slot_Register_Interrupt BYTE Slot Slot_Interrupt_Done BYTE Slot Slot_Interrupt_Close BYTE Slot in the WinConSDK 6 4 2 Interrupt Disabled void i8092MF INTFACTOR DISABLE BYTE cardNo WORD axis Description This function disables the interrupt factors Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 ICPDAS 76 8092F Software User Manual Return None Example Please refer to 6 4 1 6 4 3 Read the Interrupt Occurrence WORD i8092MF_GET_RR3 BYTE cardNo WORD axis Description Read the RR3 register that reflects the occurrence of Interrupt Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 Return The content of RR3 register RR3 Value Once the value o flogic real position counter oe iid is larger than that of COMP register Once the value o flogic real position counter 0x004 56 is smaller than that of register 0x008 P lt C Once the value flogic real position counter is smaller than that of COMP register Once the value o flogic real position
146. the nEXPP signal is falling to the Low level from the Hi level the direction fixed driving starts once the nEXPM signal is falling to the Low level from the Hi level In manual pulsar mode fixed driving in the direction is activated at f the nEXPP signal when the nEXPM signal is at the Low level The fixed driving is activated at of the nEXPP signal when the nEXPM signal is at the Low level Prevent triangle waveforms during fixed driving at the trapezoidal AVTRI acceleration deceleration 0 disable 1 enable Note WR3 D5 bit should be reset to 0 when continuous driving is performed after fixed driving Enable the variable ring function of logical position and real position VRING counter 0 disable 1 enable Driving status outputting or used as general purpose output signals OUTSL nOUT7 0 D5 D6 D7 http www icpdas com 187 FEA X BXE V2 0 0 nOUT7 0 general purpose output The setting of each bit in WR4 register will be output to nOUT7 0 1 nOUT7 0 driving status output see the table below Signal Name nOUTO ACASND nOUT1 ACDSND nOUT2 CMPP nOUT3 CMPM nOUT4 DRIVE nOUT5 ASND nOUT6 CNST nOUT7 DSND Output Description When acceleration or deceleration of S curve acceleration deceleration increases the level becomes Hi When acceleration or deceleration of S curve acceleration deceleration decreases the level becomes Hi Hi if logical real position counter 2 regist
147. ting the active level of the encoder Z phase signal IN2 nLevel 0 Low active nLevel 1 Hi active Example i8092 IN2 LEVEL 1 Oxf 0 i8092 SET HV Format void 18092 SET HV unsigned char cardNo WORD axis WORD data Function Set he home search speed HV Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 data is the home search speed value Data range 1 8000 Example Set home search speed 1000 PPS i8092 SET HV 1 Oxf 1000 ICPDAS 161 8092F Software User Manual i8092 HOME STEP1 Format void 18092 HOME STEP1 unsigned char cardNo WORD axis WORD nType WORD nDir Function Use the near home signal INO to operate the home search Parameters cardNo is the board number axis is the motion axis code name nType is the specified the near home signal INO executed or not nType 0 non execution nType 1 execution nDir is the operation direction of the step nDir 0 positive nDir 1 negative Example Set the step 1 enabled and negative direction of the home search i8092 HOME STEP1 1 Oxf 1 1 i8092 HOME STEP2 Format void 18092 HOME STEP2 unsigned char cardNo WORD axis WORD nType WORD nDir Function Use the home signal IN1 to operate the home search Parameters cardNo is the board number axis is the motion axis code name nType is the specified the home signal IN1 executed or not nType 0 non execution nType 1 executio
148. tion module 1 ICPDAS 64 8092F Software User Manual 6 3 Continuous Interpolation If it is broken and stopped please solve it refer in section 6 5 5 6 3 1 2 Axis Rectangular Motion e BYTE i8092MF RECTANGLE BYTE cardNo WORD nAcc WORD Sp WORD nDir long Lp long Wp long Rp DWORD RSV DWORD RV DWORD RA DWORD AD Description Continuous interpolation will be performed to create a rectangular motion which is formed by 4 lines and 4 arcs The length of each side can be changed The radius of each arc is the same and it can also be changed The deceleration point will be calculated automatically This is a command macro command that appears in various motion applications However it is a software macro function therefore it requires CPU resource to run this function Parameters cardNo Module number nAcc 0 constant vector speed interpolation mode 1 gt symmetric T curve Acc Dec interpolation mode Sp Start point 0 7 0 Sp7 are defined in the following figure nDir Direction of movement 0 CCW 1 CW Lp Length in Pulses 1 8 388 607 Wp Width in Pulses 1 8 388 607 Rp Radius of each in pulses 1 8 388 607 RSV Starting speed in PPS RV Vector speed in PPS RA Acceleration PPS Sec RD Deceleration of the last segment in PPS Sec Return YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error NO No errors Example BYTE cardNo 1 select modu
149. tion of position counter ring maximum value 9999 Note 1 The variable ring function enable disable is set for each axis however a logical position counter and a real position counter cannot be enabled disables individually 2 If a variable ring function is enabled a software limit function cannot be used ICPDAS 132 8092F Software User Manual i8092_AVTRI_ENABLE Format void 18092 AVTRI ENABLE BYTE cardNo WORD axis Function This function prevents a triangle form in linear acceleration T curve fixed pulse driving even if the number of output pulses is low Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example 18092 AVTRI ENABLE 1 AXIS X liset the X axis of module 1 not to generate a triangle form in its speed profile 18092 AVTRI DISABLE Format void 18092 AVTRI DISABLE BYTE cardNo WORD axis Function This function disable the function that prevents a triangle form in linear acceleration T curve fixed pulse driving even if the number of output pulses is low Parameters cardNo is the board number axis is the motion axis code name as shows in Table 2 1 Example i8092 AVTRI DISABLE 1 AXIS X llenable the X axis of module 1 to generate a triangle form in its IIspeed profile if the pulse number for output is too low ICPDAS 133 I 8092F Software User Manual A 7 4 Basic Motion Command Functions The basic motion commands of 1 8092 are listed
150. ue defined by i8092MF SET MAX V function The maximum available acceleration rate value is MAX V 781 25 The minimum acceleration value is MAX V 0 0119211 and all other acceleration values are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor Note since the DWORD can not represent the maximum value therefore this value is given by dividing the desired value by 10 Return None Example i8092MF SET MAX V 1 AXIS X 20000 liset the maximum speed value of the X axis as 20 000 PPS IItherefore do not set any jerk value that is larger than 1 20 000 781 25 PPS sec 2 And 20 000 781 25 15 625 000 i8092MF SET K 1 AXIS X 1000 liset the acceleration rate value of the X axis on module 1 to 1 000 10 10 000 PPS Sec 2 ICPDAS 47 I 8092F Software User Manual 6 1 7 Setting the Value of the Remaining Offset Pulses void i8092MF_SET_AO BYTE cardNo WORD axis short int data Description This function sets the number of remaining offset pulses for the assigned axes Please refer to the figure below for a definition of the remaining offset pulse value Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 data The number of remaining offset pulses 32 768 32 767 Return None Example i8092MF_SET_AO 1 AXIS_X 200 liset the number of remaining offset pulses for the X axis fmodule 1 to 200 pul
151. ues are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor Note since the DWORD can not represent the maximum value therefore this value is given by dividing the desired value by 10 Return None Example i8092MF SET MAX V 1 AXIS X 20000 liset the maximum speed value of the X axis as 20 000 PPS IItherefore do not set any jerk value that is larger than 1 20 000 781 25 PPS sec 2 And 20 000 781 25 15 625 000 i8092MF SET VK 1 10000 liset the acceleration rate of the interpolation motion on module I 1 to 10 000 PPS Sec 2 ICPDAS 58 I 8092F Software User Manual 6 2 7 Setting the Number of the Remaining Offset Pulses void i8092MF_SET_VAO BYTE cardNo short int data Description Setting this value will cause the motion control chip to start deceleration earlier The remaining offset pulses will be completed at low speed to allow the controller to stop immediately when the offset pulse value has been reached Please refer to the figure below for more information Parameters cardNo Module number data The number of remaining offset pulses 32 768 32 767 Return None Example i8092MF_SET_VAO 1 200 liset the number of remaining offset pulse value on module 1 to 200 Speed Offset Pulse Initial Speed time Offset for Deceleration ICPDAS 59 I 8092F Software User Manual 6 2 8 2 Axis Linear Interpolation Motion
152. unction Get the value of SM7 register Parameters cardNo board number axis axis or axes Please refer to Table A2 1 Example Get the value of SM7 of X axis on board 1 WORD sm7Data ICPDAS 171 8092F Software User Manual sm7Data 8092 GET SM7 1 0 1 Demo Program When the X axis is passing through the position 10000 the Y axis starts direction fixed pulse drive Parameters cardNo 1 ProvocativePulse 15000 ActivePulse 30000 TotalAxis 0x3 AXIS_XY ProvocativeAxis 0x1 AXIS_X ActiveAxis 0x2 AXIS_Y CompValue 10000 Set parameters s for total axes or you can also set for individual axis i8092 SET SV cardNo TotalAxis 100 i8092 SET V cardNo TotalAxis 3000 i8092_ SET A cardNo TotalAxis 160 Set output pulse for the provocative axis 18092 SET PULSE cardNo ProvocativeAxis ProvocativePulse Set output pulse for active axis i8092 SET PULSE cardNo ActiveAxis ActivePulse Set a boundary condition COMP in the provocative axis i8092 SET CP cardNo ProvocativeAxis CompValue Disable the software limit for i 0 i lt 4 i i8092_SET_WR2 cardNo 1 i Reg cardNo WR2 i amp 0x0003 II Provocative factor gt i8092_SYNC_MODE cardNo ProvocativeAxis 0x2001 0x0 i8092 COMMAND cardNo ProvocativeAxis 0x20 II Action of the active axis direction fixed pulse drive i8092 SYNC MODE cardNo ActiveAxis 0 0 0x0001 i8092_COMMAND cardNo ActiveAxis 0x20
153. use Delay 500 i8092 SET LP cardNo axis 0 Clear LP counter i8092 SET EP cardNo axis 0 Clear EP counter 18092 HOME STEP2 cardNo Oxf 1 1 Set Step2 is executed and negative direction for 2 axes ICPDAS 167 8092F Software User Manual a Example of home search using a home signal IN1 only B Operation Input signal and logical level Search direction Search speed Step 1 Near home signal INO is active low 20000 PPS Step 2 Home signal IN1 signal active low 500 PPS Step 3 Not executed Step 4 35000 pulse offset 20000 PPS MCX314As Over Run Limit in the INO IN1 Search Direction Active Section Search Step 1 Direction gt Step 2 Fig A 40 Hardware disposition for home operation example 2 Demo Program Example of home search using a home signal IN1 only Parameters cardNo 1 motion axis 0xf AXIS_ALL i8092 SET R cardNo Oxf 800000 Set Multiple 10 18092 HOME STEP1 cardNo Oxf 1 1 Set Step1 is executed and negative direction for 2 axes 18092 HOME STEP2 cardNo Oxf 1 1 Set Step2 is executed and negative direction for 2 axes 18092 HOME STEP3 cardNo Oxf 0 0 Set Step3 is non executed 18092 HOME STEP4 cardNo Oxf 1 0 Set Step4 is executed and positive direction for 2 axes i8092 SET SV cardNo Oxf 500 Set start velocity 500 PPS i8092_SET_V cardNo Oxf 2000 Set drive velocity 2000 PPS
154. version of current i8092 library Parameters cardNo Module number Return Version code including information of the year and the month 0x0000 0x9999 Example WORD VER No VER _ 18092 GET VERSION Read the version code of i8092 dll Remark If the return value is 0x0607 06 the year is 2006 07 the month is July ICPDAS 11 8092F Software User Manual 2 3 Resetting Module void i8092MF_RESET_CARD BYTE cardNo Description This function resets module using a software command Parameters cardNo Module number Return None Example i8092MF_RESET_CARD 1 Reset module 1 2 4 Pulse Output Mode Setting void i8092MF_SET_PULSE_MODE BYTE cardNo WORD axis BYTE nMode Description This function sets the pulse output mode as either CW CCW or PULSE DIR for the assigned axes and their direction definition Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nMode Assigned mode Please refer to Table 2 2 Return None Example i8092_SET_PULSE_MODE 1 AXIS XYZ 2 liset the pulse mode of X Y and Z axes as mode 2 i8092 SET PULSE MODE 1 AXIS 3 the pulse mode of U axis as mode 3 ICPDAS 12 8092F Software User Manual Table 2 2 List of pulse output modes Pulse output signals CW CCW o CW rising edge CCW rising edge CW falling edge CCW falling edge DIR PULSE rising edge LOW dir HIGH dir DIR
155. y axes on this function Parameters cardNo Module number data The vector speed value in PPS Return None Example i8092MF_SET_VV 1 120000 liset the vector speed of the interpolation on module 1 lito 120000 PPS ICPDAS 55 I 8092F Software User Manual 6 2 4 Setting the Vector Acceleration void i8092MF_SET_VA BYTE cardNo DWORD data Description This function sets the vector acceleration for interpolation motion Users do not have to assign any axes on this funciton Parameters cardNo Module number data The vector acceleration value in PPS Sec The units are PPS Sec This value is related to the maximum speed value defined by i8092MF SET MAX V function The maximum available acceleration value is MAX V 125 The minimum acceleration value is MAX V 64 and all other acceleration values are the integral multipliers of this value The practical value for application depends on the capability of the motor drive and motor Return None Example i8092MF SET MAX V 1 AXIS X 20000 liset the maximum speed value of the X axis as 20 000 PPS I therefore do not set any acceleration value that is larger than 20 000 125 PPS sec And 20 000 125 2 500 000 i8092MF_SET_VA 1 100000 liset the vector acceleration of the interpolation motion module 1 to 100K PPS Sec ICPDAS 56 I 8092F Software User Manual 6 2 5 Setting the Vector Deceleration Value void i8092MF_SET_VD BYTE cardNo DWORD d
156. y its corresponding module number Parameters cardNo Module number slot Slot number for 1 8000 0 7 for WinCon 8000 1 7 Return YES Normal NO Abnormal Example for WinCon 8000 ICPDAS 9 8092F Software User Manual liset each module number the same as the slot number respectively I slot1 slot7 BYTE cardNo BYTE slot int Found 0 for slot 1 slot lt 8 slot cardNo slot if 18092 REGISTRATION cardNo slot YES slot number begins from 1 a module is found then it is registered as its slot number i8092MF RESET CARD cardNo Found if Found 0 llif Wincon cannot find any 1 8092 module please add codes to handle the exception here return for 8000 set the module number the same as the slot number respectively I slot1 slot7 BYTE cardNo BYTE slot int Found 0 for slot 0 slot lt 8 slot cardNo slot 1 slot number begins from 0 but module number begin from 1 if 18092 REGISTRATION cardNo slot YES lif a module is found then it is registered by giving a number i8092MF RESET CARD cardNo Found if Found 0 llif Wincon cannot find any I 8092F module please add codes to handle the exception here return ICPDAS 10 8092F Software User Manual e WORD i8092MF GET VERSION void Description Read the
157. y to accept the next interpolation command If D9 is 0 the host CPU is not able to write the next interpolation command into MCX312 The D9 will become 1 only when the present command is executed MCX312 will not accept the next command and the D9 is 0 if the present command has not been executed So the standard procedure of continuous interpolation is first to write and enable the interpolation data and command then check if D9 of RRO is 1 or 0 And then repeat writing commands and checking D9 The flow chart is shown at the right side The Ist node interpolation write in No RRO D9 0 Yes RRO D9 1 Y The 2nd node interpolation write in Yes i No No RR0 D9 0 iow to write in next data Yes RRO D9 1 The 3rd node interpolation write in v Error message functions Fig A 28 Continuous Interpolation by Polling Method ICPDAS 109 I 8092F Software User Manual Interrupt D14 of register WR5 is used for enable or disable the interrupt during the continuous interpolation After setting D14 of register WR5 to 1 the interrupt occurs Pin INTN of MCX314As will be on the Low level to interrupt the host CPU when D9 of register RRO become 1 The INTN will be on the Hi level if the host CPU writes the next interpolation command to 8092F If the interrupt clear command 3Dh is written to command register the INTN signal will return to high Z
158. ype is engaged and directions pulses are output through the output signal nPP PLS and nPM DIR is for direction signals Note Please refer to Chapter 13 2 and 13 3 for the output timing of pulse signal nPLS and direction signal nDIR when 1 pulse 1 direction type is engaged D7 PLS L Setting logical level of driving pulses 0 positive logical level 1 negative logical level su NN MINE Positive Logical Level Negative Logical Level Setting logical level of the direction nPM DIR output signal for D8 DIR L 1 pulse mode DIR L D8 0 Low Hi 1 Hi Low D9 PINMD Setting the type of encoder input signals nECA PPIN and nECB PMIN 0 quadrature pulse input type 1 Up Down pulse input type Real position counter will count up or down when encoder input signal is triggered When quadrature pulse input type is engaged the count up will happen if the positive logical level pulses are input to phase A the count down will happen if the positive logical level pulses are input to phase B So it will count up and down when these 2 signals go up 1 and down 1 nECA 1 1 nECB i Count Up 1 Count Down When Up Down pulse input type is engaged nECA PPIN is for count up input and nECB PMIN is for count down input So it will count up when the positive pulses go up 1 D11 10 PIND1 0 The division setting for quadrature encoder input 011 D10 Division 0 0 1 1 0 1 1 2 1 0 1

Download Pdf Manuals

image

Related Search

Related Contents

BLANCO METRA 5 S  Manual del Usuario  BOWIE DICK Test quotidien de pénétration de vapeur Dans les    GEP 089 MOD - University of Newcastle  Samsung CLP-500 Brugervejledning  Descargar - Club Nissan ARG  新社会人応援キャンペーン  Telex Plasma Series Speaker User Manual  Notice d`instruction  

Copyright © All rights reserved.
Failed to retrieve file