Delta RMC151 User Manual
Page 431
6 Communication
The simplest TCP-based protocol supported by the RMC (firmware 3.31.0 or newer) is the
Delta Motion Control Protocol (DMCP). This topic describes how to form DMCP packets to
communicate with the RMC75E and RMC150E. The RMC75E and RMC150E listen for DMCP
requests on TCP port 1324. The client port number can be any number. This protocol is a
request/response protocol, meaning that for each request packet sent to the RMC, there
will be one response packet sent by the RMC.
NOTE: Avoid repeatedly closing and re-opening TCP connections. Devices are required to
maintain state on TCP connections for two minutes after the connections are closed, and
repeatedly opening and closing TCP connections can exhaust resources in the RMC or host
device. Instead the connection should be left open by the host device while communicating
with the RMC. If your host device is not able to keep the connection open indefinitely, then
consider using UDP instead, as described in Communicating Directly over UDP.
For RMC firmware versions prior to 3.31.0, Delta recommended using the Mitsubishi
Procedure Exist protocol for direct communication over TCP. For details, see the
Mitsubishi Procedure Exist topic.
Tip: An example implementation of DMCP in the C programming language is available in
the
Writing Data to the RMC
To send one or more registers to the RMC, send the following packet to the RMC:
Offset Data
(hex)
Description
0-1
nn nn
Packet Length. Indicates the total length in bytes of
this packet, excluding this 2-byte field. This 16-bit
value is encoded with the least significant byte first.
2-3
00 02
Static Values. These bytes must always hold these
values.
4-5
nn nn
Transaction ID. This value is simply echoed by the
RMC in its response packet. It can be used to match
responses with requests.
6
15
Function Code. This byte must be 15 in a write
request.
7
nn
Byte Order. Determines the byte order for all
following fields. Notice that the Packet Length byte
order is not affected by this field.
•
Least-Significant Byte (LSB) First (00). For
example, the value 0x1122 will be encoded as 22
11.
•
Most-Significant Byte (MSB) First (01). For
example, the value 0x1122 will be encoded as 11
22.
8-9
nn nn
Starting Address (File). Gives the file number (f)
for the address (%MDf.e) to start the write at. The
order of the bytes in this 16-bit value is determined
by the Byte Order field.
10-11 nn nn
Starting Address (Element). Gives the element
number (e) for the address (%MDf.e) to start the
write at. The order of the bytes in this 16-bit value is
determined by the Byte Order field.
12-13 nn nn
Write Count. The number of 32-bit registers to
write. This value must be between 0 and 1024. The
deltamotion.com
411