background image

ICPDAS

             

                                                                                 

       

I-8092F Software User Manual 

113

A.7 I-8092F Function Library 

 

We develop the simple but powerful high-level functions set application programming 

interface (API) by using the specific command and data registers 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.     
 

WR0 Register 

D15 D14~D12 D11 D10  D9  D8  D7~D0 

RESET  

  Y 

 

 

Axis 

XY 

Code 0x1  0x2 

0x3 

Name AXIS_X

AXIS_Y

AXIS_XY

 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Summary of Contents for I-8092F

Page 1: ...ICPDAS I 8092F Software User Manual 1 2 axis Motion Control Module User Manual I 8092F Version 2 3 Macro Function Library in C for WinCon and I 8000 series PAC controllers...

Page 2: ...mation 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 parti...

Page 3: ...the Servo Driver ON OFF 18 2 13 Setting the SERVO ALARM Function 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 Co...

Page 4: ...Output 50 6 2 Interpolation Commands 51 6 2 1 Setting the Speed and Acc Dec Mode for Interpolation 51 6 2 2 Setting the Vector Starting Speed 55 6 2 3 Setting the Vector Speed 55 6 2 4 Setting the Vec...

Page 5: ...2 Trapezoidal Driving Asymmetric 96 A 3 3 Triangle Prevention 98 A 3 4 S curve Acceleration Deceleration Symmetry 99 A 4 Pulse Output Commands 103 A 4 1 2 Axes Interpolation 103 A 4 2 Circular Interpo...

Page 6: ...r1 WR1 182 B 3 Mode Register2 WR2 184 B 4 Mode Register3 WR3 186 B 5 Output Register WR4 189 B 7 Data Register WR6 WR7 190 B 8 Main Status Register RR0 190 B 9 Status Register 1 RR1 191 B 10 Status Re...

Page 7: ...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 Basic functions are suitable for those who are familiar wit...

Page 8: ...unctions 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...

Page 9: ...gnments 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 BYTE i8092MF_REGISTRATION BYTE cardNo BYTE slot De...

Page 10: ...d 0 if Wincon cannot find any I 8092F module please add codes to handle the exception here return for I 8000 set the module number the same as the slot number respectively slot1 slot7 BYTE cardNo BYTE...

Page 11: ...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_No i8092MF_GET_VERSION Read the versi...

Page 12: ...8092MF_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 Parameter...

Page 13: ...S 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 whic...

Page 14: ...RD 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...

Page 15: ...p Return None Example i8092MF_LIMITSTOP_MODE 1 AXIS_X 0 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 i8092MF_SET_NHO...

Page 16: ...XY 1 set 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 Desc...

Page 17: ...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 i8092MF_SET_ENCODER BYTE cardNo WORD axis BYTE nMo...

Page 18: ...mber axis Axis or axes Please refer to Table 2 1 nDir Encoder input direction 0 positive dir 1 negative dir Return None Example i8092MF_SET_EN_DIR 1 AXIS_XY 0 set the encoder input direction to positi...

Page 19: ...n 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...

Page 20: ...nput nlEdge Set the trigger level 0 low active 1 high active Return None Example i8092MF_SET_INPOS 1 AXIS_X 1 0 enable the INPOS function of the X axis on module 1 and set it to be low active Note Ple...

Page 21: ...mSEC 4 1 792mSEC 2 048mSEC 5 3 584mSEC 4 096mSEC 6 7 168mSEC 8 192mSEC 7 14 336mSEC 16 384mSEC Return None Example i8092MF_SET_FILTER 1 AXIS_XY 21 3 set the filter time constants of X and Y axes as 1...

Page 22: ...e X axis of module 1 to be a ring counter The encoder values will be 0 to 9999 Max ring encoder value 9999 The encoder value is 0 to 9999 When the counter value reach 9999 an adding pulse will cause t...

