beautypg.com

Delta RMC101 User Manual

Page 428

background image

RMC100 and RMCWin User Manual

5-178

method is not limited to Windows or even PCs. This method is discussed in this topic.

Choosing a TCP/IP Stack and API
The PC or device to be programmed must have a TCP/IP Stack and Application Programming
Interface (API). All Windows platforms (since Windows 95) include support for a TCP/IP stack
and include the Winsock API. Unix platforms typically also have a TCP/IP stack and the BSD
Sockets API. It may be more challenging to find a TCP/IP stack and accompanying API for
embedded devices, but we expect that such users will understand the depth of their undertaking.

Choosing an Application Protocol
Unless you already have one of the RMC's application protocols implemented, we recommend
the Modicon Modbus/TCP protocol. This protocol is one of the simplest protocols and has an
open standard. This means the protocol specification is publicly available. See the Modicon
Modbus/TCP web site at http://www.modbus.org for complete details on the protocol including C
examples for both Windows and Unix and a Java example.

Modbus/TCP Implementation Notes
While the Modicon Modbus/TCP web site has documentation and sample code for its
Modbus/TCP protocol, it is worth pointing out a few specifics on communicating with the RMC
over Modbus/TCP. This section neither replaces nor modifies the Modbus/TCP specification, but
clarifies key points and defines the RMC's function support.

• To create a connection with the RMC over Modbus/TCP, open a client socket with the RMC on

TCP port 502. The RMC will only respond to Modbus/TCP requests on this port. Other ports are
reserved or used by other protocols.

• The Unit Identifier (Slave Address) field in the Modbus/TCP is only used by routing devices. Since

the Slave Address is not used by the RMC, it should be set to zero (0) in requests to the RMC.

• The RMC supports the following function codes:

• Read Multiple Registers (FC 3)

• Write Multiple Registers (FC 16)

• Read Input Registers (FC 4)

• Write Single Register (FC 6)

• Read/Write Registers (FC 23)

• Get Diagnostics (FC 8)

• Typically, only functions 3 and 16 are used. Function 23 can be used to improve performance by

doing a read and write in a single function. FC 4, 6, and 8 were included for compatibility with
existing Modbus/TCP masters, but otherwise add no value to the RMC.

• Most of the above functions have a Reference Number field. This value is a register address,

which must be converted to an RMC register address. Subtract one from the Reference Number
to get the RMC's Modbus/TCP register address documented in RMC Register Map (Modbus/TCP

This manual is related to the following products: