Out (output), Function, Bitnum is the i/o point in the module from 1 to 4 – Yaskawa LEGEND-MC User Manual
Page 190

180
LEGEND-MC User’s Manual
@OUT (Output)
[Function]
DESCRIPTION:
@OUT returns the status of the digital output number or variable given in square brackets. Note that the
@OUT command is a function, which means that it does not follow the convention of the commands, and
does not require the underscore when used as an operand.
ARGUMENTS: @OUT [n]
where
n is an integer corresponding to a specific output on the controller. The first output on the controller is
denoted as output 1. A LEGEND-MC controller has 4 digital outputs plus applicable I/O connected by
Modbus.
NOTE: When using Modbus devices, the I/O points of the modbus devices are calculated using the
following formula:
n = (SlaveAddress*1000) + (HandleNum*1000) + ((Module-1)*4) + (Bitnum-1)
Slave Address is used when the ModBus device has slave devices connected to it and specified as
Addresses 0 to 255. Please note that the use of slave devices for modbus are very rare and this number will
usually be 0.
HandleNum is the handle specifier from A to P (1 - 16).
Module is the position of the module in the rack from 1 to 16.
BitNum is the I/O point in the module from 1 to 4.
USAGE:
EXAMPLES:
NOTE: @OUT only returns the output state of local controller.
While Moving
Yes
Minimum n value
1
In a Program
Yes
Maximum n value
8
Not in a program
Yes
Default Value
---
Can be Interrogated
No
Default Format
---
Used as an Operand
Yes
Distributed Control
No, Local
#TEST
Program TEST
VAR1=3
Set variable
MG @OUT[VAR1]
Display only the whole number portion of
VAR1
EN
End of program