Page 23: ...le number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF_ AVTRI_ENABLE 1 AXIS_X set the X axis of module 1 not to generate a triangle form in its speed profile void i8092MF_AV...

Page 24: ...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 Each time the handwheel...

Page 25: ...put the falling edge of the 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 N...

Page 26: ...ed 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 ax...

Page 27: ...dNo WORD 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...

Page 28: ...tion This function loads the pre defined configuration file and set the target I8092 module automatically The configuration file is generated by the PACEzGo Parameters cardNo Module number Return 0 su...

Page 29: ...147 483 648 2 147 483 647 Return None Example i8092MF_SET_LP 1 AXIS_XY 0 Set the LP for the X Y Z and U axes of module 1 as 0 which means that all LP counters on module 1 will be cleared long i8092MF_...

Page 30: ...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 card...

Page 31: ...Example DWORD dwdata dwdata i8092MF_GET_CV 1 AXIS_X reads 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 Thi...

Page 32: ...s engaged or not 3 EMERGENCY Check whether EMG signal is on or not 4 ALARM Check the ALARM input signal 5 HOME Check the HOME input signal 6 NHOME Check the Near HOME input signal 7 IN3 Check the IN3...

Page 33: ...bit 2 Z PHASE signal bit 3 EMG signal Only AXIS_X bit 4 EXP signal bit 5 EXP signal bit 6 READY INPOS signal bit 7 ALARM signal bit 8 N A bit 9 N A bit 10 N A bit 11 IN3 signal bit 12 N A bit 13 N A...

Page 34: ...following example to clear ERROR NO No error EXAMPLE If i8092MF_GET_ERROR 1 YES read module 1 and ERROR is found WORD ErrorCode_X i8092MF_GET_ERROR_CODE 1 AXIS_X WORD ErrorCode_Y i8092MF_GET_ERROR_CO...

Page 35: ...se hardware limit is asserted 16 ALARM Occurs when the ALARM is asserted 32 EMERGENCY Occurs when the EMG is asserted 64 Reserved Reserved 128 HOME Occurs when both Z phase and HOME are asserted 256 r...

Page 36: ...ns 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 num...

Page 37: ...nding 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 Gro...

Page 38: ...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 fol...

Page 39: ...MF_ 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 lo...

Page 40: ...1 0x1 500 i8092MF_SET_HOME_MODE 1 0x1 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 IN0...

Page 41: ...e X axis on module 1 5 5 Waiting for the Homing sequence to be Completed BYTE i8092MF _HOME_WAIT BYTE cardNo WORD axis Description This function assigns commands to be performed while waiting for the...

Page 42: ...ode 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 Symmetric T curv...

Page 43: ...odule 1 to 200 PPS i8092MF_SET_AO cardNo AXIS_XY 9 set the number of remaining offset pulses to 9 pulses for all axes i8092MF_FIXED_MOVE cardNo AXIS_XY 10000 move all axes on module 1 for 10000 pulses...

Page 44: ...is enough Return None Example i8092MF_SET_SV 1 AXIS_X 1000 set 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...

Page 45: ...ll 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...

Page 46: ...ll 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...

Page 47: ...s 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 capabil...

Page 48: ...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 Ta...

Page 49: ...1 i8092MF_SET_MAX_V cardNo AXIS_XY 20000 set the max velocity of all axes on module 1 to be 20K PPS i8092MF_NORMAL_SPEED cardNo AXIS_XY 0 set the speed profile of all axes on module 1 to be symmetric...

Page 50: ...the i8092MF_GET_ERROR_CODE function to identify the errors NO No error Example 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 20...

Page 51: ...nt vector speed Set VV and VSV and VV VSV 1 2 axis linear motion using a symmetric T curve velocity profile set VSV VV VA and VAO 2 2 axis linear motion using a symmetric S curve velocity profile set...

Page 52: ...linear interpolation motion i8092MF_VECTOR_SPEED cardNo 2 2 axis linear motion using a symmetric S curve velocity profile i8092MF_SET_VSV cardNo 200 set the starting vector speed to 200 PPS i8092MF_SE...

