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 397

Advertising
background image

Application Examples • Continuous Web with Registration

375

Publication 1398-PM601A-EN-P — October 2000

APPENDIXES

D=1,V=1000

DIF Incr,I15=OFF, JMP i1em

i1em: D=1,V=0

JMP mofs

Ck2: IF I16=OFF JMP Ck3;if I16=ON, offset backward

D=-1,V=1000

DIF -Incr,I16=OFF,i2em

I2em: D=-1,V=0

JMP mofs

Ck3:

;If more than 2 measurement lengths have

; gone by with no measurement,

; bring window out to a full-width search.

IF InWin=ON IF (CorPos-pos1)/(Incr*Navg) > 2

{

;use a full-width search

S1 OFF

S2 OFF

S3 CONT

InWin=OFF

INT1 CONT

}

IF Count>0 JMP Ck1

;if not ready for a correction yet, loop to Ck1

CorPos=POS1

;save correction position for in-window time-out

OfsError=OfsError/Navg

;find the average Offset Error

IF I13=OFF JMP skpcor

;if input 13 is off, no correction is done

; (optional)

MD OfsError

;do correction move using system velocity and accel

skpcor: IF InWin=ON JMP scc;if already windowing, skip check to start

; windowing

IF OfsError > WindRad JMP scc;if the Offset Error is less than

; window radius, use window

S3 OFF

;start windowing

S1 CONT

S2 CONT

InWin = ON

scc:

Navg = Navgbuf

;if new number to average (from Xkey),

; start using it

OfsError=0

Count = Navg

;allow scanned events to collect data again

JMP Ck1

mofs:

CLEAR

;this measures the current offset and puts the

; phase into Target.

S1 OFF

;turn off all scanned events

S2 OFF

S3 OFF

S4 OFF

FI1 = OFF

; ignore any previous interrupts

INT1 ON

;get next interrupt

WAIT FI1 ON

Target = I1P1 - PDelay * VEL1 ;position=position - sensor delay*VEL1

Offset = Target

;used later

FI1 = OFF

EnPos = Target - WindRad

DisPos = Target + WindRad

IF InWin=OFF JMP mofsO

S1 CONT

;InWind is ON

S2 CONT

JMP mofscc

Advertising