beautypg.com

Communicating directly over udp, Communicating directly over – Delta RMC151 User Manual

Page 435

background image

6 Communication

6.8.5. Communicating Directly over UDP

Master Ethernet controllers can communicate with the RMC using several methods. This topic

describes only one of those methods—using raw UDP packets—which is appropriate when the

master controller cannot use any of the other methods. Please review the other available

options in the Ethernet Overview topic before proceeding with this method.
This topic assumes that your controller has an established network platform and that you are

familiar with how to send and receive UDP packets on that platform. Some PLCs provide

access to UDP packets using function blocks, while embedded controllers may require using a

socket interface such as Berkeley sockets. Proper use of these interfaces is outside the scope

of this documentation.

Protocol Overview

The simplest UDP-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 UDP 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.
For RMC firmware versions prior to 3.31.0, Delta recommended using the FINS/UDP

protocol for direct communication over UDP. For details, see the FINS/UDP topic.

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, since UDP does not prevent

packets from being delivered out-of-order or dropped.

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

deltamotion.com

415

This manual is related to the following products: