Specifications

Chapter 5 - AsconMBCommLib
131
5-3-4 Modbus MASTER WORD READ
FB Prototype
MB_MST_RD_WORD
Input parameters
Output parameters
Description
This function block performs a request of max 16 continuous Modbus REG-
ISTERS 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 3 or 4
ID_REG UINT Modbus starting REGISTERS address. [num] 1... 65535
NR_REG UINT
Modbus number of REGISTERS to manage.
[num] (admitted range 1... 16)
1... 16
T_OUT UINT
Communication Time Out factor of 100 ms
(eg. 10 means 10 x 100 ms = 1s) . [num]
0... 65535
RETRY USINT Number of Retry on the same operation. [num] 1... 255
Label Type Description
RD_REG
ARRAY [1..16]
OF WORD
Array of 16 WORDS containing the read values
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_REG
NR_REG
T_OUT
RETRY
USINT
USINT
USINT
USINT
UINT
UINT
UINT
USINT
¡
¡
¡
¡
¡
¡
¡
¡
RD_REG
MB_FAIL
MB_TOUT
MB_ERR
MB_STS
MB_OPRS
ARRAY [1..16] OF WORD
BOOL
BOOL
BOOL
USINT
USINT
¡
¡
¡
¡
¡
¡
Input 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 3 or 4, in according to the Modbus Specifications
ID_REG 1... 65535
NR_REG 1... 16
T_OUT 1... 65535. Default value 10 (1000 ms)
RETRY 1... 255. Default value 1