Loopindex, Lpos – 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 256

234
Language Reference • Reference
Publication 1398-PM601A-EN-P — October 2000
WORDS
LOOPINDEX
Loop Index
System
Purpose
The LOOP counter for the LOOP instruction used in a subroutine or the main body of
the program.
Syntax
variable = LOOPINDEX
LOOPINDEX = value
variable
Variable can be a nonvolatile variable Gn, a volatile variable
Vn, or another system variable.
value
Value can be a nonvolatile variable Gn, a volatile variable Vn,
another system variable, or a constant.
Remarks
This variable may be used to determine how many times the statements in a loop have
been executed. This variable initially is set to the value in the loop statement, and
counts down to zero. The variable must be in the range of 65535 to 0.
See Also
LOOP, XLOOPINDEX, REPEAT
Example
LOOP 10
V4 = LOOPINDEX
PRINT V4
REPEAT
LPOS
Position, Latched
Interrupts
Purpose
Hardware latched position in user units.
Syntax
variable = LPOS
variable
The variable may be a nonvolatile variable Gn, a volatile vari-
able Vn, or a system variable.
Remarks
Value of POS1 or POS2 (depending on Feedback Configuration) that is latched in
hardware when an interrupt 1 (INPUT 11, P1-12) is received.
See Also
InPm, Configuration menu
Example
V3 = LPOS
G1 = LPOS - POS1