Siemens RS-485 manual Reading n words, Writing 1 word

Page 7

Reading n words

 

 

This function is used to read n words from a certain address.

 

 

 

 

 

Data query

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slave address

Function 0x03

Address of the

 

Number of

 

Checksum

 

 

 

 

 

 

or 0x04

 

first word

 

words

 

 

CRC16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(max. 12)

 

 

 

 

 

 

 

1 byte

 

 

1 byte

 

2 bytes

 

2 bytes

 

 

2 bytes

Reply

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slave address

Function 0x03

 

Number of

Word value(s)

Checksum

 

 

 

 

 

 

or 0x04

 

bytes read

 

 

 

 

 

 

CRC16

 

 

1 byte

 

 

1 byte

 

1 byte

 

x byte(s)

 

 

2 bytes

Example

Reading the 2 setpoints of the controller

 

 

 

 

 

 

 

 

 

 

 

 

 

Word address = 0x0008 (setpoint SP1)

 

 

 

 

 

 

 

 

 

 

 

 

 

Data query:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

03

 

00

 

 

08

 

 

00

 

 

04

 

 

CRC16

 

 

Reply:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

03

08

 

0000

 

42C8

 

0000

 

4316

 

CRC16

 

 

 

 

 

 

 

 

 

Setpoint 1 (100)

 

Setpoint 2 (150)

 

 

 

Writing 1 word

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With the “Wordwriting” function, the data blocks for instruction and reply are identical.

Instruction

 

 

 

 

 

 

 

Slave address

Function 0x06

Word address

 

Word value

 

Checksum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRC16

 

 

1 byte

 

 

1 byte

 

2 bytes

 

2 bytes

 

 

2 bytes

Reply

 

 

 

 

 

 

 

Slave address

Function 0x06

Word address

 

Word value

 

Checksum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRC16

 

 

1 byte

 

 

1 byte

 

2 bytes

 

2 bytes

 

 

2 bytes

Example

Write limit value limit comparator 1 (AL1) (= 275)

 

 

 

 

 

 

 

 

 

 

 

Word address = 0x000C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction: (write the first part of the value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

06

 

00

 

 

0C

 

 

80

 

 

00

 

 

CRC16

 

 

Reply (like instruction):

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

06

 

00

 

 

0C

 

 

80

 

 

00

 

 

CRC16

 

 

Instruction: (write the second part of the value)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

06

 

00

 

 

0D

 

 

43

 

 

89

 

 

CRC16

 

 

Reply (like instruction):

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

 

06

 

00

 

 

0D

 

 

43

 

 

89

 

 

CRC16

 

7/14

 

 

Siemens Building Technologies

CC1A7865.1en

HVAC Products

31.10.2002

Image 7
Contents 31.10.2002 Master-slave principleNot Transmission mode RTUDevice address 600 813 19.200 406 Communication sequenceReply by the slave Baud rateCommunication during the slave’s response time Data query sequenceTime sequence Communication during the slave’s internal handling timeData field Fault handlingSlave address Function codeFollowing functions for the device will be available Checksum CRC16CRC = SHR CRC Reply CRC16 =Writing 1 word Reading n wordsAddress Example Write switch-on threshold Hys1 = Word address =Writing n words Instruction ReplyAccess Parameter Address Data Access Parameter Value range DefaultAddress tables Setpoint TempREM RoffDevice state Address Data type Access Parameter«FULLY REMOTE» SPR Description of operating modesRemote RK1 Operating mode Modulating burner Dependent switchingControl strategy for Floating output with