Page 53: ...VK cardNo 50 set the acceleration rate to 500 PPS Sec 2 i8092MF_SET_VL cardNo 30 set the deceleration rate to 300 PPS Sec 2 i8092MF_SET_VAO cardNo 20 set the value of remaining offset pulses to 20 i80...

Page 54: ...asymmetric T curve velocity profile i8092MF_SET_VSV cardNo sv set the starting vector speed to sv PPS i8092MF_SET_VV cardNo v set vector speed to v PPS i8092MF_SET_VA cardNo a set acceleration to a PP...

Page 55: ...None Example i8092MF_SET_VSV 1 1000 set the starting speed of the axis 1 for the interpolation motion on module 1 to 1000 PPS 6 2 3 Setting the Vector Speed void i8092MF_SET_VV BYTE cardNo DWORD data...

Page 56: ...8092MF_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...

Page 57: ...um 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...

Page 58: ...cceleration 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 m...

Page 59: ...eceleration 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...

Page 60: ...Parameters cardNo Module number fp1 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...

Page 61: ...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 fp1 The displacement of the X axis in pulses 8 388 607 8 388 607...

Page 62: ...7 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 fp1 The displacement of the X axis in pulses 8 388 607 8 388 607 fp2 Displacement of...

Page 63: ...rror has occurred Use the i8092MF_GET_ERROR_CODE function to identify the errors NO No errors Example i8092MF_CIRCLE_CW 1 0 10000 execute a circular motion a complete circle in a CW direction on modul...

Page 64: ...ICPDAS I 8092F Software User Manual 64 the error NO No errors Example i8092MF_CIRCLE_CCW 1 0 10000 execute a circular motion a circle in CCW direction on module 1...

Page 65: ...d 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 const...

Page 66: ...S_Y 1 0 0 20000 10000 1000 sv v a d execute a rectangular motion on the XY plane 6 3 2 2 Axis Continuous Linear Interpolation BYTE i8092MF_LINE_2D_INITIAL BYTE cardNo DWORD VSV DWORD VV DWORD VA Descr...

Page 67: ...1 end of 2 axis linear continuous interpolation fp1 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 3...

Page 68: ...ase set VSV VV VA and VD VSV The starting speed in PPS VV Interpolation vector speed in PPS VA Acceleration in PPS Sec VD Deceleration in PPS Sec nType Maximum segment 1024 0 1023 It contains the inte...

Page 69: ...a 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 execute the 2 axis continuous interpolation The deceleration point will be calculated...

Page 70: ...data The pulse number of X axis 8 388 607 8 388 607 nDir Direction of the Y axis 0 CW 1 CCW Return YES An error has occurred Use the i8092MF_GET_ERROR_CODE function to identify the error NO No errors...

Page 71: ...ion 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 interpo...

Page 72: ...long fp2 2 i8092MF_ARC_CW BYTE cardNo long cp1 long cp2 long fp1 long fp2 3 i8092MF_ARC_CCW BYTE cardNo long cp1 long cp2 long fp1 long fp2 4 i8092MF_CIRCLE_CW BYTE cardNo long cp1 long cp2 5 i8092MF...

Page 73: ...ser Manual 73 i8092MF_MIX_2D_INITIAL cardNo 1 sv v a for loop1 0 loop1 10000 loop1 i8092MF_MIX_2D_CONTINUE cardNo 0 1 0 0 100 100 i8092MF_MIX_2D_CONTINUE cardNo 0 2 100 0 100 100 i8092MF_MIX_2D_CONTIN...

Page 74: ...s smaller than that of COMP register The COMP must be pre configired with i8092MF_SET_COMPARE please refer to Section 6 5 7 3 P C Interrupt occurs when the value of logical real position counter is sm...

