Debugging programs, Program flow commands, Program flow command summary – Yaskawa LEGEND-MC User Manual
Page 294: Event triggers & trippoints

284
LEGEND-MC User’s Manual
Debugging Programs
The LEGEND-MC provides trace and error code commands which are used for debugging programs. The
trace command may be activated using the command, TR1. This command causes each line in a program
to be sent out to the communications port immediately prior to execution. The TR1 command is useful for
debugging programs. TR0 disables the trace function. The TR command may also be included as part of a
program.
If there is a program error, the LEGEND-MC will halt program execution at the line number at which an
error occurs and display the line. The user can obtain information about the type of error condition that
occurred by using the command, TC1. Check the TC (Tell Code) command reference page for a complete
listing of the codes.
Program Flow Commands
The LEGEND-MC provides instructions that control program flow.the LEGEND-MC program sequencer
executes instructions in a program sequentially. Program Flow commands, however, may be used to
redirect program flow. A summary of these commands is given below and they are detailed in the
following sections.
Program Flow Command Summary
Event Triggers & Trippoints
To function independently from the host computer, the LEGEND-MC can be programmed to make
decisions based on the occurrence of an event. Such events include waiting for motion to be complete,
waiting for a specified amount of time to elapse, or waiting for an input to change logic levels.
The LEGEND-MC provides several event triggers that cause the program sequencer to halt until the
specified event occurs. Normally, a program is automatically executed sequentially one line at a time.
AD
After Distance Trigger
AI
After Input Trigger
AM
After Motion Complete Trigger
AP
After Absolute Position Trigger
AR
Relative Distance Trigger
AS
After Speed Trigger
AT
Wait for time with respect to reference
AV
After Vector Distance Trigger
ELSE
ELSE Function for use with IF Conditional Statement
ENDIF
End of IF Conditional Statement
IF
IF Conditional Statement
JP
Conditional Jump
JS
Conditional Jump to Subroutine
MC
Trigger "In position" trigger (TW x,y,z,w sets timeout for in-position)
MF
Trigger Forward motion
MR
Trigger Reverse motion
WC
Wait for Contour Data
WT
Wait for time to elapse