beautypg.com

Device configuration and monitoring, 1 control interfaces 4.2 command protocol, 1 command protocol on rs-232 / rs-422 / rs-485 – DekTec DTM-3200 IP-ASI Converter User Manual

Page 19

background image

DTM-3200 – OEM Ethernet TSoIP Converter

User Manual

19

4. Device Configuration and Monitoring

4.1 Control interfaces

The DTM-3200 can be configured and monitored using I

2

C, RS-232 (DCE), RS-485 or RS-422. DIP

switch #3 selects between RS-232 and RS-422 or RS-485. It is not required to select between I

2

C

and RS-XXX: The DTM-3200 will automatically use the interface on which it detects activity.
All control interfaces use the same command and response protocol that is described below.

4.2 Command protocol

Commands and responses are wrapped into a frame structure that contains address, category,

setting, read/write, index (optional) and data (optional). The DTM-3200 accepts uppercase and

lowercase characters, but will always respond in uppercase.

4.2.1 Command protocol on RS-232 / RS-422 / RS-485

Field

Format

Description

Start

ASCII character

STX (0x02)

ASCII “start of text” character

Address

2 hex digits

2

8-bit address, with the 6 MSBs fixed to 0x40 and the 2 LSBs

configurable using DIP switches 1 and 2

Category

2 hex digits

Selects a “category” of settings

Setting

2 hex digits

Selects a setting within the selected category

Read/Write ASCII character

‘R’ or ‘W’

‘R’ for read and ‘W’ for write

Index

4 hex digits

(Optional) Provides an extra index parameter, e.g. to

indicate the channel number

3

Data

n hex digits / n

ASCII

characters

4

The data written or read. The data length is variable for

each setting. In case of a write operation, the data is a

(negative) acknowledgement

Checksum

2 hex digits

This is the least significant byte of the two’s complement

5

sum of all characters in the message, excluding the STX and

ETX characters and the checksum itself

End

ASCII character

ETX (0x03)

2

Hex digits are the ASCII characters 0…9 and A…F, concatenated to form a single hexadecimal value.

3

The DTM-3200 supports a single channel only, so index is used as a channel number, it’s always 0.

4

Since firmware version 1.4 the firmware update setting uses ASCII characters 128 to 255 for sending the firmware data.

5

Invert all bits and add one.