PROFIBUS
114
Operating Instructions HYGROPHIL® H 4230-10 Serie A BA 030520
8.4
Examples
Two sample sequences will be used to illustrate how to read from
HYGROPHIL H (querying the dew point) and how to write to HYGROPHIL H
(changing to standby mode).
8.4.1
Reading from HYGROPHIL H
Querying the dew point
According to the channel description the dew point can be found at data
address 0x20 with offset 0. Due to the fact that it is a float value, 4 bytes of
information need to be requested.
Read request from the PROFIBUS master:
0x02
0x00
0x0020
0x0000
0x04
Byte 0
Command code
Byte 1
Reserved
Bytes 2/3
Data address
Bytes 4/5
Offset
Byte 6
Data length
Byte 0:
Command code for a read process (Read =
0x02
)
Byte 1:
Reserved (
must
always be
0x00
!!)
Data address from channel description:
Byte 2:
0x00
Byte 3:
0x20
for dew point
Offset from channel description:
Byte 4:
0x00
Byte 5:
0x00
Length of the data requested:
Byte 6:
0x04
for 4 bytes
Response from HYGROPHIL:
0x80
0x00
0x0020
0x0000
0x04
0x00
0xXX
Byte 0
Status code
Byte 1
Reserved
Bytes 2/3
Data address
Bytes 4/5
Offset
Byte 6
Data length
Byte 7
Reserved
Bytes 8...11
User data
Byte 0:
Status code for a successful
0x80
read access
Byte 1:
0x00 (reserved)
Data address from channel description:
Bytes 2/3:
Data address of the requested value (here
0x0020
for dew
point)
Offset from channel description:
Bytes 4/5:
Offset of the requested value (here
0x0000
for dew point)
Length of the data transmitted:
Byte 6:
0x04
for the float value of the dew point
Byte 7:
Reserved
Bytes 8...11: Float value of the dew point in line with IEEE 754 Floating Point
Standard
Bit 0 of the first byte of the float is sent first.
Содержание HYGROPHIL H 4230-10 A Series
Страница 2: ......
Страница 51: ...Installation 45 Operating Instructions HYGROPHIL H 4230 10 Serie A BA 030520...
Страница 122: ...Operating Instructions HYGROPHIL H 4230 10 Serie A BA 030520...