beautypg.com

Execute, Exit command – Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual

Page 84

background image

Message Procedure Commands

Chapter 6

6Ć6

Using the DELETE command on a procedure name not only deletes the
name but also erases the named procedure from PLC–3 memory. Using
DELETE on a symbolic address or interprocedural user symbol merely
deletes the symbol, but the data stored under that symbol remains intact.

Table 6.A shows the general format of the DELETE command. To delete
a symbol or a procedure from the current context, use the DELETE
command by itself (the modifier /LOCAL is optional). To delete a
symbol or a procedure from all contexts, use the modifier/GLOBAL after
the DELETE command.

The modifier /GLOBAL can be abbreviated to /G, and /LOCAL can be
abbreviated to /L. For example, the statement

D/G @ PARTS_PGM

deletes the procedure PARTS_PGM from all contexts in PLC–3 memory.

Note that the /LOCAL modifier can be used on global system symbols. In
such cases, the procedure or the symbol is deleted from the current
context but can still be used in the other contexts.

To execute a message procedure, simply enter the delimiter @ followed
by the procedure’s name. For example, the statement

@FIRST_PROC

causes execution of the procedure named FIRST_PROC.

Procedure names may be used anywhere that command can be used. In
this way, one procedure can execute (call) another procedure. This allows
for nesting of procedures. However, procedures may not be nested more
than 3 layers deep.

The EXIT command terminates execution of the current message
procedure. If the current procedure was called (executed) by another
procedure, the EXIT command returns control to the calling procedure.
Control returns to the line following the execute statement.

Execute

EXIT Command