In (input), Function to read – Yaskawa SMC–4000 User Manual
Page 140
130
SMC–4000 User Manual
@IN (Input)
[I/O]
DESCRIPTION:
@IN returns the status of the digital input number or variable given in square brackets. Note that the @IN
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: @IN [n]
where
n is an integer corresponding to a specific input to be read.
MODBUS:
*Note With Modbus devices, I/O points of the devices are calculated using the following formula:
n = (SlaveAddress*1000) + (HandleNum*1000) + ((Module-1)*4) + (Bitnum-1)
Slave Address is used when ModBus device has slave devices connected to it and specified as Addresses 0
to 255. 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 H (1 - 8).
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:
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
#TEST
Program TEST
VAR1=2
Set variable
MG @IN[VAR1]
Display the status of digital input 2
VAR2=@IN[VAR1]+1
Perform calculation
EN
End of program
IF(@IN[604])
MG”Slave input 4 is ON”
ELSE
MG”Slave input 4 is OFF”
ENDIF