Page 75: ...i8092MF_SET_MAX_V CardNo axis 20000 i8092MF_NORMAL_SPEED CardNo axis 0 i8092MF_SET_V CardNo axis 20000 i8092MF_SET_A CardNo axis 100000 i8092MF_SET_SV CardNo axis 20000 i8092MF_SET_AO CardNo axis 0 I...

Page 76: ...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 funct...

Page 77: ...r 0x004 P C Once the value o flogic real position counter is smaller than that of COMP register 0x008 P C Once the value o flogic real position counter is smaller than that of COMP register 0x010 P C...

Page 78: ...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 th...

Page 79: ...of X axis to 2 000 PPS i8092MF_SET_A cardNo AXIS_X 1000 set the acceleration of X axis to 1 000 PPS S i8092MF_SET_SV cardNo AXIS_X 2000 set the starting speed to 2 000 PPS i8092MF_SET_V cardNo AXIS_Y...

Page 80: ..._SPEED cardNo AXIS_XY 0 set the speed profile of all axes on module 1 to be symmetric T curve i8092MF_SET_V cardNo AXIS_XY 2000 set the speed of all axes on module 1 to 2000 PPS i8092MF_SET_A cardNo A...

Page 81: ...le number axis Axis or axes Please refer to Table 2 1 Return None Example i8092MF_STOP_SLOWLY 1 AXIS_XY decelerate and stop the X and Y axes void i8092MF_STOP_SUDDENLY BYTE cardNo WORD axis Descriptio...

Page 82: ...rameters 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...

Page 83: ...es Please refer to Table 2 1 Return None Example i8092MF_SSTOP_SLOWLY 1 AXIS_XY decelerate and stop the X and Y axes void i8092MF_SSTOP_SUDDENLY BYTE cardNo WORD axis Description Except for State Cont...

Page 84: ...s cardNo Module number Return None Example i8092MF_SVSTOP_SLOWLY 1 stop the interpolation of card 1 in a decelerating way void i8092MF_SVSTOP_SUDDENLY BYTE cardNo Description Except for State Control...

Page 85: ...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...

Page 86: ...functions of software limits Parameters cardNo Module number axis Axis or axes Please refer to Table 2 1 nSELECT Select the COMPARE register 0 COMP 1 COPM nTYPE Select the souece for comparison 0 Posi...

Page 87: ...ides 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 interpolatio...

Page 88: ...ommand 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 progr...

Page 89: ...ICPDAS I 8092F Software User Manual 89 Fig A 3 Pulse Direction input mode 1 Fig A 4 Pulse Direction input mode 2 Fig A 5 Pulse Direction input mode 3 Fig A 6 Pulse Direction input mode 4...

Page 90: ...l 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...

Page 91: ...Fig A 7 Fixed pulse driving Fig A 8 Changing the output pulse numbers in driving Fig A 9 Changing command during deceleration Fig A 10 Changing the lesser pulse numbers than output pulse stop Fig A 1...

Page 92: ...me 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 IN0 of each axis can be conne...

Page 93: ...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 proces...

Page 94: ...ving 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...

Page 95: ...lly 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 sho...

Page 96: ...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 where the deceleration i...

Page 97: ...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 D the following condition...

Page 98: ...eration 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...

Page 99: ...is composed of two two degree velocity curves if we set the time of the acceleration is TA Velocity equation of segment 1 2 2 TA t Ct t V 1 4 Velocity equation of segment 2 2 2 TA t t TA C V t V 1 5...

Page 100: ...owever there is the same acceleration value in the join of the three segments Velocity equation of segment 1 TS t t C t V 2 1 1 8 Velocity equation of segment 2 TS TA t TS t C t V 2 1 9 Velocity equat...

Page 101: ...pecific 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 accelerat...

Page 102: ...nd if the rate of acceleration is a then the speed at time t in acceleration region can be described as following 2 Kt t V 1 14 Therefore the total output pulse number p t from time 0 to t is the inte...

Page 103: ...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 l...

Page 104: ...nter 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...

Page 105: ...W 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 s...

