MBSlaveRTUexD
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. |
SrvID |
STRING |
MBSlaveRTUex only: ID of the server in the configuration. |
Outputs
Output |
Data type |
Description |
Nrec |
DINT |
Number of received valid requests addressed to this slave. |
Nx |
DINT |
Number of received valid requests addressed to this slave or any other slave. |
Nerr |
DINT |
Number of processed requests leading to an error response. |
Nok |
DINT |
Number of requests processed without error. |
Nbr |
DINT |
Number of received broadcast requests. |
Nb Bad |
DINT |
Number of received invalid requests addressed to this slave. |
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.
With MBSlaveRTUex, you can specify the ID of a server from the MODBUS slave configuration. If you specify an empty string, the first server is used. MBSlaveRTU always works with the first server in the configuration.
MBSlaveRTUexD offers additional information about the MODBUS communication.
ST Language
MySlave is a declared instance of MBSlaveRTU function block.
MySlave (IN, PORT, SLV, SrvID);
Q := MySlave.Q;
MBSlaveRTUexD |
IEC 61131-3 Automation platform > Programming - Reference guide > Driver specific function blocks > Modbus Slave > MBSlaveRTUexD |
Created with the Personal Edition of HelpNDoc: Leave the tedious WinHelp HLP to CHM conversion process behind with HelpNDoc