Siemens RS-485 User Manual

Page 5

Advertising
background image

5/14

Siemens Building Technologies

CC1A7865.1en

HVAC Products

31.10.2002

Structure of the data blocks

All data blocks use the same structure:

Slave address

Function code

Data field

Checksum CRC16

1 byte

1 byte

x byte

2 bytes

Every data block contains 4 fields:

Slave address

Device address of a certain slave

Function code

Function selection (reading or writing words)

Data field

Contains the following information:

-

Word address

-

Number of words

-

Word value

Checksum

Identification of transmission errors

Fault handling

3 different error codes are used:

1

Invalid function

2

Invalid parameter address

8

Write access to parameter rejected

Slave address

Function

XX OR 80 h

Error code

Checksum CRC16

1 byte

1 byte

1 byte

2 bytes

The function code is OR linked with 0 x 80, that is, the MSB (most significant bit) will be
set to 1.

Data query:

01

02

00

70

00

04

CRC16

Reply:

01

82

01

CRC16

In the following cases, the slave does not reply:

-

The checksum (CRC16) is wrong

-

The instruction given by the master is incomplete or overdefined

-

The number of words or bits to be read is zero

Data structure

Error codes

Reply in the event
of fault

Example

Special cases

Advertising