- 45 -
Example:
You want to read the current state of the three relays in a HD46 17BR model, and
only the temperature relay is active:
You will have to include in the request:
•
address (= number -1 ) of first relay register (0003 = 0003h)
•
number of relays to be read (3 = 0003h).
Consequently, the command will have the following format:
Command
Value
Length
Description
Function:
01h
1 byte
Relay state reading command
Data:
00h
First relay address (MSB)
03h
2 bytes
First relay address (LSB)
00h
Number of relays to be read (MSB)
03h
2 bytes
Number of relays to be read (LSB)
The instrument will answer as follows:
Response
Value
Length
Description
Function:
01h
1 byte
Relay state reading command
Data:
01h
1 byte
Number of bytes with relay state
02h
1
byte
Relay
state
The byte with the relay state is 02h = 0000 0010. The least significant bit corresponds
to the C0
2
relay state (0 = disabled), the second bit corresponds to the temperature
relay (1 = enabled), the third bit corresponds to the humidity relay (0 = disabled).
Configuration parameters reading (function 03h)
Function code 03h allows to read a specified number of consecutive instrument
parameters.
The configuration register address containing the first parameter to be read and the
number of parameters to be read are indicated in the request data field.
Since, in the protocol, registers are numbered starting from 1, and data are addressed
starting from 0, a register address is equal to the register number decremented by 1.
The instrument replies with the value of the requested parameters. Consequently, the
Function and Data fields of command and Response will have the following format:
Command
Value
Length
Description
Function:
03h
1 byte
Parameters reading command
Data:
0000h to FFFFh
2 bytes
First parameter address
0001h to 007Dh
2 bytes
Number of parameters to be read (N)
Содержание HD45 17A
Страница 10: ... 10 3 1 HD45 connection diagrams ...
Страница 11: ... 11 3 2 HD46 connection diagrams ...
Страница 62: ... 62 Dimensions in mm HD45 series HD46 series ...
Страница 63: ... 63 Fixing holes ...