Op (output port), M is an integer, Op contains the status of the outputs – Yaskawa LEGEND-MC User Manual
Page 189

179
LEGEND-MC User’s Manual
OP (Output Port)
[I/O]
DESCRIPTION:
The OP command sets 4 bits of data on the output port of the controller simultaneously.
The n parameter is used to specify the number of bits affected starting with the LSB. The other bits are
masked. For example, if n=2, only outputs 1 and 2 will be changed by OP m. If the n parameter is not
specified, all bits will be changed.
To set or read outputs on a slave controller use the SA command.
ARGUMENTS: OP m
where
m is an integer
USAGE:
OPERAND USAGE:
_OP contains the status of the outputs.
RELATED COMMANDS:
EXAMPLES:
While Moving
Yes
Minimum m Value
0
In a Program
Yes
Maximum m Value
15
Command Line
Yes
Default m Value
0
Can be Interrogated
Yes
Default Format
3.0
Used as an Operand
Yes
Distributed Control
Use SA
"SB"
Set output bit
"CB"
Clear output bit
OP 0
Clear Output Port -- all bits
OP 3
Set outputs 1 and 2; clear the others
OP 7
Set outputs 1, 2 and 3.
MG_OP
Message out the status of the outputs
SAA=”MG”,”_OP”
Send command MG_OP to slave controller on
handle A
SlaveOut=_SAA
Store the returned value to variable
SAA=”OP”,$OF
Set all four outputs ON in slave controller on
handle A