Appendixes – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual
Page 390
368
Application Examples • Feed-To-Length Application
Publication 1398-PM601A-EN-P — October 2000
APPENDIXES
PRINT 2,1 "X2:DWELL " ,TIME,6,3
PRINT 3,1 "X3:KERF " ,KERF,6,3
PRINT 4,1 "X4:NEXT MENU"
JMP X4E
M2:
CLEAR
PRINT 1,1 "X1:OUT ON " ,OUT_LEN,7,3
PRINT 2,1 "X2:BACKUP "
IF BACKUP=OFF PRINT "OFF "
IF BACKUP=ON PRINT BACK_LEN,7,3
PRINT 3,1 "X3:REG LEN "
IF REGISTER=OFF PRINT "OFF "
IF REGISTER=ON PRINT REG_LEN,6,3
PRINT 4,1 "X4:NEXT MENU"
JMP X4E
DI:
CLEAR
PRINT 4,1 "X4:NEXT MENU"
IF STATE<>1 PRINT 2,2 "WAITING FOR START"
IF STATE=1 PRINT 2,3 "RUNNING BATCH"
IF STATE=2 PRINT 3,3 "BATCH COMPLETE"
X4E:
XEND
;
MAIN:
IF BACK_LEN=0 BACKUP=OFF ELSE BACKUP=ON;BACKUP ON=backup enabled
IF REG_LEN=0 REGISTER=OFF ELSE REGISTER=ON;REGISTER ON=registration enabled
ALL OFF
;Initialize all outputs off
CLEAR
PRINT "^D3"
PRINT 2,3 "FEED TO LENGTH"
PRINT 3,5 "CONTROLLER"
DELAY 2
CLEAR
SCREEN=3
STATE=0
PRINT 4,1 "X4:NEXT MENU"
X1 CONT
;Enable the X key routines for continuous operation
X2 CONT
X3 CONT
X4 CONT
INT1 CONT
FEEDLOOP:
IF SCREEN<>3 JMP FEED05
CLEAR 2
PRINT 2,2 "WAITING FOR START"
FEED05:
WAIT I4 ON
;Wait for start input
BATCH_CMPLT OFF
;Turn off batch complete output
STATE=1
TEMP_CNT=0
CORRECT = 0
IF SCREEN<>3 JMP FEED10
CLEAR 2
PRINT 2,2 "RUNNING BATCH"
FEED10:
ACCEL = ALPHA
;Set acceleration used in move
CREG_LEN = UTOC1 REG_LEN
;Convert registration length to
; encoder counts
IF SCREEN<>3 JMP FEED20
CLEAR 3
PRINT 3,1 "COUNT = ",TEMP_CNT,5,0