Page 106: ...s 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 accelerat...

Page 107: ...tput a pulse or not depending on the bit pattern Fig A 26 Bit pattern data for X Y profile Stacking counter SC is a 2 bit counter Its value is between 0 and 3 which can be read from D14 13 of register...

Page 108: ...ern 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...

Page 109: ...ation command is finished Polling If D9 CNEXT of register RR0 is 1 MCX312 is ready to accept the next interpolation command If D9 is 0 the host CPU is not able to write the next interpolation command...

Page 110: ...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 RR0 become 1 The INTN will be on the Hi level if the host CPU writes...

Page 111: ...ne return the operation origin I 8092F provide the functions that automatically executes a home search sequence such as high speed near home search low speed home search encoder Z phase search offset...

Page 112: ...ICPDAS I 8092F Software User Manual 112 A 6 Interrupt Control A 6 1 Interrupt for Independent axis A 6 2 Interrupt for Interpolation...

Page 113: ...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...

Page 114: ...e interpolation register WR5 setting i8092_GET_RR0 The main status register RR0 getting i8092_GET_RR1 The status register 1 RR1 getting i8092_GET_RR2 The status register 2 RR2 getting i8092_GET_RR3 Th...

Page 115: ...ecimal value setting in the WR1 register Example Set the X axis s IN0 signal enabled and Hi active i8092_SET_WR1 1 0x1 0x0003 i8092_SET_WR2 Format void i8092_SET_WR2 unsigned char cardNo WORD axis WOR...

Page 116: ...ecimal 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 i8092_SET_WR4 unsigned char cardNo WORD data Functi...

Page 117: ...ws 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 0xf 0x0300 i8092_GET_RR0 Format void i8092_GET_R...

Page 118: ...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_GET_RR2 Format void i8092_GET_RR2 unsigned char cardNo WORD axis Function...

Page 119: ...gister RR3 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_RR0 1 0x1 i8092_GET_RR4 Format void i8092_GET_RR4 u...

Page 120: ...ftware User Manual 120 i8092_GET_RR5 Format void i8092_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...

Page 121: ..._OFF_flag 0 Define movement mode define ACCMODE 0 define CONST2 1 define CONST3 3 Interrupt factor define D_END 0x8000 define C_STA 0X4000 define C_END 0x2000 define CP_GE 0x1000 define CP_L 0x0800 de...

Page 122: ...PULSE_MODE Setting the ouput Pulse mode i8092_SET_R Setting the parameter determining the multiple of drive speed acceleration deceleration and jerk i8092_GET_R Getting the global variable i8092_HLMTP...

Page 123: ...ULSE HIGH Example It sets that choosing all axes with CW CCW Dir mode i8092_SET_PULSE_MODE 1 0xf 2 i8092_SET_R Format void i8092_SET_R unsigned char cardNo WORD axis DWORD data Function R means Range...

Page 124: ...P_LEVEL i8092_HLMTM_LEVEL Format void i8092_HLMTP_LEVEL unsigned char cardNo WORD axis WORD nLevel void i8092_HLMTM_LEVEL unsigned char cardNo WORD axis WORD nLevel Function Set the logical level of d...

Page 125: ...ion 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 i8092_COMPA...

Page 126: ...rameters 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_EP 1 0x3 i8092_RESET_CARD Format void i8092_RES...

Page 127: ...nting range is between 231 231 Table A 4 Motion Status Management Functions Function Name Description i8092_SET_LP The logic position counter setting i8092_SET_EP The Real position counter setting i80...

Page 128: ...s 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 f...

Page 129: ...for real position counter Data range 231 231 Example Clear the logic position counter value i8092_SET_EP 1 0x1 0 i8092_SET_EP 1 0x2 0 long i8092_GET_LP Format long i8092_GET_LP unsigned char CardNo W...

Page 130: ...r for the X Y axes i8092_GET_EP 1 0x1 i8092_GET_EP 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...

