Input Description¶
EN
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BOOL | FALSE | TRUE/FALSE | - |
The input EN has to be driven in edge triggered mode.
The execution of the Function Block is started with a positive edge on the input EN.
In the first call it evaluates its inputs and creates a local copy of them. Afterwards it starts its internal algorithm. It may take several PLC task cycles until it is executed.
Once the execution is completed DONE and its other outputs are set. To start the Function Block again a new positive edge on the input EN has to be applied.
SLOT
Data_Type | Default_Value | Range | Unit |
---|---|---|---|
BYTE | 0 | 0 … 4 (6) | - |
At input SLOT, the Communication Module slot is specified which should be used by the Function Block.
The internal Communication Module always has the index 0. All external Communication Modules are serially numbered from right to left, starting with 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
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 |
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
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: Communication \ with MODBUS RTU
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 | 125 words / 62 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 | 123 words / 61 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).