Specifications
Chapter 5 - AsconMBCommLib
127
5-3-2 Modbus MASTER COIL READ
FB Prototype
MB_MST_RD_COIL
Input parameters
Output parameters
Description
This function block performs a request of max. 32 continuous Modbus
COILS in according to the parameters specified as Inputs.
Rerefence
table
Input
Label Type Description Range
SEQ USINT
Sequence identifiable number. This number MUST
BE UNIQUE for each MB_MST series FB [num]
1... 255
NR_SEQ USINT
Input that MUST
be connected to the
MB_MST_Sync output [num]
NODE USINT Node of the Slave Address to be Inquired [num] 1... 247
MB_FUNC USINT Modbus Query Function 1 or 2
ID_COIL UINT Modbus starting COIL address [num] 1... 65535
NR_COIL UINT Modbus number of COIL to manage [num] 1... 32
T_OUT UINT
Communication Time Out factor of 100 ms
(eg. 10 means 10 x 100 ms = 1 s) [num]
0... 65535
RETRY USINT Number of Retry on the same operation [num] 1... 255
Label Type Description
RD_BIT DWORD
Dword containing the coils read masked in according to
the NR_COIL value
MB_FAIL BOOL Modbus Operation Fail Status
MB_TOUT BOOL Modbus Timeout Error Status
MB_ERR BOOL Generic Modbus Error Event
MB_STS USINT Modbus Communication Status
MB_OPRS USINT Modbus function block Operations Status
SEQ
NR_SEQ
NODE
MB_FUNC
ID_COIL
NR_COIL
T_OUT
RETRY
USINT
USINT
USINT
USINT
UINT
UINT
UINT
USINT
¡
¡
¡
¡
¡
¡
¡
¡
DWORD
BOOL
BOOL
BOOL
USINT
USINT
RD_COIL
MB_FAIL
MB_TOUT
MB_ERR
MB_STS
MB_OPRS
¡
¡
¡
¡
¡
¡
Label Description
SEQ
Value from 1 to what specified as NR_CMD for the MB_MST_Sync
function block (max. 255)
NODE 1... 247
MB_FUNC 1 or 2, in according to the Modbus Specifications
ID_COIL 1... 65535
NR_COIL 1... 32
T_OUT 1... 65535. Deafult value 10 (1000 ms)
RETRY
1... 255. Deafult value 1