Function Block - MODBUS RTU Slave protocol on serial port.

Inputs

Input

Data type

Description

IN

BOOL

Enabling command: the port is open when this input is TRUE.

PORT

STRING

Settings string for the serial port (e.g. 'COM1:9600,N,8,1').

SLV

DINT

MODBUS slave number.

Outputs

Output

Data type

Description

Q

BOOL

TRUE if the port is successfully open.

Remarks

When active, this function block manages the MODBUS RTU Slave protocol on the specified serial communication port. The configuration of the MODBUS Slave map (designing MODBUS addresses) is done using the MODBUS configuration tool, from the Fieldbus Configurator.

There can be several instances of the MBSlaveRTU working simultaneously on different serial ports. Other MODBUS Slave connections (TCP server, UDP) can also be active at the same time.

The slave number entered in the MODBUS Slave configuration tool is ignored when MODBUS Slave protocol is handled by this function block. Instead, the SLV input specifies the MODBUS slave number.

MBSlaveRTU always works with the first server in the configuration.

ST Language

MySlave is a declared instance of MBSlaveRTU function block.

MySlave (IN, PORT, SLV);
Q := MySlave.Q;

FBD Language

Fixed_Image

LD Language

Fixed_Image

MBSlaveRTU

IEC 61131-3 Automation platform > Drivers - Fieldbus configuration > MODBUS Slave > Driver-specific information > Driver specific function blocks > MBSlaveRTU

Previous chapterNext chapter


Created with the Personal Edition of HelpNDoc: Free EPub producer