SimpleWriteCoils_FC15
SimpleWriteCoils_FC15 (FB)
SimpleWriteCoils_FC15 (FB)FUNCTION_BLOCK SimpleWriteCoils_FC15
Transmission of the states of one or more coils (FC15) (1 - 64 coils) to an address range (range: wCoilAddr … (wCoilAddr + wNumberOfCoils - 1))
CODESYS
InOut:
Input
xEn
BOOL
TRUE
Enable / disable communication (TRUE = enable)
Input
byUnitId
BYTE
0
Address of the device
Input
InputValue
__SYSTEM.AnyType
Input variable to determine the states of the coils (FC15) (BOOL, BYTE, ARRAY OF BOOL, ARRAY OF BYTE)
Input
xUpdateSetp
BOOL
FALSE
Update setpoints (on every rising edge)
Input
xResError
BOOL
FALSE
Reinitialize the outputs 'eErrorCodeCom' and 'eErrorCodeDev' to the fault-free state (on every rising edge)
Inout
ModbusClient
ModbusClientBase
Client of the device
Output
wCoilAddrFb
WORD
0
Feedback - start address of the coil(s) for the Modbus telegram (0 - 65535)
Output
wNumberOfCoilsFb
WORD
0
Feedback - number of coils to write (range: 1 - 64, wNumberOfCoils <= InputValue.diSize)
Output
wArrayStartIndexFb
WORD
0
Feedback - relative array element of the first coil to write (0 - (InputValue.diSize-1)) (only for data type ARRAY OF BOOL and ARRAY OF BYTE)
Output
eInputValueDataType
SIMPLE_WRITE_COILS_FC15_DATA_TYPE
SIMPLE_WRITE_COILS_FC15_DATA_TYPE.INVALID_TYPE
Internal classification of the data type of the variable with the coil states (0 = invalid, 1 = BOOL, 2 = BYTE, 3 = ARRAY)
Output
xInputValueValid
BOOL
FALSE
Validity of the input variable 'InputValue' (FALSE = not valid, TRUE = valid)
Output
xErrorFreeDataTransmission
BOOL
FALSE
Status of the data transmission (FALSE = faulty, rising edge = error-free)
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_COILS_FC15_ERROR_CODE
SIMPLE_WRITE_COILS_FC15_ERROR_CODE.NO_ERROR
Error code - device (0 = no error)
Output
xBusy
BOOL
FALSE
Communication indicator (TRUE = communication)
Input Const
wArrayStartIndex
WORD
0
Relative array element of the first coil to write (0 - (InputValue.diSize-1)) (only for data type ARRAY OF BOOL and ARRAY OF BYTE)
Input Const
wNumberOfCoils
WORD
1
Number of coils to write (range: 1 - 64, wNumberOfCoils <= InputValue.diSize)
Input Const
wCoilAddr
WORD
1
Start address of the coil(s) for the Modbus telegram (0 - 65535)
Input Const
tTimeUpdateSetp
TIME
TIME#0ms
Update interval for the operations influenced by the input ‘xUpdateSetp’
Last updated

