Input DescriptionΒΆ

../_images/35d20c58e38a21f70a33139000eba54e

EN   BOOL \   (enable)

If a FALSE -> TRUE edge is applied to input EN, all further inputs are read in. If the input values are valid, a request telegram is sent to the specified server. If at least one input is invalid, no telegram is generated and the error is displayed at output ERR instead.

While the request is processed, state changes at input EN are recognized but not evaluated.

SLOT   BYTE \   (slot)

At input SLOT, the Communication Module slot (module number) is selected which shall be used by the Function Block.

The internal Communication Module always has the module number 0. All external Communication Modules are serially numbered from right to left, starting with module number 1.

IP_ADR   DWORD \   (IPaddress)

At IP_ADR, the IP address of the server has to be specified to which the telegram should be sent. Each byte in IP_ADR represents one octet of the address.

Example:

IP address 192.15.24.2,

IP_ADR (hex) 16#C00F1802,

IP_ADR (dec) 3222214658

UNIT_ID   BYTE \   (unit \ ID)

At input UNIT_ID, the address of the MODBUS slave must be specified which is connected serially to the MODBUS server defined by IP_ADR. If no further slaves are connected, this input is not used.

FCT   BYTE \   (function \ code)

The function code of the request telegram is specified at input FCT. The following function codes are supported:

01 or 02 read n bits
03 or 04 read n words
05 write one bit
06 write one word
07 read 8 Bit
15 write n bits
16 write n words
22 Mask write
23 Read/write multiple words

Note

The max. telegram length for Onboard Ethernet CPUs with function code 3/4 is 96 words.

The max. telegram length for Onboard Ethernet CPUs with function code 15 is 1536 bits.

ADDR   WORD \   (address)

Input ADDR is used to specify the operand/register address in the server from which on data should be read or written. The access to operands of AC500 devices in OpenModbus on TCP/IP (server mode) is defined via the MODBUS address list.

Only operands that are listed in the MODBUS address list may be used. When accessing other devices, ADDR is freely selectable. The valid ranges have to be gathered from the corresponding device description.

If using Modbus function codes 22 or 23, the according data structures ETH_MOD_FCT22_TYPE ETH_MOD_FCT22_TYPE or ETH_MOD_FCT23_TYPE ETH_MOD_FCT23_TYPE must be defined and applied to ADDR input.

NB   WORD \   (number)

At input NB, the number of data to be written or read is specified. The unit of NB depends on the selected function. For bit accesses the number of bits, for word and double word accesses the number of words is specified at NB. The following restrictions apply to the length:

FCT NBmax
Dec Hex Serial Modbus on TCP/IP
01 or 02 01 or 02 2000 bits

255 bits (up to firmware version V01.33)

1800 bits (from firmware version V01.41)

1536 bits (PM573/PM583 only)

03 or 04 03 or 04 125 words / 62 double words 100 words / 50 double words
05 05 1 bit 1 bit
06 06 1 word 1 word
07 07 8 bits 8 bits
15 0F 1968 bits

255 bits (up to firmware version V01.33)

1800 bits (from firmware version V01.41)

1536 bits (PM573/PM583 only)

16 10 123 words / 61 double words 100 words / 50 double words
22 16 Write: 1 word Write: 1 word
23 17

Read: 125 words / 62 double words

Write: 123 words / 61 double words

Read: 125 words / 62 double words

Write: 123 words / 61 double words

DATA   DWORD \   (data)

At input DATA, the address of the first operand in the client, from which on the data shall be written to the server or where the data read by the server shall be stored, is specified via the ADR operator. For this purpose it is necessary that the operand type (e.g. bit) matches the selected function (e.g. FCT 1, read n bits).