On variable jump, Words, Case statement program structure – 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 262
240
Language Reference • Reference
Publication 1398-PM601A-EN-P — October 2000
WORDS
Example
01 = ON
02 = OFF
O3 = F1
04 = ON, T = 0.1
;turn on output 4 for 100 mS
05 = OFF, T = 3.2
;turn off output 5 for 3.2 S
ON variable
JUMP
Case Statement
Program Structure
Purpose
Jump to one of a list of labels based on the value of variable. The variable acts as a
pointer into the list of labels. Labels are zero-based, so if variable = 0, the program
jumps to the first label. If variable = 3, it jumps to the fourth label and so on. If the
value of variable is greater or equal to the number of labels in the list, execution falls
through to the next instruction after the ON variable JUMP instruction.
Syntax
ON Variable JUMP label1, label2, label3, ..., labeln
variable
The variable may be a nonvolatile variable Gn, a volatile variable
Vn, or a system variable.
labeln
labeln is any valid label in the program. n = 1, 2, ...
Remarks
This instruction is similar to the case instruction in many other programming lan-
guages.
See Also
JUMP, LABEL
Example
ON V1 JUMP LABEL1, LABEL2, LABEL3
ON G10 JUMP MODE1, MODE2, MODE3
ON V1 JMP START, LOAD, INDEX, ABORTMOVE, GO