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 |