5 programming basics, Introduction, Program maximums – Yaskawa LEGEND-MC User Manual
Page 259: Command syntax, For example, the command, Programming basics, Introduction program maximums command syntax, Program maximums command syntax
249
LEGEND-MC User’s Manual
5 Programming Basics
Introduction
The LEGEND-MC provides over 100 commands for specifying motion and machine parameters.
Commands are included to initiate action, interrogate status and configure the digital filter.
The LEGEND-MC instruction set is BASIC-like and easy to use. Instructions usually consist of two
uppercase letters that normally correspond phonetically with the appropriate function. For example, the
instruction BG begins motion, and ST stops motion.
Commands can be sent "live" for immediate execution by the LEGEND-MC, or an entire group of
commands (a program) can be downloaded into the LEGEND-MC memory for execution at a later time.
Combining commands into groups for later execution is referred to as Applications Programming and is
discussed in the following chapter.
This section describes the LEGEND-MC instruction set and syntax. A complete listing of all LEGEND-
MC instructions is included in the command reference section.
Program Maximums
Command Syntax
LEGEND-MC instructions are represented by two ASCII upper case characters followed by applicable
arguments. A space may be inserted between the instruction and arguments. A semicolon or
used to terminate the instruction for processing by the LEGEND-MC command interpreter.
For example, the command
PR 4000
Position Relative
PR is the two character instruction for Position Relative. 4000 is the argument which represents the
required position value in counts. The
4000 is optional.
For specifying data for the X,Y,Z and W axes, commas are used to separate the axes and preserve axis
order as X,Y,Z and W. If no data is specified for an axis, a comma is still needed as shown in the
examples below. If no data is specified for an axis, the previous value is maintained. The space between
the data and instruction is optional. For the LEGEND-MC, the eight axes are referred to
A,B,C,D,E,F,G,H where X,Y,Z,W and A,B,C,D may be used interchangeably.
To view the current values for each command, specify the command followed by a ? for each axis
requested. The LEGEND-MC provides an alternative method for specifying data.
Here data is specified individually using a single axis specified such as X,Y,Z or W (or A,B,C,D,E,F,G or
H for the LEGEND-MC). An equal sign is used to assign data to that axis. For example:
PRZ=1000 Sets the Z axis data as 1000
Commands per line
Until 80 characters
Labels among all threads
126
Lines among all threads
500
Subroutine nesting level
16
Threads
4
IMPORTANT: All LEGEND-MC commands must be upper case.