Function Block - MODBUS UDP Slave protocol on ETHERNET.

Inputs

Input

Data type

Description

IN

BOOL

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

PORT

DINT

ETHERNET port number.

SLV

DINT

MODBUS slave number.

RTU

BOOL

Protocol: TRUE = MODBUS RTU / FALSE = Open MODBUS.

SrvID

STRING

MBSlaveUDPex only: ID of the server in the configuration.

Outputs

Output

Data type

Description

Q

BOOL

TRUE if the port is successfully open.

Remarks

When active, this function block manages the MODBUS UDP Slave protocol on the specified ETHERNETport. 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 MBSlaveUDP working simultaneously on different UDP ports. Other MODBUS Slave connections (TCP server, serial) 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. If SLV is 0 then the default port number from the MODBUS configuration is used.

With MBSlaveUDPex, you can specify the ID of a server from the MODBUS slave configuration. If you specify an empty string, the first server is used. MBSlaveUDP always works with the first server in the configuration.

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.

ST Language

MySlave is a declared instance of MBSlaveUDP function block.

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

MBSlaveUDPex

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

Previous chapterNext chapter


Created with the Personal Edition of HelpNDoc: Maximize Your Reach: Convert Your Word Document to an ePub or Kindle eBook