SimpleWriteCoils_FC15
SimpleWriteCoils_FC15 (FB)
SimpleWriteCoils_FC15 (FB)FUNCTION_BLOCK SimpleWriteCoils_FC15
Representation

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
Device address
Input
InputValue
__SYSTEM.AnyType
Input variable for determining the states of the coils (FC15) (BOOL, BYTE, ARRAY OF BOOL, ARRAY OF BYTE)
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
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 be written (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 the
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
states of the coils (0 = invalid, 1 = BOOL, 2 = BYTE, 3 =
ARRAY)
Output
xInputValueValid
BOOL
FALSE
Validity of the variable at the input InputValue (FALSE =
invalid, TRUE = valid)
Output
xErrorFreeDataTransmission
BOOL
FALSE
Status of the data transmission (FALSE = faulty, LH- transition = 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 with the first coil to be written
(0 - (InputValue.diSize-1)) (only for the data type ARRAY OF
BOOL and ARRAY OF BYTE)
Input Const
wNumberOfCoils
WORD
1
Number of coils to be written (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 processes influenced by the input
xUpdateSetp influenced
Last updated

