
WSK INTELLIGENT TEMPERATURE AND HUMIDITY CONTROLLER
WSK INTELLIGENT TEMPERATURE AND HUMIDITY CONTROLLER
The host query:
Query message frames includes device address, function code, data, information, check code. Address
code informs the machine that is selected to perform the destined function equipment, such as functional
code 3 or 4 is for registering the data which is read from the device and return their content; Contains data
from the device to perform functions other additional information, such as reading command, data
segment additional information start from how to register and number of registers to read; Check code is
used to test the correctness of the a frame information, provides from the device with a validation
message content is the right approach, it adopts CRC16 calibration rule
If from the device to produce a normal response, in response to the message from the machine address
code, function code, code and data information CRC16 check code. Data information code, including the
data collected from the device, such as register values or state. If there are errors, we agreed from the
machine does not respond. Transport refers to a data frame in a series of separate data structure and used
for the transmission of data limited rules, defines the RTU mode compatible with MODBUS agreement
under the mode of transmission. Each byte: a start bit, 8 data bits, parity bit (,), 1 stop bit (a parity bit) or
1 stop bit (and white parity bits).
The structure of the data frame:(Message format) Table 1
Address Code
Address Code
Function Code
Data Code
Check Code
Table
At the beginning of a frame by a byte (eight binary code), the decimal is 0-255, only use the 1-247 in our
system, the other address. These bits indicate the address specified by the user terminal equipment, the
device will accept data from the connected to the host. Each terminal equipment address must be unique,
only by addressing to the terminal response contains the address of the query. When the terminal sends
back a response, in the response from the machine address data and tell the host which terminal is to
communicate with them.
ONE
ONE
ONE
ONE
TWO
TWO
CODE
Meaning
Behavior
Function Code: (Table 2)
Tell what is addressing to the terminal to perform the function. Listed in the following table shows the
supported code function, and their meaning and function
Table
Query data frame
(
main
machine
) (
Table 3
)
Table
Table
Table
Table
Address
Address
Address
Address
Command
Command
Command
Command
The starting
register
address
(high)
The starting
register
address
(high)
The starting
register
address
(high)
The starting
register
address
(high)
The starting
register
address
(low)
The starting
register
address
(low)
The starting
register
address
(low)
The starting
register
address
(low)
Quantity of
register
(high)
Quantity of
register
(high)
Quantity of
register
(high)
Quantity of
register
(high)
Quantity of
register
(low)
Quantity of
register
(low)
Quantity of
register
(low)
Quantity of
register
(low)
low
low
low
low
high
high
high
high
Record
the data
Response data (from the machine frame), indicating that the data has been written. (table 6)
Query data frame (the host machine) (see table 5)
The response data (from the machine frame) (see table 4)
This function allows the user to change the contents of a register, is written to the data to be
highlighted as writable attribute, the number of address range is not more than, this example
is written communication
Check code
:
Error check (CRC) domain are two bytes, containing a 16-bit binary values. CRC value is calculated
by the transport equipment, and then attached to a data frame, the receiving device to recalculate the CRC
value when receiving data, and then compared with acceptance to the CRC in the domain of value, if the
two values are not equal, an error has occurred. As shown in figure 3
Read data (functional code: 3) : this function can users get the terminal equipment acquisition \
recorded data, as well as the system parameters. Host a request there is no limit to the number of data
collected, but not beyond the definition of address range
Communication message example