beautypg.com

Delta RMC151 User Manual

Page 438

background image

RMC70/150 and RMCTools User Manual

The response packet holds a single-byte Response Code field, indicating to the client

whether the transaction was successful or not. Notice that the Response Function Code

byte will also indicate whether the Response Code is 00 (success) or not. If the Response

Code is 00, then the Response Function Code will match the request’s Function Code plus

0x80. Otherwise, the Response Function Code will match the request’s Function Code plus

0x40.

Response

Code

Description

00

Success.

01

Malformed.

02

Too Long.

03

Invalid Address.


Notice that in certain other error cases, the RMC will not generate a response to the

DMCP request. Such cases include the following:

UDP datagram is less than 7 bytes in length.

UDP datagram size does not match the Packet Length field. The UDP datagram length

must always be 2 bytes longer than the Packet Length field.

The Static Values (bytes 2-3) are not 00 and 02 respectively.

Unsupported Function Code.

Example 1: Writing a Single Register

In this example, the client will write the value 0x11223344 to variable 0 (%MD56.0),

using the LSB-first byte order (00). The client chooses a Transaction ID of 00 00 for this

packet, either because he is not using this field, or because this is the first transaction.
Plugging in the above values in the proper byte order gives us the following packet that

should be sent to UDP port 1324 on the RMC:

12 00 00 02 00 00 15 00

38 00 00 00 01 00 00 00

44 33 22 11

After the RMC has successfully received and processed this write request, it will respond

with the following packet:

06 00 00 02 00 00 95 00

Notice that the last byte is the Response Code, with 00 meaning success.

Example 2: Reading a Single Register

In this example, the client will read a value from variable 0 (%MD56.0). The client

chooses a Transaction ID of 0x0001, perhaps because this is the second transaction.
Plugging in the above values in the proper byte order gives us the following packet that

should be sent to UDP port 1324 on the RMC:

0C 00 00 02 01 00 14 00

38 00 00 00 01 00

After the RMC has successfully received and processed this write request, it will respond

with the following packet if variable 0 held the value 0x11223344:

0A 00 00 02 01 00 94 00

44 33 22 11

Notice that byte 7 holds the Response Code, and bytes 8-11 hold the data that was read.

418

Delta Computer Systems, Inc.

This manual is related to the following products: