Home

MSTEP2 ?2 Axes Stepping Motor Control Card - ICPDAS

image

Contents

1. bbsetp cpp Windows NT Driver Item File eader file step32 h Import Library file step32 lib bcstep32 lib only for Borland C series Dynamic Link Library step32 dll copy to c winnt Driver regdrv bat Example file project1 opr Borland C Builder project1 cpp bbsetp cpp The procedure of install NT drivers to execute regdrv bat and then re start computer The detail of installation please refer regdrv bat http www icpdas com 31 ICPDAS STEP 200 User Manual 5 Example 5 1 DOS example The execution file MTEST EXE is a command testing program let you can fully understand the action of every command The source files include MTEST PRJ MAIN CPP MSTEP2 h and MSTEP2 LIB The file MAIN CPP provide examples of MSTEP2 command If you have any question of MSTEP2 command you could trace the source file MAIN CPP The pannel of MTEST EXE has three area 1 Limit switch condition area it indicate the limit switch condition 2 Motion parameter area it shows every variable of motion parameter 3 Command area you can select any command in this area and to execute it You can press any key to stop X axis and Y axis There are three command MSTEP2 INTP LONG LINE MSTEP2 INTP CIRCLE and MSTEP2 INTP that only can be immediately stopped by EMG switch Version 3 0 02 2001 511 1521 1514 CPUS FFFF 1 EMG YSTP cycle 512 152
2. CW Mode 0 CW_CCW CCW Pulse Mode 1 PULSE DIR Direction Figure 6 Output pulse mode 2 3 3 Direction configuration Sometimes the output direction of X axis Y axis is undesired direction due to motor connection or gear train In oder to unify the output direction as shown in Figure 4 and Figure 5 Where CW FW direction is defined as toward outside from motor CCW BW direction is defined as toward inside from motor MSTEP2 SET DEFDIR defdirX defdirY command provide parameters NORMAL DIR 0 and REVERSE DIR 0 to define the rotating direction of motor http www icpdas com 8 ICPDAS STEP 200 User Manual Version 3 0 02 2001 2 3 4 Turn Servo ON OFF Hold ON OFF To turn servo motor into servo ON OFF state or turn stepping motor into hold ON OFF state the command MSTEP2 SET SERVO ON sonX sonY provide parameters ON 1 and OFF 0 to turn ON or OFF 2 3 5 Protection STEP200 card is a automatic protected system a If X aixs command is executing and moving toward CW FW direction X axis will immediately stop when LS14 is touched To release this protection as long as X axis move toward CCW BW direction b If X aixs command is executing and moving toward CCW BW direction X axis will immediately stop when LS11 is touched To release this protection as long as X axis move toward CW FW direction c If Y aixs command is executing and moving toward CW FW direction Y axis will immediate
3. pom Example http www icpdas com 23 ICPDAS STEP 200 User Manual Version 3 0 02 2001 MSTEP2_LSP_MOVE 1 CW X axis getch MSTEP2 STOP X 1 MSTEP2_LSP_MOVE 1 CCW Y axis getch MSTEP2 STOP Y 1 18 MSTEP2 MOVE unsigned char cardNo unsigned char DIR unsigned char AXIS High speed move toward direction DIR It can be stop by MSTEP2 STOP X or MSTEP2 STOP Y or MSTEP2 STOP ALL command high speed Example MSTEP2 HSP 1 CW X axis getch MSTEP2 STOP X 1 MSTEP2 HSP 1 CCW Y axis getch MSTEP2 STOP Y 1 19 MSTEP2 CSP MOVE unsigned char cardNo unsigned char dir unsigned char axis unsigned int move speed This command will accelerate decelerate the selected axis s motor to the move speed This command can be continuously send to STEP 200 to dynamicly change speed The rotating motor can be stop by the command MSTEP2 STOP MSTEP2 DEC cardNo board number 0 9 axis selected axis 1 X axis 2 Y axis dir moving direction 0 CW 1 COW 0 move speed 2040 http www icpdas com 24 ICPDAS STEP 200 User Manual Version 3 0 02 2001 move speed Acc Dec Example MSTEP2 MOVE 1 CW X axis 10 delay 10000 MSTEP2 MOVE 1 CW X axis 20 delay 10000 MSTEP2 MOVE 1 CW X axis 30 delay 10000 20 MSTEP2 SLOW DOWhN unsigned char cardNo unsigned char AXIS to decelerate to slow s
4. www icpdas com 3 ICPDAS STEP 200 User Manual Version 3 0 02 2001 1 Introduction 1 1 System Block Diagram STEP200 Stepping motor control card is a micro computer controlled 2 axes pulse generation card It includes a 2Kbytes FIFO to receive motion command from host PC a micro computer for profile generation and protection two axes DDA chip to execute DDA function when interpolation command is called 2500Vrms optical isolation inserted for industrial application 2K FIFO CPU DDA Chip 4 Profile Generation Interface Buffer Protection X axis ISA DDA Chi _ Optical CPU Status Isolation Limit Switch Input Port Connector Limit Switch Signal Input Port Figure 1 block diagram of STEP200 1 2 DDA Technology The DDA chip is heart of STEP200 card it will generate equal space pulse train corresponding to specific pulse number during a DDA period This mechanism is very useful to execute pulse generation and interpolation function The DDA period can be determined by DDA cycle Table 1 shows the relation among DDA cycle DDA period and output pulse rate When DDA cycle set to 1 the DDA period is equal to 8 192ms The output pulse number can be set to 0 2047 therefore the maximum output pulse rate will be 249 877kpps The minimum output pulse rate is 0 96pps when se
5. CIRCLEO2 unsigned char cardNo long x long y unsigned char dir unsigned int speed unsigned char acc mode 35 MSTEP2 INTP ARCO2 unsigned char cardNo long x long y long unsigned char dir unsigned int speed unsigned char acc mode acc mode 0 enable acceleration and deceleration profile 1 disable acceleration and deceleration profile The new driver provide a set of state machine type interpolation command including MSTEP2 INTP LINEO2 MSTEP2 INTP CIRCLEO2 MSTEP2 INTP ARCO2 These command can be set acc mode 1 to disable the acceleration and http www icpdas com 31 ICPDAS STEP 200 User Manual Version 3 0 02 2001 deceleration profile 36 unsigned char MSTEP2_INTP_STOP This command is to compute the interpolation service It will return READY 0 for interpolation command completed And retrun BUSY 1 for not yet complete 37 unsigned char MSTEP2_GET_CARD This command is used only for DOS in timer interrupt service 10ms to compute the state machine type interpolation command These 3 state machine type interpolation commands must use MSTEP2_GET_CARD only for windows and MSTEP2_INTP_STOP simultaneously The state machine type interpolation commands are only set parameters into the driver The computing entity is in MSTEP2_GET_CARD only for windows and MSTEP2_INTP_STOP In windows application when The MSTEP2_GET_CARD command is running in the timer interrupt routine by 10ms it will h
6. long as the speed resolution can be acceptable Example Stepping Motor The specification of stepping motor is 500 pulse rev max speed 500 rpm speed resolution 2 rpm http www icpdas com 5 ICPDAS STEP 200 User Manual Version 3 0 02 2001 The required max pulse rate PRmax 500 rpm 60 500 4166 67 pps The maximum output pulse Np 500rpm 2rpm 250 pulse number The DDA cycle can be calculated by follow equation Np 4166 67 0 52 7 DDAcycle 1 4 096ms DDA cycle 14 High Speed 256 pulse 4166 67 15 0 004096 The above results means that maximum speed is 500rpm when send command MSTEP2 SET VAR 14 1 10 256 to STEP200 card Example Pulse type input Servo Motor The specification of servo motor is 4000 pulse rev max speed 3000 rpm speed resolution 2 rpm The required max pulse rate PRmax 3000 rpm 60 4000 200 000 pps The maximum output pulse Np 3000rpm 2rpm 21500 pulse number The DDA cycle can be calculated by follow equation Np DDAcycle 1 4 096ms 200 000 i DDAcycle 1 4 096ms DDA cycle 1 High Speed 1638 pulse 200 000 2 0 004096 The above results means that maximum speed is 3000rpm when send command MSTEP2 SET VAR 1 5 20 1638 to STEP200 card PRmax http www icpdas com 6 ICPDAS STEP 200 User Manual Version 3 0 02 2001 2 Hardware setup 2 1 Address selection The address is determined by there exis
7. switches wes 4 pis ORG2 original point switch of Y axis low active LS21 LS22 LS23 LS24 limit switches of Y axis low active which must be configured as Figure 5 Example limit2 MSTEP2 LIMIT Y 1 29 MSTEP2 WAIT X unsigned char cardNo to wait X axis going to STOP state 30 MSTEP2 WAIT Y unsigned char cardNo to wait Y axis going to STOP state http www icpdas com 30 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 7 New Commands 31 MSTEP2 SET NC unsigned char cardNo unsigned char sw To set all of the following limit switches as N C normal close or N O normal open If set as N O those limit switches are active low If set as N C those limit switches are active high The auto protection will automatically change the judgement whatever it is N O or N C Limit switches ORG1 LS11 LS12 LS13 LS14 ORG2 LS21 LS22 LS23 LS24 EMG cardNo card number 0 9 Sw 0 NO normal open default 1 YES normal close 32 MSTEP2 EMG STOP unsigned char cardNo This function is the same as MSTEP2 STOP ALL but MSTEP2 EMG STOPY only can be used in timer interrupt routine cardNo card number 0 9 This command will clear all of pending commands in the buffer and immediately terminate all commands which is executing in STEP 200 board 33 MSTEP2 INTP LINEO2 unsigned char cardNo long x long y unsigned int speed unsigned char acc mode 34 MSTEP2
8. 2 TP13 513 1523 TP14 TPG 1524 TP21 01 TPG2 MSTEP 2 SET MODE MSTEP 2 SET DI RDEF MSTEP2 SET SERVO ON MSTEP2 STOP X MSTEP2 STOP Y MSTEP2 CSP MOVE MSTEP2 SLOW DOW MSTEP2 SLOW STOI MSTEP2 LSP PULSE MOV MSTEP2 HSP PULSE MOV ACC DEC 25 Low Speed 10 MSTEP2 STOP ALL MSTEP2 INTP PULS High Speed 12 X output modes CW CCW MSTEP2 RESET SYSTEM MSTEP2 INTP LINE Y output modes CW CCW X direction NORMAL MSTEP2 LSP ORG MSTEP2 INTP LONG LIN Y direction NORMAL X servo on ON MSTEP2 HSP ORG MSTEP2 INTP CIRCL Y servo on ON MSTEP2 HSD ORG MSTEP2 NTP ARC MSTEP2 LSP MOVE testing http www icpdas com 38 ICPDAS STEP 200 User Manual Version 3 0 02 2001 5 2 Windows example The project1 exe source file included is a example for ENCODER3 card and STEP200 card It has windows95 and NT edition The pannel of projecti exe has four area 1 Limit switch condition area it indicate the limit switch condition 2 Motion parameter area it shows every variable of motion parameter The parameters can be modify directly then choose the correponding command to send command into STEP200 card 3 Command area you can select any command in this area and to execute it 4 The lower right encoder sub window shows the address decimal counter value and index value When click the Update Parameters button it will shows a dialog for selecting the counting mode and times mode L MSTEP2 Te
9. 4287 lt Ypulse lt 524287 Example MSTEP2 INTP LINE 1 2000 3000 MSTEP2 INTP LINE 1 500 200 24 MSTEP2 INTP LONG LINE unsigned char cardNo long x long y unsigned int speed This command will move a long interpolation line in X Y plane PC will automaticly generate a trapezoidal speed profile of X axis and Y axis and send these profile by way of MSTEP2 INTP PULSE command This command only can be immediately stopped by EMG switch Y X Y speed 0 2040 Restriction 2 1 lt x 2 1 22 1 lt y x2 1 Example MSTEP2 INTP LONG LINE 1 20000 30000 25 MSTEP2 CIRCLE unsigned char cardNo long x long y unsigned char dir unsigned int speed This command will generate a interpolation circle in X Y plane PC will automaticly generate a trapezoidal speed profile of X axis and Y axis and send these profile by way of MSTEP2 INTP PULSE command This command only can be immediately stopped by EMG switch X y center point of circle relate to present position dir moving direction 0 CW 1 CCW speed 0 2040 http www icpdas com 21 ICPDAS STEP 200 User Manual Version 3 0 02 2001 XY VN TURN where radius sqrt X 2 Y 2 Restriction 2 1 itx x2 1 2 1 lt y x2 1 Example MSTEP2 INTP CIRCLE 1 2000 2000 CW 100 26 MSTEP2 ARC unsigned char cardNo long x long y long unsigned char dir unsigned int speed This command will generate a
10. RD 1 xmode ymode define output mode MSTEP2 SET SERVO ON CARD 1 xson set servo ON OFF end of program MSTEP2 RESET SYSTEM CARD 1 reset system MSTEP2 END to release VxD driver DOS application don t need execute this command define CARD1 1 unsigned char DDA AD unsigned int LSP HSP unsigned char xmode ymode unsigned char xdir ydir unsigned char xson yson void main DDA 5 AD 5 LSP 10 HSP 120 xmode CW_CCW ymode CW_CCW http www icpdas com 35 STEP 200 User Manual Version 3 0 02 2001 xdir NORMAL_DIR ydir NORMAL_DIR xson ON yson ON start up program MSTEP2_INITIAL only uesd for windows application MSTEP2_REGISTRATION CARD1 0x300 MSTEP2 RESET SYSTEM CARD 1 MSTEP2 SET VAR CARD 1 DDA AD LSP MSTEP2 SET DEFDIR CARD xdir ydir MSTEP2 SET MODE CARD 1 xmode ymode MSTEP2 SET SERVO ON CARD 1 xson yson end of program INR M ADMIRE MSTEP2 RESET SYSTEM CARD 1 MSTEP2 END only uesd for windows application http www icpdas com 36 ICPDAS STEP 200 User Manual Version 3 0 02 2001 4 Driver DOS Driver C C Item eader file ibrary file mstep2 lib Example file mtest prj Windows 95 Driver Item eader file ImportLibrary file step32 lib bcstep32 lib only for Borland C series ynamic Link Library project1 bpr Borland C Builder
11. STEP 200 User Manual Version 3 0 02 2001 STEP 200 2 axis stepping servo motor control card User Manual Version 3 0 02 2001 Edition Driver update http www icpdas com Warranty All products manufactured by ICP DAS are warranted against defective materials for one year from the date of delivery to the original purchaser Warning ICP DAS assumes no liability for damage consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for it s use nor for any infringements of patents or other rights of third parties resulting from it s use Copyright Copyright 2001 by ICP DAS All right are reserved Trademark The names used for identification only maybe registered trademarks of their respective companies http www icpdas com 1 STEP 200 User Manual Version 3 0 02 2001 STEP200 2 axis Stepping Servo Motor Control Card STEP200 card is a 2 axis command type stepping motor control card it also can be used in servo motor control pulse input type This card has an embedded CPU which perform motion commands transfered from PC to increase the system performance A 2Kbytes FIFO is introduced as command buffer This buffer can provide 1360ms buffer time Therefore STEP200 card is design for windows operation system STEP200 card prov
12. The connection between ENCODERS card and STEP200 http www icpdas com card for testing 14 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 Software Directories BAS x 1 80 step2 C C3 Lib C Manual Winds H O demo 8 71 drivers drvcode Winnt a demo E drivers E diveode ha A ditm 3 1 Functions Constants define ON 1 define OFF 0 define CW_CCW 0 define PULSE_DIR 1 define NORMAL DIR 0 define REVERSE DIR 1 itdefine FW 0 define BW 1 define CW 0 define CCW 1 define X_axis 1 define Y_axis 2 define READY 0 define BUSY 1 STEP200 card is a automatic protected system a X aixs command is executing and moving toward CW FW direction X axis will immediately stop when LS14 is touched To release this protection as long as X axis move toward CCW BW direction b If X aixs command is executing and moving toward CCW BW direction X axis will immediately stop when LS11 is touched To release this protection as long as X axis move toward CW FW direction c If Y aixs command is executing and moving toward CW FW direction Y axis will immediately stop when LS24 is touched To release this http www icpdas com 15 ICPDAS STEP 200 User Manual Version 3 0 02 2001 protection as long as Y axis move toward CCW BW direction d If Y aixs command is executing and moving toward CC
13. W BW direction Y axis will immediately stop when LS21 is touched To release this protection as long as Y axis move toward CW FW direction http www icpdas com 16 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 1 Loading and unloading driver commands only for windows 1 MSTEP2 INITIAL To load VxD driver 2 MSTEP2_END To release VxD driver http www icpdas com 11 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 2 Setting commands 3 unsigned char MSTEP2 REGISTRATION unsigned char cardNo unsigned int address To select the address of board and check it exist or not 20 STEP 200 boards can be added in one system cardNo board number 0 19 address select the address as well as hardware selected in chapter 2 return NO board not exist YES board exist Example MSTEP2 REGIDTRATION 1 0x300 4 MSTEP2 RESET SYSTENM unsigned char cardNo to reset STEP 200 card cardNo board number 0 19 5 MSTEP2 SET VAR unsigned char cardNo unsigned char DDA cycle unsigned char Acc Dec unsigned int Low Speed unsigned int High Speed to set variable of DDA cycle accelerating decelerating speed low speed and high speed value cardNo board number 0 19 High Speed Acc Dec Acc Dec Low Speed Restriction 1 cycle lt 254 1 Acc _ Dec lt 200 1 Low Speed lt 200 Low Speed High Speed lt 2047 default value DDA cycle 10 Acc Dec 1 Lo
14. W CCW PULSE DIR 8 MSTEP2 SET SERVO ON unsigned char cardNo unsigned char sonX unsigned char sonY To turn servo motor into servo ON OFF state or turn stepping motor into http www icpdas com 19 ICPDAS STEP 200 User Manual Version 3 0 02 2001 hold ON OFF state sonX X axis servo hold on switch sony Y axis servo hold on switch 1 ON 0 OFF http www icpdas com 30 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 3 Stop Commands 9 MSTEP2_STOP_X unsigned char cardNo to stop X axis 10 MSTEP2_STOP_Y unsigned char cardNo to stop Y axis 11 MSTEP2_STOP_ALL unsigned char cardNo to stop X Y axis immediatly This command will clear commands pending the FIFO and then send stop X Y axis command to achieve immediately stop all axis http www icpdas com 21 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 4 Simple motion commands 12 MSTEP2_LSP_ORG unsigned char cardNo unsigned char DIR unsigned char AXIS Low speed move and stop when ORG1 ORG2 limit switch is touched ORG Low speed Example MSTEP2_LSP_ORG 1 CCW X_axis MSTEP2_LSP_ORG 1 CCW Y_axis 13 MSTEP2_HSP_ORG unsigned char cardNo unsigned char DIR unsigned char AXIS High speed move and stop when ORG1 ORG2 limit switch is touched ORG high speed V Example MSTEP2_HSP_ORG 1 CCW X_axis MSTEP2_HSP_ORG 1 CCW Y_axis 14 MSTEP2_HSD_ORG unsigned char cardNo unsigned cha
15. elp to calculate the interpolation service Both of DOS and windows application User can directly call the do while MSTEP2_INTP_STOP READY to execute the computing entity The user can monitor something or waiting for keyboard input in the do loop Therefore The user has chance to do the software stop or monitor something DOS application example1 MSTEP2 INTP LINEO2 CARD1 1000 1000 100 1 do show_panel if Kbhit chkey bioskey 0 7 0 4100 while chkey 0x4100 amp amp MSTEP2_INTP_STOP READY if chkey 0x4100 MSTEP2 STOP ALL CARD 1 DOS application example2 void Timerlnterrupt void MSTEP2 CARD CARD 1 show panel if kbhit chkey bioskey 0 F720x4100 http www icpdas com 32 ICPDAS STEP 200 User Manual Version 3 0 02 2001 void test_intp void MSTEP2 INTP LINEO2 CARD 1 1000 1000 100 1 do while chkey 0x4100 88 MSTEP2_INTP_STOP READY if chkey 0x4100 MSTEP2 STOP ALL CARD 1 Windows application example1 void TMSERVO Timer1 Timer TObject Sender Timer1 Interval 10 10ms MSTEP2 GET CARD CARD 1 show panel void fastcall TMSTEP IntpCircleClick TObject Sender char str 20 if MSTEP2 IS X STOP CARD1 NO MSTEP2 IS Y STOP CARD1 NO Application gt MessageBox Motor s rotating can t execute this command Message Box MB DEFBUTTON 1 return Itoa x str 10 IntpCirc
16. ext session xstop ystop These signals indicate the operating situation of X Y axis in CPU 1 busy 0 stop The commands MSTEP2 WAIT X MSTEP2_WAIT_Y just to waiting for xstop or ystop signal become to O 4 STS register base 2 read only This register is used for manufacturing and testing 2 3 Hardware Configuration 2 3 1 Limit switch configuration Because the profile generation and protection is executed by the CPU on STEP200 card the limit switches must configure as following diagram The motion command just can work properly CCW BW CW FW Motor 511 086115122 1513 1514 Yo oo Yo 1511 0801 1512 1513 11514 EXT 5 0 EMG To X axis Emergency Figure 4 Limit switch configuration of X axis http www icpdas com 8 ICPDAS STEP 200 User Manual Version 3 0 02 2001 CCW BW CW FW Motor 77 7 1521 0862 1522 1523 1524 4 o o O 1521 0RG2 1522 1523 1524 EXT GND Figure 5 Limit switch configuration of Y axis 2 3 2 Output pulse mode configuration STEP200 card provide two kind output method a CW CCW mode b Pulse Direction mode The command MSTEP2 SET MODE modeX modeY provide parameters CW CCW 0 and PULSE DIR 1 to define output pulse mode
17. ide DOS windows 95 and windows NT driver let you have real time motion control solution in windows system Features e 2 axis independent simultaneous stepping motor control servo motor control pulse input type step rate 1pps 250Kpps e Max step count 2 1 steps DOS windows 95 windows NT driver e embedded CPU command type interface e linear circular interpolation e automatic trapezoidal acceleration deceleration output pulse modes CW CCW or pulse direction output polarity can be programmable 2500Vrms optical isolated signal output 5 optical isolated digital inputs per axis for limit switches http www icpdas com 2 ICPDAS STEP 200 User Manual Version 3 0 02 2001 Contents 1 Introduction 1 1 System Block Diagram 1 2 DDA technology 2 Hardware setup 2 1 Address selection 2 2 Register of STEP200 card 2 3 Hardware configuration 2 3 1 Limit switch configuration 2 3 2 Output pulse mode configuration 2 3 3 Direction configuration 2 3 4 Turn Servo ON OFF Hold ON OFF 2 3 5 Protection 2 4 Connection 3 Software 3 1 Functions 3 1 1 Loading and unloading driver commands only for windows 3 1 2 Setting commands 3 1 3 Stop commands 3 1 4 Simple motion commands 3 1 5 Interpolation commands 3 1 6 Others 3 1 7 New Command 3 2 Start up and end of program 4 Driver DOS Driver C C Windows 95 Driver Windows NT Driver 5 Example 5 1 DOS example 5 2 Windows example http
18. interpolation arc in X Y plane PC will automaticly generate a trapezoidal speed profile of X axis and Y axis and send these profile by way of MSTEP2 INTP PULSE command This command only can be immediately stopped by EMG switch X y end point of arc relate to present position radius of arc if R20 the arc lt 180degree if R lt 0 the arc gt 180 degree dir moving direction CW 1 CCW R path of curve RO OW B k Ro COW speed 0 2040 http www icpdas com 28 ICPDAS STEP 200 User Manual t A uud Restriction o 1 lt x lt 2 1 22 1 lt y lt 2 1 1 lt lt 2 1 EY 2 Example Version 3 0 02 2001 x Y 7 i N ec WA P X MSTEP2 INTP 1 2000 2000 2000 100 http www icpdas com 29 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 6 Others 27 unsigned char MSTEP2 LIMIT X unsigned char cardNo to request the condition of X axis limit switches s Ja ORG1 original point switch of X axis low active LS11 LS12 LS13 LS14 limit switches of X axis low active which must be configured as Figure 4 EMG emergency switch low active Example unsigned char limit1 limiti MSTEP2 LIMIT X 1 28 unsigned char MSTEP2 LIMIT Y unsigned char cardNo to request the condition of Y axis limit
19. leDialog gt Xcenter gt Text AnsiString str Itoa y str 10 IntpCircleDialog gt Ycenter gt Text AnsiString str IntpCircleDialog gt SelectDir gt ItemIndex direction Itoa speed str 10 http www icpdas com 33 ICPDAS STEP 200 User Manual Version 3 0 02 2001 IntpCircleDialog gt speed gt Text AnsiString str if IntpCircle Dialog gt ShowModal mrOk x long IntpCircleDialog gt Xcenter gt T ext Tolnt y long IntpCircleDialog gt Ycenter gt T ext Tolnt direction IntpCircleDialog gt SelectDir gt ltemIndex speed unsigned int IntpCircleDialog gt speed gt T ext Tolnt IMSTEP2_CIRCLE CARD1 x y unsigned char direction speed MSTEP2_INTP_CIRCLE02 CARD1 x y unsigned char direction speed 0 do Application gt ProcessMessages while MSTEP2_INTP_STOP READY http www icpdas com 34 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 2 Start up and end of program Start up program When you are going to use STEP200 card there are some commands must be used firstly MSTEP2 INITIAL to load vxd driver DOS application don t need execute this command MSTEP2 REGISTRATION CARD1 0x300 set CARD1 address where CARD1 1 MSTEP2 RESET SYSTEM CARD1 reset system MSTEP2 SET VAR CARD1 AD LSP set DDA cycle accelerating decelerating speed low speed and high speed value MSTEP2 SET DEFDIR CARD 1 xdir ydir define direction MSTEP2 SET MODE CA
20. ly stop when LS24 is touched To release this protection as long as Y axis move toward CCW BW direction d If Y aixs command is executing and moving toward CCW BW direction Y axis will immediately stop when LS21 is touched To release this protection as long as Y axis move toward CW FW direction http www icpdas com 10 ICPDAS STEP 200 User Manual Version 3 0 02 2001 2 4 Connection 1 Pin Assignment of connector CN1 CN1 DB25 DB25 FEMALE 90 5VO CW_PULSE1 ___ gt Cw PULSE2 gt DIR1 cow piR2 gt HOLD1 gt NZ O O gt EXT VCC oRe2 gt LS11 gt LS21 gt LS22 _ gt Lsi3 gt LS23 Asi4 gt 1524 gt EMG gt V EXT GND Figure 7 CN1 connector pin name which axis PULSE1 X ___ canbe configure as CW or PULSE pin CCW_DIR1 X configure as CCW or DIR pin HOLD1 Ea ON OFF or hold ON OFF signal 1 ON 0 OFF PULSE2 Y configure as CW or PULSE pin CCW_DIR2 Y configure as CCW or DIR HOLD2 ON OFF or hold ON OFF signal 1 ON 0 OFF LS11 LS12 should be configure as Figure 4 LS13 LS14 ORG2 Y original point limit switches low active LS21 LS22 should be configure as Figure 5 LS23 LS24 EMG emergency switch low active 5V supplied voltage only used for output pin 1 pulse 50mA pin 14 don t use for other device GND internal ground on
21. ly used for output pulse pin 5 don t use for other device pin 18 Table 2 EXT VCC external power 12V 24V used for limit switches pin 6 pin 19 EXT GND external ground used for limit switches pin 25 http www icpdas com 11 ICPDAS STEP 200 User Manual Version 3 0 02 2001 2 The internal circuit of CW_PULSE CCW DIR HOLD When output these signal as 1 it can source 15mA max When output these signal as 0 it can sink 50omA max 45V 330 CW PULSE1 CCW_DIR1 HOLD1 CW_PULSE2 CCW_DIR2 HOLD2 Figure 8 internal signal of pulse output connection 3 The internal circuit of switch connection EXT 12V 24V ORG1 LS11 LS12 LS18 LS14 ORG2 LS21 LS22 LS23 LS24 EMG Figure 9 internal circuit of limit switch connection http www icpdas com 12 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 Examples for connection CW PULSE 1 Figure 11 Sink type driver http www icpdas com 13 ICPDAS STEP 200 User Manual 5V 1 CW_PULSE1 CW_PULSE2 15 eT Tt OO 3 15 CCW_DIR2 16 RHODi 41 9 DB25 DB25 FEMALE 90 Version 3 0 02 2001 DB25 DB25 FEMALE 90 2C 20 5V 8 lo EGND 21 9 22 3B 10 3B 23 380 11159 3C 24 wr EGND 25 EGND 13 Figure 12
22. peed until MSTEP2 STOP MSTEP2 STOP Y or MSTEP2 STOP ALL is executed SLOW DOWN Example MSTEP2 MOVE 1 CW X axis getch MSTEP2_SLOW_DOWN 1 X axis getch MSTEP2 STOP 1 21 MSTEP2 SLOW STOP unsigned char cardNo unsigned char AXIS to decelerate to stop SLOW STOP Example MSTEP2 MOVE 1 CW Y axis getch MSTEP2_SLOW_STOP 1 Y_axis http www icpdas com 25 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 1 5 Interpolation commands 22 MSTEP2 INTP PULSE unsigned char cardNo int Xpulse int Ypulse This command will move a short distance interpolation short line in X Y plane This command provide user to generate an arbitrary curve in X Y plane Xpul se Ypulse 9 Restriction 2047 lt Xpulse 2047 2047 lt Ypulse 2047 Example MSTEP2 INTP PULSE 1 20 20 MSTEP2 INTP PULSE 1 20 13 MSTEP2 INTP PULSE 1 20 7 MSTEP2 INTP PULSE 1 20 0 MSTEP2 INTP PULSE 1 15 5 23 MSTEP2_INTP_LINE unsigned char cardNo long Xpulse long Ypulse This command will move a long distance interpolation line in X Y plane The CPU on STEP200 card will generate a trapezoidal speed profile of X axis and Y axis and execute interpolation by way of DDA chip Y Xpul se Ypulse 10 0 http www icpdas com 26 ICPDAS STEP 200 User Manual Version 3 0 02 2001 Restriction 524287 lt Xpulse 524287 52
23. r DIR unsigned char AXIS High speed move and slow down to low speed when LS12 LS22 limit switch is touched and then stop when reach ORG1 ORG2 limit switch LS12 high speed ORGI X axis low spee LS22 high speed ORG2 Y axis low spee Example MSTEP2 HSD 1 CCW X axis http www icpdas com 22 ICPDAS STEP 200 User Manual Version 3 0 02 2001 MSTEP2 HSD 1 CCW Y axis 15 MSTEP2 LSP PULSE MOVE unsigned char cardNo unsigned char AXIS long pulseN Low speed move pulseN pulseN j x Example MSTEP2_LSP_PULSE_MOVE 1 X axis 20000 MSTEP2_LSP_PULSE_MOVE 1 X axis 2000 MSTEP2 LSP PULSE 1 Y axis 20000 MSTEP2 LSP PULSE 1 Y axis 2000 where when pulseN gt 0 move toward CW FW direction when pulseN 0 move toward CCW BW direction 16 MSTEP2 PULSE MOVE unsigned char cardNo unsigned char AXIS long pulseN High speed move pulseN high speed pulseN Example MSTEP2_HSP_PULSE_MOVE 1 X axis 20000 MSTEP2_HSP_PULSE_MOVE 1 X_axis 2000 MSTEP2 PULSE 1 Y axis 20000 MSTEP2 PULSE Y axis 2000 where when pulseN gt 0 move toward CW FW direction when pulseN 0 move toward CCW BW direction 17 MSTEP2 LSP MOVE unsigned char cardNo unsigned char DIR unsigned char AXIS Low speed move toward direction DIR It can be stop by MSTEP2 STOP X or MSTEP2 STOP Y or MSTEP2 STOP ALL command Low speed
24. sting Program Ele Help ORGY 2 11 15117 1521 TP12 1512 1522 TP13 HEISE 1514 1524 21 v FFEF Jv cPUS 22 TPG2 5 TP23 EMG w TP24 MSTEP2 SELECT 2 MOVE MSTEP2 SET VAR MSTEP2 CSP MOVE MSTEP2 SET MODE MSTEP2 SLOW DOWN 5 2 SET DEFDIR MSTEP2 SLOw STOP 5 2 SERVO ON 2 RESET SYSTEM MSTEP2 STOP X MSTEP2 STOP Y MSTEP2 STOP ALL MSTEP2LSP ORG MSTEP2 HSP ORG MSTEP2 HSD MSTEP2 15 MOVE MSTEP2 INTP LONG LINE MSTEP2 CIRCLE MSTEP2 ARC Muti Testing NORMAL DIR NORMAL Encoder Card DE ETE E Address 776 2000 3333 o Update Parameters index index index Update Servo Parameters http www icpdas com 39 ICPDAS
25. t DDA cycle 254 DDA period 1040 384ms DDA period DDA cycle X pulse 4 Y pulse n 12 Figure 2 DDA mechanism http www icpdas com 4 STEP 200 User Manual Version 3 0 02 2001 Table 1 The Relation among DDA cycle DDA period and output pulse rate DDA cycle DDA period Max pulse Min pulse rate n 1 rate n 2047 8 192ms 249877pps 122pps 12 288ms 166585pps 81pps 16 884ms 742 S ooo o N 1 4 096ms 2047 DDA period 1 DDA period pops oo O 1040 384ms 1967pps 0 96pps The DDA cycle can be set by MSTEP2_SET_VAR DDA_cycle Acc_Dec Low_Speed High_Speed command which decribed in charpter 3 The selection criterion of DDA cycle describes as following 1 The required max output pulse rate 2047 DDAcycle 1 4 096ms PRmax PRmax max output pulse rate Vmax max speed rpm N the pulse number of stepping motor per revolution pulse rev 2 The required speed resolution The maximum output pulse number is Np 0 2047 therefore the speed resolution is Vmax max speed Np The DDA cycle can obtain as following Np DDAcycle 1 4 096ms PRmax 3 Large DDA cycle DDA period it will occur vibration between different pulse input which generally can be observed during acceleration or deceleration So the small DDA cycle the smooth acceleration deceleration curve as
26. t a dip switch on STEP200 card for address selection The address can be select as following examples Relatively this address must be set using MSTEP2 REGISTRATION command to select STEP200 card The MSTEP2 REGISTRATION command has been described in chapter 3 ON 12345678 4 5 6 7 9 12345678 A4 A5 A6 A7 8 A9 ON aw 12345678 4 5 A6 A7 A9 Figure 3 Address selection 2 2 Register of STEP200 card There are 4 registers which resided in selected address base on STEP200 card It includes FIFO register DI1 register DI2 register STS register 1 FIFO register base O write only STEP200 driver will send motion command by way of this register Please do not use this register to write any thing or STEP200 will not operate properly 2 register base 0 read only s Ja e 1 ORG1 original point switch of X axis low active LS11 LS12 LS13 LS14 limit switches of X axis low active which must be configured as next session EMG emergency switch low active http www icpdas com 1 ICPDAS STEP 200 User Manual Version 3 0 02 2001 3 register base 1 read only e 5 4 pe ORG2 original point switch of Y axis low active LS21 LS22 LS23 LS24 limit switches of Y axis low active which must be configured as n
27. w Speed 10 High Speed 100 http www icpdas com 18 ICPDAS STEP 200 User Manual Version 3 0 02 2001 Example MSTEP2_SET_VAR 1 5 2 10 150 where DDA cycle 25 gt DDA period 5 1 4 096ms 24 576ms 2 gt Acc Dec speed 2 24 576ms 2 3311 p s 2 Low Speed 10 gt low speed 10 24 576ms 407pps High Speed 150 gt high speed 150 24 576ms 6107pps 6 MSTEP2_SET_DEFDIR unsigned char cardNo unsigned char defdirX unsigned char defdirY Sometimes the output direction of X axis Y axis is undesired direction due to motor connection or gear train In oder to unify the output direction as shown in Figure 4 and Figure 5 Where CW FW direction is defined as toward outside from motor CCW BW direction is defined as toward inside from motor MSTEP2 SET DEFDIR command provide parameters to define the rotating direction of motor cardNo board number 0 19 defdirX X axis direction definition defdirY Y axis direction definition 0 NORMAL DIR 1 REVERSE DIR 7 MSTEP2 SET MODE unsigned char cardNo unsigned char modeX unsigned char modeY STEP200 card provide two kind output method X axis output mode modeY Y axis output mode 0 CW_CCW CW CCW mode 1 PULSE DIR Pulse Direction mode CW Mode 0 CW_CCW CCW Pulse Mode 1 PULSE DIR Direction Example MSTEP2 SET MODE 1 C

Download Pdf Manuals

image

Related Search

Related Contents

Focus Electrics 77200  Medisana LSB  取扱説明書/保証書  S i e m - N o v a  DECram for OpenVMS User`s Manual    Movi for Mac User Guide (4.0)  MSI Z68A-GD80 (G3) motherboard  Fille au pair, mode d`emploi  PDFファイル  

Copyright © All rights reserved.
Failed to retrieve file