Function Description
The READ_VAR
function is used to
read the value of one or more language objects:
internal bits,
internal words.
Verify that the objects to be read are consecutive. They may be located in a remote CPU or in a device connected to a communication channel.
On Modicon M340 and M580 CPU, the READ_VAR
function can read up to 2,000 consecutive bits in a remote device.
On Premium PLCs, the READ_VAR
function
can read up to 1,000 consecutive bits in a remote device, whatever
the device and the protocol used may be (Uni-Telway or Modbus/Jbus).
SEND_REQ
function.WARNING | |
---|---|
The additional parameters EN
and ENO
can be configured.
FBD Representation
Representation:

LD Representation
Representation:

IL Representation
Representation:
LD Address
READ_VAR Object_Type, First_Object, Object_Number, Management_Param, Receiving_Array
ST Representation
Representation:
READ_VAR(Address, Object_Type, First_Object, Object_Number, Management_Param, Receiving_Array);
Parameter Description
The following table describes the input parameters:
Parameter |
Type |
Comment |
---|---|---|
|
ARRAY [0..5] OF ARRAY [0..7] OF |
Specific statements by hardware platforms:
|
|
|
Type of objects to read for Premium PLC:
Type of objects to read for Modicon M340 and M580 CPU:
|
|
|
Index of the first object to read. |
|
|
Number of objects to read. |
The following table describes the input/output parameters:
Parameter |
Type |
Comment |
---|---|---|
|
ARRAY [0..3] OF |
Exchange management table consisting of the following words:
For detailed information, refer to section Structure of the Management Parameters. |
The following table describes the output parameters:
Parameter |
Type |
Comment |
---|---|---|
|
ARRAY [n..m] OF |
Word table containing the value of the objects read. NOTE: The size of the data received
(in bytes) is written automatically by the system in the fourth word
of the management table.
|
Rules of Use
Verify that object types are entered consistently. Write entries either all in lower case or all in upper case; otherwise, the function sends back a report equal to 16#06 (incorrect specific parameters).
For Micro, Premium or Atrium PLCs receiving the READ_VAR
function, read-only access to internal bits has
the following particularities:
The forcing value of the bits is returned in the response,
Reading 1 bit therefore comprises 2 response bytes:
The first contains the value of the 8 bits from the one requested.
The second indicates whether these bits have been forced.
In order to read one of the last 8 bits of the memory it is necessary to read all the last 8 bits, otherwise the function sends back a 16#01 operation report. This last particularity also applies to Modicon M340 and M580 PLCs.
READ_VAR
and WRITE_VAR
functions, since Modbus protocol does not support it.Simultaneous Transactions
The following table gives the capacities of each communication channel to simultaneously process transactions according to various configurations on Micro and Premium PLCs.
Configuration |
Micro |
TSX 57 10 |
TSX 57 20 |
TSX 57 23/30/40/45/55, PCX 57, PMX 57 |
TSX 57 46/56 |
---|---|---|---|---|---|
Uni-Telway master terminal port |
4 |
4 |
4 |
4 |
8 |
Uni-Telway master PCMCIA or SCY link |
1 |
8 |
8 |
8 |
8 |
Uni-Telway client slave terminal port |
4 |
1 |
1 |
1 |
8 |
Uni-Telway client slave PCMCIA or SCY link |
1 |
1 |
1 |
1 |
1 |
Uni-Telway server slave terminal port |
4 |
4 |
4 |
4 |
4 |
Uni-Telway server slave PCMCIA or SCY link |
4 |
6 |
6 |
6 |
6 |
Modbus terminal port |
4 |
- |
- |
- |
- |
Modbus PCMCIA or SCY link |
4 |
8 |
8 |
8 |
8 |
Character mode terminal block |
1 |
1 |
1 |
1 |
1 |
Character mode PCMCIA or SCY link |
4 |
8 |
8 |
8 |
8 |
CANopen PCMCIA |
- |
10 |
10 |
10 |
10 |
Fipway PCMCIA or SCY link |
4 |
8 |
8 |
8 |
8 |
Modbus Plus |
4 |
4 |
4 |
4 |
4 |
Ethernet |
- |
16 |
16 |
16 |
16 |
Embedded Ethernet |
- |
- |
- |
- |
64 |
Capacities of each communication channel to simultaneously process transactions according to various configurations on Modicon M340 PLCs:
Configuration |
BMX P34 1000 |
BMX P34 2000 |
BMX P34 2010/20102 |
BMX P34 2020 |
BMX P34 2030/ 20302 |
---|---|---|---|---|---|
Embedded CANopen |
- |
- |
16 |
- |
16 |
Embedded Ethernet |
- |
- |
- |
16 |
16 |
Modbus master serial port |
8 |
16 |
16 |
16 |
- |
Maximum number of requests as client per scan on standalone M580 CPUs:
Configuration |
CPU Reference (BME P58 ...) |
|||||
---|---|---|---|---|---|---|
10•0 |
20•0 |
30•0 |
40•0 |
5040 |
6040 |
|
Ethernet |
16 |
32 |
48 |
80 |
80 |
96 |
Maximum number of requests as client per scan on Hot Standby M580 CPUs:
Configuration |
CPU Reference (BME H58 ...) |
||
---|---|---|---|
2040 |
4040 |
6040 |
|
Ethernet |
32 |
80 |
96 |
Maximum number of requests served per scan on standalone M580 CPUs:
Configuration |
CPU Reference (BME P58 ...) |
|||||
---|---|---|---|---|---|---|
10•0 |
20•0 |
30•0 |
40•0 |
5040 |
6040 |
|
CPU from all origin (1.) |
16 |
24 |
32 |
40 |
48 |
64 |
Embedded Ethernet |
8 |
12 |
16 |
24 (2.) |
32 |
32 |
USB |
4 |
4 |
4 |
4 |
4 |
4 |
1. %SW90 system word allows to adjust the number of requests served per cycle. The minimum number of requests served per cycle is set to 2 in order to reduce the CPU jitter. 2. Maximum number of requests is 16 for M580 CPU BME P58 40•0 with firmware version ≤ 1.20. |
Maximum number of requests served per scan on Hot Standby M580 CPUs:
Configuration |
CPU Reference (BME H58 ...) |
||
---|---|---|---|
2040 |
4040 |
6040 |
|
CPU from all origin (1.) |
24 |
40 |
64 |
Embedded Ethernet |
12 |
24 |
32 |
USB |
4 |
4 |
4 |
1. %SW90 system word allows to adjust the number of requests served per cycle. The minimum number of requests served per cycle is set to 2 in order to reduce the CPU jitter. |