In (input), Bitnum is the i/o point in the module from 1 to 4 – Yaskawa LEGEND-MC User Manual

Page 145

Advertising
background image

135

LEGEND-MC User’s 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.

When using this command to access I/O on a slave controller in distributed control mode, use it with the handle for
outbound master commands. Do not use the handle which is for incoming slave update packets. For example, if a
slave is connected on handles E and F, reference the I/O for the slave on handle E.

ARGUMENTS: @IN [n]

where

n is an integer corresponding to a specific output on the controller to be cleared (set to 0). 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.

DISTRIBUTED CONTROL:

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 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:

Handle

Command

Handle

Command

A

@IN[101] ~ @IN[104]

I

@IN[901] ~ @IN[904]

B

@IN[201] ~ @IN[204]

J

@IN[1001] ~ @IN[1004]

C

@IN[301] ~ @IN[304]

K

@IN[1101] ~ @IN[1104]

D

@IN[401] ~ @IN[404]

L

@IN[1201] ~ @IN[1204]

E

@IN[501] ~ @IN[504]

M

@IN[1301] ~ @IN[1304]

F

@IN[601] ~ @IN[604]

N

@IN[1401] ~ @IN[1404]

G

@IN[701] ~ @IN[704]

O

@IN[1501] ~ @IN[1504]

H

@IN[801] ~ @IN[804]

P

@IN[1601] ~ @IN[1604]

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

Offset, 100

#TEST

Program TEST

VAR1=2

Set variable

MG @IN[VAR1]

Display the status of digital input 2

VAR2=@IN[VAR1]+1

Perform calculation

Advertising