10ć12 – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual
Page 115
Using Commands in Report Generation
Chapter 10
10Ć12
Definition: To halt procedure execution.
Abbreviation: EX
Format: EX
Description: You can use the exit command in a procedure to halt
procedure execution. If you enter this command into a procedure which is
called by a higher nested level procedure, the 1775-S4B scanner continues
executing the next highest procedure. The exit command is similar to the
RETURN instruction which ends a subroutine in a ladder diagram
program.
At the end of each procedure is an implied exit command.
Examples using the exit command:
From our last example, suppose @MAKEUP is a monthly report
procedure and you have three other procedures for monthly reports
(@MAKEUP2, @MAKEUP3, and @MAKEUP4). You could have all four
of these reports execute under one procedure which we call @REPORT. by
entering the following lines:
P ‘Report Items For 4 reports’
@MAKEUP
@MAKEUP2
@MAKEUP3
@MAKEUP4
The 1775-S4B scanner displays the introductory line followed by the
execution of @MAKEUP, @MAKEUP2, @MAKEUP3, @MAKEUP4.
If you enter the following lines for the procedure @MAKEUP:
P ‘Report Items‘
I($I:2/03) EX
@ITEMA
@ITEMB
In executing @MAKEUP, If bit I:2/03 is:
Off, the 1775-S4B scanner executes procedures @ITEMA and
@ITEMB
On, the 1775-S4B scanner exits procedure execution before executing
@ITEMA and @ITEMB. The 1775-S4B scanner returns to @REPORT
and executes @MAKEUP2, @MAKEUP3, and @MAKEUP4.
10.3.4
Exit