SimpleWriteValueCoil
SimpleWriteValueCoil (FB)
SimpleWriteValueCoil (FB)FUNCTION_BLOCK SimpleWriteValueCoil
Use of type conversion operators (e.g. REAL_TO_WORD) directly on the input 'InputValue'
In this configuration compiler error messages of type C0032 are generated, a download is not possible. Remedy: Use an intermediate variable of the explicit type WORD directly at the output of the type conversion operator. Connect the intermediate variable to the input 'InputValue'.\
Codesys
InOut:
Input
xEn
BOOL
TRUE
Enable / disable communication ( TRUE = enabled )
Input
byUnitId
BYTE
0
Address of the device
Input
InputValue
__SYSTEM.AnyType
Input variable to determine the states of the coils ( FC05, FC15) (BYTE, WORD, DWORD, LWORD)
Input
xUpdateSetp
BOOL
FALSE
Update of setpoint values (on every rising edge )
Input
xResError
BOOL
FALSE
Reinitialization of the outputs ‘eErrorCodeCom’ and ‘eErrorCodeDev’ to the error-free state (on every rising edge)
Inout
ModbusClient
ModbusClientBase
Client of the device
Output
eFunctionCodeFb
WriteFunctionCodesCoil
Feedback - Modbus function code for the Modbus telegram
Output
wCoilAddrFb
WORD
Feedback - start address of the coil for the Modbus telegram
Output
xAlarm
BOOL
General fault ( TRUE = fault )
Output
xAlarmCom
BOOL
General fault - communication ( TRUE = fault )
Output
eErrorCodeCom
ModbusErrorCode
Error code - communication ( 0 = no error )
Output
eErrorCodeDev
SIMPLE_WRITE_VALUE_ERROR_CODE
Error code - device (0 = no error)
Output
xBusy
BOOL
Communication indicator ( TRUE = communication )
Input Const
eFunctionCode
WriteFunctionCodesCoil
WriteFunctionCodesCoil.FC05_WriteSingleCoil
Modbus function code for the Modbus telegram
Input Const
wCoilAddr
WORD
Start address of the coil for the Modbus telegram
Input Const
tTimeUpdateSetp
TIME
TIME#0ms
Update interval for operations influenced by the input 'xUpdateSetp'
Last updated

