Xloopindex, Xnactive – 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 306
284
Language Reference • Reference
Publication 1398-PM601A-EN-P — October 2000
WORDS
XLOOPINDEX
X-Routine Loop Index
System
Purpose
The LOOP counter for the LOOP instruction used in the Xkey routine.
Syntax
XLOOPINDEX= value
variable = XLOOPINDEX
value
Value can be a constant, a global variable Gn, a volatile variable
Vn, or another system variable.
variable
Variable can be a nonvolatile variable Gn, a volatile variable
Vn, or another system variable.
Remarks
Mark the end of a block of instructions to be repeated in a loop. The range of the loop
counter is 0 to 65535. If count is 0 the statements in the loop will not execute.
The LOOP statements cannot be used in Fkey or Scanned Event routines. If a subrou-
tine is called from a LOOP, the subroutine may not contain a LOOP.
The XNPGM = number statement can be used to simulate pressing an Xkey from
within a program.
See Also
LOOP, LOOPINDEX, REPEAT
Example
X1:
LOOP 3
V4 = XLOOPINDEX
PRINT V4
REPEAT
XEND
XNACTIVE
Xkey Routine Active
System
Purpose
Xkey active flag. This flag indicates when an Xkey on the Operator Terminal is
pressed.
Syntax
variable = XNACTIVE
variable
The variable may be a nonvolatile flag Bn, a volatile flag Fn, or
another system flag.
Remarks
ON indicates that and Xkey is pressed. OFF indicates there are no Xkeys pressed. The
XNPGM = number statement can be used to simulate pressing an Xkey from within a
program.
See Also
FNACTIVE, Xn, Operator Terminal
Example
WAIT XNACTIVE = OFF