Function block for the MODBUS networking Fieldbus driver:

  • The Runtime Service maintains a queue of MODBUS transactions.
  • This function block delivers information about received requests from the list.
  • The function block refers to one MODBUS slave configuration.

Inputs

Parameter

Data type

Description

POP

BOOL

Delivers information about received requests from the list:

  • TRUE: The request is reported on outputs and removed from the list
  • FALSE:The request is reported on outputs but remains in the list

SERVID

STRING

Identifier of the MODBUS Slave configuration in the fieldbus configurator

Outputs

Parameter

Data type

Description

FUNCTION

DINT

MODBUS function code

ADDR

DINT

MODBUS address

NB

DINT

Number of MODBUS items

Remarks

The last 4 received requests are remembered in a queue inside the MODBUS stack. This functionality works for read or write of bits or registers.

A request is identified by function code, MODBUS address and number of items.

At most 4 requests received are stored in between 2 PLC scans. If more, then oldest ones are lost.

ST Language

MBSReq is a declared instance of MBSLAVELASTREQ block.

MBSReq (TRUE, ‘MyConfig’);

diFunc := MBSReq.function;

diModbusAddr:= MBSReq.addr;

diNbModbusItem:= MBSReq.nb;


Created with the Personal Edition of HelpNDoc: Effortlessly Spot and Fix Problems in Your Documentation with HelpNDoc's Project Analyzer