beautypg.com

B&B Electronics MODSCAN32 - Manual User Manual

Page 62

background image

62


modbus/TCP (MBAP)


The Modbus Applications Programming Interface, (MBAP), protocol specification provides extensions to
the messaging descriptions which allow components to communicate over TCP/IP networks. Developed by
Modicon to support direct ethernet connections to PLC’s, the MBAP
protocol defines header information which routes modbus packets between network devices transparent to
other network activity. Whereas a serial modbus device, (slave), can only provide data to a single master, a
network slave device can communicate with many different master applications asynchronously using the
MBAP protocol.

The MBAP protocol uses a Client/Server paradigm. A server application contains data, (in this case data
from one or more modbus devices), which is made accessible to various client applications on the network.
A server application runs continuously, whereas any given client application may start-up or shut-down at
any time. A TCP connection is established between the client and server based on a request from the client
during start-up. Once the connection is established, communications occur between the two as though they
were connected serially. Multiple clients may be connected with the server at the same time, with each
connection having
full access to the data.

The MNetSvr application was designed to operate as a MBAP compatible interface between network client
applications, (such as ModScan32), and serial slave devices. MNetSvr opens TCP Port #502 and listens for
other network devices to initiate a connection. When a connection is made, MNetSvrspins off a separate
thread of execution to process requests from the connected client. As far as the client application is
concerned, it appears as though it has exclusive access to the slave device, with all messaging activity
identical to that which would occur if the device were connected locally.