Page 131: ...current acceleration for the X Y axes i8092_READ_CA 1 0x1 i8092_READ_CA 1 0x2 i8092_SET_CP i8092_SET_CM Format void i8092_SET_CP unsigned char CardNo WORD axis long dwdata void i8092_SET_CM unsigned c...

Page 132: ...motion axis code name as shows in Table 2 1 nVRing is the value of the COMP COMP registers Data range 231 231 Example For instance set as follows for a rotation axis that rotates one cycle with 10000...

Page 133: ...IS_X set the X axis of module 1 not to generate a triangle form in its speed profile i8092_AVTRI_DISABLE Format void i8092_AVTRI_DISABLE BYTE cardNo WORD axis Function This function disable the functi...

Page 134: ...i8092_SET_SV Initial speed setting i8092_SET_V Drive speed setting i8092_SET_A Acceleration setting i8092_SET_D Deceleration setting i8092_SET_K Acceleration rate setting i8092_SET_L Deceleration rat...

Page 135: ...al 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 V M Parameters cardNo is the board number axis...

Page 136: ...A 125 M Parameters cardNo is the board number axis is the motion axes code name as shows in Table 2 1 data is value of acceleration it s range is 1 8000 other values are invalid Example Set the accele...

Page 137: ...eceleration 80 PPS Sec for X axis i8092_SET_D 1 0x1 80 i8092_SET_K Format void i8092_SET_K int cardNo WORD axis WORD data Function The function is setting the value of acceleraton rate jerk in a time...

Page 138: ...axis i8092_SET_L 1 0x1 625 i8092_SET_PULSE Format void i8092_SET_PULSE unsigned char cardNo WORD axis DWORD data Function The function is setting total output pulse numbers in fixed pulse driving The...

Page 139: ...is 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 0x1 200 i8092_SET_AUTODEC Format void...

Page 140: ...on 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 i8092...

Page 141: ...T_SYMMETRY Format void i8092_SET_SYMMETRY unsigned char cardNo WORD axis Function Set symmetry acceleration deceleration Parameters cardNo is the board number axis is the motion axis code name as show...

Page 142: ...92_STOP_SUDDENLY Format void i8092_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...

Page 143: ...try Parameters cardNo 1 motion axes 0x3 AXIS_XY i8092_SET_R cardNo 0x3 800000 R 800000 Multiple 10 i8092_SET_TCURVE cardNo 0x3 Set T Curve Mode i8092_SET_SYMMETRY cardNo 0x3 Set symmetry mode for X Y...

Page 144: ...S i8092_SET_V cardNo 0x3 1000 V 1000 Drive Speed 10000 PPS i8092_SET_A cardNo 0x3 800 A 800 Acceleration 1000K PPS Sec i8092_SET_D cardNo 0x3 80 D 80 Deceleration 100K PPS Sec i8092_SET_K cardNo 0x3 1...

Page 145: ...finish point setting i8092_LINE2D 2 axes linear interpolation mode i8092_SET_CENTER Circular interpolation s center setting i8092_ARC_CW CW direction arc interpolation mode i8092_ARC_CCW CCW directio...

Page 146: ...stant 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 i8092_SET_FINISH BYTE cardNo...

Page 147: ...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 lon...

Page 148: ...or axis2 fp1 is the finish point for axis1 fp2 is the finish point for axis2 Example i8092_ARC_CW 1 5000 5000 10000 10000 Fig A 34 CW circular interpolation Demo Program linear interpolation Parameter...

Page 149: ...g 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...

Page 150: ...i8092_CIRCLE_CCW Format void i8092_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 c...

Page 151: ...terpolation 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 th...

Page 152: ...0 1500 1500 Segment 2 i8092_NEXT_WAIT cardNo Wait next command i8092_LINE_2D cardNo 0 1500 Segment 3 i8092_NEXT_WAIT cardNo Wait next command i8092_ARC_CCW cardNo 1500 0 1500 1500 Segment 4 i8092_NEXT...

