
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–61803E–1/10
PROGRAMMING
120
In ”PMC axis control” with the macro executor, if only simple move
commands are to be issued according to some event, move commands just
need to be supplied regardless of whether they are commands with G
codes or commands with variables. If, however, alarms and the
completion of the movement of a specified block are to be monitored, the
states of the PMC command signal variable (#87x0) and the PMC status
signal read variable (#87x5) must be monitored.
(1) State management
If it is necessary to wait for the completion of movement after issuing
a move command, state management must be performed by
establishing a state variable, because if a loop is formed within the
macro, the screen will be locked during that time.
(Example)
#100: State variable
#100 <> 1: Steady state
The system monitors for an appropriate event. Upon
detecting an event, the system executes the move
command and sets #100 to 1.
#100 = 1: Axial movement is in progress.
The system waits for the completion of movement.
Upon completion, the system performs an error
check and returns #100 to 0.
(2) Determining the completion of movement
The completion of movement can be determined if the following
three conditions are satisfied:
– The EBUF of the PMC command signal variable (#87x) and
the EBSY of the PMC status signal read variable (#87x5) are
in the same state.
– The EGEN and ECKZ of the PMC status signal read variable
(#87x5) are both equal to 0.
– The EINP of the PMC status signal read variable (#87x5) is
equal to 1.
(Example)
IF[[#87x0 AND 128] NE [#87x5 AND 128]] GOTO 999
IF[[#87x5 AND 18] NE 0] GOTO 999 to Movement is in progress.
IF[[#87x5 AND 1] NE 1] GOTO 999
Completion of movement
6.22.3
PMC Axis Control
Example