Debugging programs, Program flow commands – Yaskawa SMC–4000 User Manual
Page 315
![background image](https://www.manualsdir.com/files/819559/content/doc315.png)
305
SMC–4000 User Manual
Debugging Programs
The SMC–4000 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 SMC–4000 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 SMC–4000 provides instructions that control program flow. The SMC–4000 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
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