Page 153: ...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 i8092_BP_ST...

Page 154: ...AIT 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...

Page 155: ...ing the linear DDA method Note The following bit pattern demo program is only valid in I 8000 User use the polling method to implement the bit pattern by calling the i8092_BP_LINE2_DEMO function and u...

Page 156: ...MOTION_TYPE cardNo ACCMODE i8092_SET_AUTODEC cardNo Card cardNo plane Auto Deceleration Enabled i8092_SET_TCURVE cardNo Card cardNo plane Set T Curve Mode i8092_SET_R cardNo Card cardNo plane 8000000...

Page 157: ...1 6 8 35 1 1 21 28 11 0 0 6 8 36 0 0 21 29 12 1 1 7 9 37 1 1 22 29 13 0 1 7 10 38 0 1 22 30 14 1 1 8 11 39 1 1 23 31 15 1 1 9 12 40 1 1 24 32 16 0 0x6b5a 0 0x7bde 9 12 41 0 0 24 32 17 1 1 10 13 42 1...

Page 158: ...1 mode setting i8092_HOME_SAND Home and Encoder Z phase signal condition setting I8092_HOME_LIMIT The home search uses an overrun limit signal setting i8092_HOME_PCLR Clear the logic position and real...

Page 159: ...es Please refer to Table 2 1 Example get the EM6 value of the X axis on card 1 WORD em6Data em6Data i8092_GET_EM6 1 0x1 i8092_GET_EM7 Format WORD i8092_GET_EM7 BYTE cardNo WORD axis Function Get the d...

Page 160: ...setting the active level of home signal IN1 nLevel 0 Low active nLevel 1 Hi active Example i8092_IN0_LEVEL 1 0xf 0 8092_IN1_LEVEL Format void i8092_IN1_LEVEL unsigned char cardNo WORD axis WORD nLevel...

Page 161: ...Level is the setting the active level of the encoder Z phase signal IN2 nLevel 0 Low active nLevel 1 Hi active Example i8092_IN2_LEVEL 1 0xf 0 i8092_SET_HV Format void i8092_SET_HV unsigned char cardN...

Page 162: ...positive nDir 1 negative Example Set the step 1 enabled and negative direction of the home search i8092_HOME_STEP1 1 0xf 1 1 i8092_HOME_STEP2 Format void i8092_HOME_STEP2 unsigned char cardNo WORD axi...

Page 163: ...0 positive nDir 1 negative Example Set the step 3 enabled and negative direction of the home search i8092_HOME_STEP3 1 0xf 1 1 i8092_HOME_STEP4 Format void i8092_HOME_STEP4 unsigned char cardNo WORD a...

Page 164: ...otion 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 0xf 0 i8092_HOME _LIMIT Format void i8092_HOME_LIMIT unsigned char...

Page 165: ...rd 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 0xf 0 i8092_HOME _START Format void i8092_HO...

Page 166: ...s 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 har...

Page 167: ...92_HOME_STEP1 cardNo 0xf 1 1 Set Step1 is executed and negative direction for 2 axes i8092_HOME_STEP2 cardNo 0xf 1 1 Set Step2 is executed and negative direction for 2 axes i8092_HOME_STEP3 cardNo 0xf...

Page 168: ...ed and negative direction for 2 axes i8092_HOME_STEP2 cardNo 0xf 1 1 Set Step2 is executed and negative direction for 2 axes i8092_HOME_STEP3 cardNo 0xf 0 0 Set Step3 is non executed i8092_HOME_STEP4...

Page 169: ...e and home signal disabled i8092_HOME_STEP1 cardNo 0xf 1 1 Set Step1 is executed and negative direction for 2 axes i8092_HOME_STEP2 cardNo 0xf 1 1 Set Step2 is executed and negative direction for 2 ax...

Page 170: ...R7 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...

Page 171: ...T_SB 1 0x1 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...

