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 395

Application Examples • Continuous Web with Registration
373
Publication 1398-PM601A-EN-P — October 2000
APPENDIXES
TITLE "WEB"
;Version 3.00 2/29/96
PGMTYPE = MAINPGM
;This program corrects every n patterns and has a capture band to reject
; noise. This program uses a Scale of 1 to compensate for roll-over.
;This was written assuming the web is moving "forward."
; -------------------------- Start of Assignments --------------------------
ASSIGN Target
V1
;absolute position INT1 should ideally capture
ASSIGN EnPos
V2
;absolute position to ENable position capture
ASSIGN DisPos
V3
;absolute position to DISable position capture
ASSIGN OfsError
V4
;Offset Error--error between ideal and measured
; positions
ASSIGN Incr
V5
;holds counts between leading edges of patterns
ASSIGN Count
V6
;number of cycle measurements until error measurement
ASSIGN Navgbuf
V7
;buffer for changing Navg
ASSIGN PDelaybuf
V8
;detector delay xkey temp.
ASSIGN CorPos
V9
;last correction position
ASSIGN Ratio
G1
;follower/master ratio
ASSIGN Offset
G2
;ideal offset as a modulus of Incr Valid between 0 and 1
ASSIGN Navg
G4
;number of prints to use for average
ASSIGN PDelay
G5
;photo detector delay
ASSIGN WindRad
G6
;radius of the capture window surrounding the expected
; photo mark
ASSIGN InWin
F1
;capture window mode flag
; ------------------------- Start of Scanned Events ------------------------
;S1 & S2 are the windowed search
S1: IF (POS1 - EnPos ) > 0 ;if POS1>EnPos, enable interrupt
INT1 ON
; (done this way to avoid roll-over problems)
S2: IF (POS1 - DisPos) > 0;if POS1>DisPos
{
INT1 OFF
EnPos = EnPos + Incr
;Increment "window" Enable and Disable
; positions
DisPos = DisPos + Incr
Target = Target + Incr ;Increment Target
}
S3: IF (POS1 - DisPos) > 0 ;if POS1>DisPos--this is full-width search
{
EnPos = EnPos + Incr
DisPos = DisPos + Incr
Target = Target + Incr
INT1 ON
;enable interrupt for next cycle
}
S4: IF FI1 = ON
{
IF Count > 0
;if capture has happened and Count>0
{
;OfsError = OfsError + Target - (I1P1-PDelay*VEL1)
OfsError = OfsError + Target - I1P1 + PDelay * VEL1
Count = Count -1
FI1 = OFF
;turn off interrupt flag
}
}
; -------------------- Start of Xkey Routines -----------------------------
X1:
;X1 key routine
CLEAR
PRINT 3,1 "Patterns to use for"
READ 4,1 "average: ",SHOW Navgbuf (1,99)
CLEAR