Delta OHM HD45 Series Manual page 45

Hide thumbs Also See for HD45 Series:
Table of Contents

Advertisement

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
Function:
01h
Data:
00h
03h
00h
03h
The instrument will answer as follows:
Response
Value
Function:
01h
Data:
01h
02h
The byte with the relay state is 02h = 0000 0010. The least significant bit corresponds
to the C0
relay state (0 = disabled), the second bit corresponds to the temperature
2
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
Function:
03h
Data:
0000h to FFFFh
0001h to 007Dh
Length
Description
1 byte
Relay state reading command
First relay address (MSB)
2 bytes
First relay address (LSB)
Number of relays to be read (MSB)
2 bytes
Number of relays to be read (LSB)
Length
Description
1 byte
Relay state reading command
1 byte
Number of bytes with relay state
1 byte
Relay state
Length
1 byte
2 bytes
2 bytes
- 45 -
Description
Parameters reading command
First parameter address
Number of parameters to be read (N)

Advertisement

Table of Contents
loading

Table of Contents