Next >>

Web-based remote climate monitoring

From this example, learn how to use PGraph2D or any other gauge category components in Serial communication. There are 4 climate rooms in a Lab. and the HelloDevice 1300 is connected to the main climate controller by RS232 serial connection. The main climate controller monitors the climate status of each climate rooms. By triggering this controller with a command, you can retrieve a climate data of climate rooms. The IDE applet is contained in the HelloDevice 1300 so that by making TCP connection to the HelloDevice 1300 from a web browser, you can monitor the climate status of the climate rooms.

Following is the schematic diagram of this example

The climate controller gives climate data as a response to the triggering command. When the received command is 02,05,03 in Hex., the controller will give the climate conditions of four climate rooms in combination of ASCII and Hex value and when the command is 02,06,03 in Hex., the controller will give the climate data of one climate room in Hex. value. The applet will send triggering command periodically then the components that compose the applet page will display the climate status.

Launch HelloDevice IDE
       

Page 1

Put 9 Labels in the design panel and assign their text, color, font and size as below. And change the color of the background design panel.
       

Put 8 Serial Label components in the design panel and set their value expression from v0 to v7 and change
       
        value expression : from left, (v0, v1), (v2, v3), (v4, v5) and (v6, v7).
        to display the temperature and humidity of climate rooms in ASCII value

Put 2 Horizontal bar gauges and set their value expression m0 and m1 and adjust the range of the gauges like below.
       
        value expression : m0, range from 20 to 40 (to display the temperature of climate room #1 in Hex. value)

       
        value expression : m1, range from 50 to 100 (to display the humidity of climate room #1 in Hex. value)

Add a Serial gate button to trigger the climate controller and receive the climate data.
       
Assign its property as following so that it can periodically (period : 7 sec.) send and receive a data.
       
The serial protocol s0 and r0 will be defined later.

Put a Page jump button and set its text as "View history" and set its jump page to "1".

Arrange components and resize them. The page 1 is finished.
       

Next >>

mplehd1300-climate-1.htm">Next >>