GSE 60 SERIES Technical Reference Manual page 401

Programmable process controllers
Table of Contents

Advertisement

80.1P%o%$
%E
end if
SPT#1 is ON%$
send text
2%A
activate fill output
%}
%N
else
SPT#1 is OFF%$
send text
%E
end if
< Next macro command(s) >
Note how the commands between the Start Group and End Group braces
are treated as the TRUE condition of the first "IF" statement. The second
"IF" statement and corresponding "END IF" command are executed
independent of the first "IF". The "ELSE" now corresponds to the first "IF"
statement.
Here is the same code as executed with a FALSE condition for setpoint
#1.
1%"
select comm1
1%D
deactivate setpoint #1
80.1P=5%o
VAR#5 (Product ID) = 5
1%O
if setpoint #1 is on...
%{
StartFill%P
prompt
80.1P!=0%o
if PRODUCT ID not 0...
Product ID %$
80.1P%o%$
%E
end if
SPT#1 is ON%$
send text
2%A
activate fill output
%}
%N
else
SPT#1 is OFF%$
send text
%E
end if
< Next macro command(s) >
Again, note how the braces control macro execution. The first "IF"
statement is FALSE. Since a Start Group brace immediately follows, all
subsequent commands are skipped until the corresponding End Group
brace is encountered.
P
OINTERS
send PRODUCT ID
send text
send PRODUCT ID
60 Series Technical Reference Manual
Macros 9-153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents