beautypg.com

Rtu type, Data carrier, Tedm/ettnm - function codes – Baumer ETTNM User Manual

Page 2: General format of a frame

background image

The master instructs a slave. The function code tells the slave what type of action to

carry out. For example: read the register, function code 03 hex.
The data field is coded for n words in hexadecimal from 00 to FF, or for n bytes.
Depending on the function code, the data field may hold different additional informa-

tion allowing the slave to interpret the message.
If RTU coding is used, the checksum CRC (Cyclical Redundancy Check) allows

the integrity of the received data to be checked. The CRC contains a value which is

encoded as 16 bits..

RTU Type

The slave sends its response; it places its own address in the address field so that

the master can identify it.
For a normal response, the slave uses the same function code as the one in the

message sent by the master.
The checksum field contains a value which is encoded as 16 bits. This value is the

result of a CRC calculation using the message.

Each byte making up a message is transmitted as follows in RTU mode:

Data carrier

Message from the

master

Message from the

slave

Minimum delay of 3.5 times the

time needed to transmit a byte

Minimum delay of 3.5 times the

time needed to transmit a byte

Before and after each message (frame), there must be a silence lasting a minimum

of 3.5 times the time needed to transmit a byte.

The whole message must be sent continuously. The maximum time between 2 bytes

must be less than 1.5 times the time required to transmit a byte.

Otherwise there is a transmission error.

The MODBUS protocol only defines the message structures and their exchange

mechanism.

The TEDM and ETTNM use 4 function codes.

These function codes allow collection of:

- the value of the pressure reading (TEDM) or the temperature (ETTNM)

- the status of each coil (open or closed),

and writing of

- the status and setting of the coils
- the access code
- the address for the slave

TEDM/ETTNM - Function codes

The maximum data size is 256 bytes. All the information contained in the message is written as hexadecimal.

No parity check

START

Bit 0

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Bit 6

Bit 7

STOP

STOP

With parity check

START

Bit 0

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Bit 6

Bit 7

Parity

STOP

In the TEDM and ETTNM configuration menu it is possible to opt for parity

checking or not.

If a parity check is used, you need to confirm the reference status: ‘even’ or ‘odd’.

You can use any transmission interface, RS 232, RS 422 or RS 485, but the RS485

connector is the most widely used because it supports multipoints.
TEDM-ETTNM:

Data transmission speed: 9600 baud. Interface: RS485.

Code Function

Action

01

Read Coils Status

Read the status of coils 1 and 2: open or closed
Read the coil setting: Normally Open (NO) or
Normally Closed (NC)
Read the position of the decimal point (display)

03

Read Holding Register

Read the measured value. Pressure (TEDM) or
Temperature (ETTNM)
Read the access code
Read the value of the high and low switching points
for each coil
Read the value of the timer for each coil

05

Write Single Coil

Write the coil’s configuration: NO or NC

06

Write Single Register

Write the access code
Write the value of the high and low switching points
for each coil
Write the value of the timer for each coil
Write the slave’s address (TEDM or ETTNM)

Two types of encoding may be used to communicate over a Modbus network:

ASCII - each byte making up the frame consists of 2 ASCII characters
RTU (Remote terminal unit) - each byte making up the frame consists of 2 hexa-

decimal characters (2 x 4 bits).

ASCII mode allows having gaps of more than one second between the different char-

acters without causing errors, while the RTU mode allows more data to be passed at

the same transmission speed.

The TEDM and ETTNM use RTU coding to communicate over the Modbus net-

work.

General format of a frame

START

Address

Function

Data

CRC 16

END

1 byte

1 byte

1 byte

n bytes

2 bytes

Silence

RTU frame:

START

Address

Function

Data

LRC

END

1 chara

2 charas

2 charas

n charas

2 charas

2 charas

ASCII frame:

320124 ind a 1

1/2012

This manual is related to the following products: