Input Description

../_images/d31e5a4ee38ac4da0a33139000eba54e

EN

Data_Type Default_Value Range Unit
BOOL - - -

The Program is activated (EN = TRUE) or deactivated (EN = FALSE) via input EN. If the Program is active, the current values are available at the outputs.

COM

Data_Type Default_Value Range Unit
BYTE - - -

At input COM, the MODBUS interface number is specified.

COM = 1:  COM1

COM = 2:  COM2

SLAVE

Data_Type Default_Value Range Unit
BYTE - - -

At input SLAVE, the address of the slave to which the telegram shall be sent is specified.

FCT

Data_Type Default_Value Range Unit
BYTE - - -

The function code of the request telegram is specified at input FCT.

01 or 02 Read n bits
03 or 04 Read n words
05 Write one bit (encoded in one word)
06 Write one word
07 Read 8 Bit
15 Write n bits (encoded in one byte)
16 Write n words
22 Mask write
23 Read/write multiple words in one telegram

TIMEOUT

Data_Type Default_Value Range Unit
WORD - - ms

The telegram timeout in milliseconds (ms) is specified at input TIMEOUT.

If no response is received within the time interval specified in TIMEOUT, the procedure is aborted and an error identifier is output.

Note

Keeping the timeout depends on the cycle time of the task in which the MODMAST Function Block is processed. The real time may deviate from the specification in worst case by task cycle time - 1 ms.

ADDR

Data_Type Default_Value Range Unit
WORD - - -

The operand/register address in the slave from which data should be read or written is specified at input ADDR.

The access to operands of AC500 devices in Modbus slave mode is defined via the Modbus cross-reference list. Only operands that are listed in the cross-reference list may be used (Communication with Modbus RTU: Communication \ with MODBUS RTU Communication \ with Modbus® RTU and Modbus® TCP/IP).

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.

NB

Data_Type Default_Value Range Unit
WORD - - -

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

Data_Type Default_Value Range Unit
DWORD - - -

At input DATA, the address of the first operand in the master is specified, from which data are copied/written to the slave or to which the data read by the slave should be stored. For this purpose it is necessary that the operand type (e.g. bit) matches the selected function (e.g. FCT 1, read n bits).

If using Modbus function codes 22 or 23, the according data structures COM_MOD_FCT22_TYPE COM_MOD_FCT22_TYPE or COM_MOD_FCT23_TYPE COM_MOD_FCT23_TYPE must be defined and applied to DATA.