Page 172: ...xis 3000 i8092_SET_A cardNo TotalAxis 160 Set output pulse for the provocative axis i8092_SET_PULSE cardNo ProvocativeAxis ProvocativePulse Set output pulse for active axis i8092_SET_PULSE cardNo Acti...

Page 173: ...60 i8092_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 outp...

Page 174: ...ICPDAS I 8092F Software User Manual 174 Fig A 43 Synchronous action example 2...

Page 175: ...mpA Select the master axis i8092_AXIS_ASSIGN cardNo AXIS_X AXIS_Y 0 Acc mode setting i8092_MOTION_TYPE cardNo ACCMODE T curve acc mode setting i8092_SET_TCURVE cardNo Card cardNo plane Deceleration en...

Page 176: ...AXIS_XYZ 2nd seg i8092_SYNC_MODE cardNo AXIS_X 0x4010 0x0000 i8092_SYNC_MODE cardNo AXIS_Z 0x0000 0x0001 i8092_SET_MANDEC cardNo AXIS_X tempDP i8092_ARC_CW cardNo 0 5000 0 10000 i8092_SET_PULSE cardNo...

Page 177: ...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...

Page 178: ...ess 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 n...

Page 179: ...1 8 000 2 V 05h Driving speed setting 1 8 000 2 P 06h Output pulse numbers 0 228 4 FP 06h Finish point setting 231 231 4 DP 07h Manual deceleration point setting 0 65 535 2 C 08h Circular center poin...

Page 180: ...Code Command 30h 2 axis linear interpolation 31h 3 axis linear interpolation 32h CW circular interpolation 33h CCW circular interpolation 34h 2 axis bit pattern interpolation 35h 3 axis bit pattern i...

Page 181: ...yte 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 WR0 before BUSYN return...

Page 182: ...l be performed during the acceleration deceleration driving and the sudden stop will be performed during the constant speed driving WR1 D5 3 1 SPm E The bit for setting enable disable of driving stop...

Page 183: ...et 1 enable 0 disable D9 P C Interrupt occurs when the value of logical real position counter is larger than or equal to that of COMP register D10 P C Interrupt occurs when the value of logical real p...

Page 184: ...Enable disable setting for COMP register which is used as the direction software limit 1 enable 0 disable Once it is enabled during the direction driving if the value of logical real position counter...

Page 185: ...al for 1 pulse mode DIR L D8 DIR L direction direction 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...

Page 186: ...ndition 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 th...

Page 187: ...e 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 a...

Page 188: ...ough 1 enable D15 13 FL2 0 Set a time constant of the filter FL2 0 Removable maximum noise width Input signal delay time 0 1 75 SEC 2 SEC 1 224 SEC 256 SEC 2 448 SEC 512 SEC 3 896 SEC 1 024mSEC 4 1 79...

Page 189: ...vector speed mode multichip interpolation mode 1 step interpolation mode and interrupt during the interpolation D9 8 LSPD1 0 Constant vector speed mode setting of interpolation driving D15 D0 will be...

Page 190: ...and 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 are WR6L WR6H WR7L and WR7H The written data is bi...

Page 191: ...and also ready for writing interpolation command data D12 10 ZONEm Displaying the quadrant of the current position in circular interpolation D12 D11 D10 Quadrant 0 0 0 0 0 0 1 1 0 1 0 2 0 1 1 3 1 0 0...

Page 192: ...ecomes 1 when in constant speed driving D4 DSND It becomes 1 when in deceleration D5 AASND In S curve it becomes 1 when acceleration deceleration increases D12 LMT If the driving is stopped by directi...

Page 193: ...er 2 RR2 Each axis is with status register 2 The axis specified by NOP command or the condition before decides which axis s register will be read This register is for reflecting the error information...

Page 194: ...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 C Once the value of logical re...

Page 195: ...Input Signal Bit Name Input Signal n ST0 n STOP0 n IN0 nIN0 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...

Reviews: