Example 2.

Simple Thermostat Control with a Configurable Setpoint

 

The previous example uses the constant set point, 75 degrees.  If you run this program and then decide to change the set point, you may change the instructions and download the program over again.  Making changes to the program and downloading it is not convenient if you were to change the set point frequently.  The following program uses a parameter to save the set point.  Note that parameters are saved in non-volatile RAM.  So they retain their value even if the controller loses power.  More importantly, however, you need not download the program over again if you want to change the set point.  Simply click the “Peek” button in the “Configure Controller” dialog and modify parameter values.  In addition, if you have a web server running on the LAN, you may modify parameters through the intranet or Internet, using your browser.

 

 

 

title     "example 1b.  simple thermostat control"

input     iT1;

output    oFan1;

parameter pSetPoint1;

 

oFan1=(iT1>pSetPoint1)

 

 

The value of the set point is undefined when you first run your code.  You must initialize the parameter values before you run your program.

 

Also see : Programming, Program Examples, Script Syntax

 

 


© Rigel Corporation iNetGrow 2003-2006.  All rights reserved.