10ć14 – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual
Page 117
Using Commands in Report Generation
Chapter 10
10Ć14
Examples using the if command:
If you enter:
IF (ABC.EQ.12)P ’YOU SELECTED ENTRY #12’
The 1775-S4B scanner tests user symbol ABC. If ABC equals 12, the
statement YOU SELECTED ENTRY #12 displays. If ABC does not equal
12, the next command line executes.
Definition: To jump to a specific place in the procedure.
Abbreviation: G
Format: G
Description: The goto command tells the 1775-S4B scanner to jump to a
specific label in the procedure. When a goto command appears in a
procedure, the 1775-S4B scanner finds the label and begins executing the
next command line.
The label can consist of numeric digits, alphabetic characters, and the
underscore character. The first character must be an alphabetic character or
the underscore character. You can make the label any length, but its first
eight characters must be unique. A label can only appear once in a
procedure. Labels cannot have the same name as a command or command
abbreviation. You can use the goto command with the if command to
program loops in a procedure. Using loops in your procedure allows you to
execute command lines repeatedly based on a condition.
Examples using the goto command:
If you enter:
P ‘LINE1’
IF ($I:12/010) G SW 10_ON
P ‘LINE2’
SW10_0N:
P ‘LINE3’
10.3.7
Goto