SimpleWriteArrayOfWord
SimpleWriteArrayOfWord (FB)
SimpleWriteArrayOfWord (FB)FUNCTION_BLOCK SimpleWriteArrayOfWord
Representation

Triggering the transmission of Modbus data
The data transmission is triggered if at least one of the conditions described below is met:
Requirement: A suitable array is connected to input arwInputArray . This is signaled by output xInputArrayValid (= TRUE).
after an edge change at input
xUpdateSetp(FALSE >> TRUE) (once)after the expiry of the duration
tTimeUpdateSetp(tTimeUpdateSetp> 0) (cyclic)after a change to the array at the input
arwInputArray(data type, size, contents) (once)after a change of essential parameters (
byUnitId,wRegisterAddr) (once)after an edge change at input
xEn(FALSE >> TRUE) (once)after each cold start (once)
Note: The data type of the array at input arwInputArray cannot be recognized and evaluated as of 07/07/2023 (CDS-43675 Compiler, AnyType: Extension for Arrays needed) In the tooltip help for input arwInputArray the possible array data types are displayed depending on the selected function code.
InOut:
Input
xEn
BOOL
TRUE
Enable / disable communication (TRUE = enable)
Input
byUnitId
BYTE
0
Modbus address of the device
Input
arwInputArray
__SYSTEM.AnyType
Input for the array of data to be written (FC16,
ARRAY OF WORD, ARRAY OF UINT (16 bits per element))
Input
xUpdateSetp
BOOL
FALSE
Update of setpoints (on every rising edge)
Input
xResError
BOOL
FALSE
Reinitialization of the outputs eErrorCodeCom or
eErrorCodeDev to the error-free state (on every
rising edge)
Inout
ModbusClient
ModbusClientBase
Client of the device
Output
wRegisterAddrFb
WORD
0
Feedback - start address of the register for the Modbus- telegram
Output
diInputArrayNumb
DINT
0
Number of array elements at the input arwInputArray
Output
xInputArrayValid
BOOL
FALSE
Validity of the array at the input arwInputArray (data type,
size) (FALSE = not valid, TRUE = valid)
Output
xAlarm
BOOL
FALSE
Collective fault (TRUE = fault)
Output
xAlarmCom
BOOL
FALSE
Collective fault - communication (TRUE = fault)
Output
eErrorCodeCom
ModbusErrorCode
ModbusErrorCode.NO_ERROR
Error code - communication (0 = no error)
Output
eErrorCodeDev
SIMPLE_WRITE_ARRAY_OF_WORD_ERROR_CODE
SIMPLE_WRITE_ARRAY_OF_WORD_ERROR_CODE.NO_ERROR
Error code - device (0 = no error)
Output
xBusy
BOOL
FALSE
Communication indicator (TRUE = communication)
Input Const
wRegisterAddr
WORD
Start address of the register for the Modbus telegram
Input Const
tTimeUpdateSetp
TIME
TIME#0ms
Update interval for the processes influenced by the input
xUpdateSetp influenced
Last updated

