beautypg.com

Tr (trace mode), Debug, N=0 or 1 – Yaskawa LEGEND-MC User Manual

Page 237: 0 disables function, 1 enables function

background image

227

LEGEND-MC User’s Manual

TR (Trace Mode)

[Debug]

DESCRIPTION:

The TR command causes each instruction in a program to be sent out the communications port prior to
execution. TR1 enables this function and TR0 disables it. The trace command is useful in debugging
programs. It is not recommended to leave the TR command on for long durations (over 30 seconds)
because it takes much longer to output the data from the controller than to execute it, hence, program
execution will be affected. If no program lines are coming from the controller, issue “MG_XQn” or
“MG_HXn” to see what line the controller is on. If the controller is at a trippoint, no lines will be output.
Another way to take advantage of this command is to insert it in your program at a location previous to a
suspected trouble spot (TR1) and just after the trouble spot (TR0). This way the trace will only show
program lines that pertain to the debugging process.

ARGUMENTS: TR n

where

n=0 or 1

0 disables function

1 enables function

USAGE:

While Moving

Yes

Default Value

0

In a Program

Yes

Default Format

---

Command Line

Yes

Can be Interrogated

No

Used as an Operand

Yes

Distributed Control

No, Local