SINUS PENTA
PROGRAMMING
INSTRUCTIONS
394/452
Data
The data field contains any additional information for the function being used.
Error Control
The error control is performed through the CRC (Cyclical Redundancy Check) method. The16–bit value of the relevant
field is computed when the message is sent by the transmitter and is then re–computed and checked by the receiver.
CRC Register is computed as follows:
1. CRC Register is set to FFFFh
2. Exclusive OR is executed between CRC register and the first 8 bits of the message; the result is saved to a 16–bit
register.
3. This register is right–shifted of one place.
4. If the right bit is 1, exclusive OR is executed between the 16–bit register and value 1010000000000001b.
5. Steps 3 and 4 are repeated until 8 shifts are performed.
6. Exclusive OR is performed between the 16–bit register and the next 8 bits of the message.
7. Steps 3 to 6 are repeated until all message bytes are processed.
8. The result is a CRC, that is attached to the message by sending the less significant byte as the first byte.
Supported Functions
03h: Read Holding Register
Allows reading the register state of the slave device. This function does not allow the broadcast mode (address 0).
Additional parameters are the address of the basic digital register to be read and the output number to be read.
QUERY
RESPONSE
Slave address
Slave address
03h Function
03h Function
Register address (high)
Byte number
Register address (low)
Data
Register N. (high)
…
Register N. (low)
Data
Error correction
Error correction
10h: Preset Multiple Register
Sets the state of multiple registers for the slave device. In broadcast mode (address 0), the state of those registers is
set in all the connected slave devices. Additional parameters are the basic register address, the number of registers to
be set, the relevant value and the number of bytes used for the data items.
QUERY
RESPONSE
Slave address
Slave address
10h Function
10h Function
Register 1 addr. (Hi)
Register 1 addr. (Hi)
Register 1 addr. (Lo)
Register 1 addr. (Lo)
Register N. (Hi)
Register N. (Hi)
Register N. (Lo)
Register N. (Lo)
Byte number
Error correction
Data (Hi)
Data (Lo)
…
Data (Hi)
Data (Lo)
Error correction