The communication functions are the same as those described in the communication functions on Modbus.
Although a remote Modbus station does not have an X-Way format address, each communication function will use an X-Way format address to designate a remote IP station.
For each remote Modbus station, you must configure the pair in the correspondence table (IP address, {network.station} X-Way) where:
For example, the X-Way address {2.108} is associated with the IP address 139.160.2.8.
This address will only be used by the local Premium module. It is not sent over the network.
In the case of a remote Premium station configured with the Modbus protocol, you should give an X-Way station address that takes the number of the local station and increments it by 100.
Sending Communication Functions
When the application sends communication functions to a remote device connected to Modbus via a serial-link Ethernet/Modbus gateway, the function address must be one of the following:
ADDR(‘{network number. station number}0.0.0.Modbus destination address’)
where:
This syntax supports Modbus addresses in the range 0...253. On the Ethernet network, the Modbus TCP/IP frame will be sent to the gateway with the Modbus address coded in the Unit_Id field.
In the case the Unit_Id code is 254 or 255, for example to address TSX ETG100 gateway, the following syntax should be used:
ADDR(‘{network number. station number}0.0.254.255’) to access the local variables of the TSX ETG100.
or
ADDR(‘{network number. station number}0.0.254.Modbus destination address’).
The following requests are addressed to the device with which you wish to perform variable read or write operations:
Modbus Request
|
Modbus Function Code
|
Equivalent UNI-TE Function
|
Read bits
|
16#01
|
READ_VAR
|
Read words (up to 125 registers)
|
16#03
|
READ_VAR
|
Write a bit or n bits
|
16#0F
|
WRITE_VAR
|
Write a word or n words
|
16#06 or 16#10
|
WRITE_VAR
|
Read input bits
|
16#02
|
SEND_REQ
|
Read input words
|
16#04
|
SEND_REQ
|
NOTE:
The timeout value for READ_VAR is user-configurable as follows:
-
If you enter a 0 as the timeout value, the block will never timeout.
-
If you enter a non-zero value, the block will timeout at the non-zero value you entered.
NOTE: In server mode only, an ETY module can support function code 16#16, allowing it to mask the writing of a specified word.
Correspondence of Object Types
This table describes object type correspondence between a Premium PLC and a Momentum or Quantum PLC:
Premium Objects
|
Quantum or Momentum Objects
|
%MW: internal words
|
4x... memory area
|
%M: internal bits
|
0x... memory area
|
%IW: input words
|
3x... memory area
|
%I: input bits
|
1x... memory area
|