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 = enabled )
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 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
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 with the first coil to be written (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 variable at input '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
General fault ( TRUE = fault )
Output
xAlarmCom
BOOL
FALSE
General 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 with the first coil to be written (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 operations influenced by the input 'xUpdateSetp'
Last updated

