Using Parameters and Variables

 

The iNetGrow script is a flexible and powerful tool to access the various components of the iNetGrow system.  The automated tasks follow the script.  However, the script is far more versatile than simply executing instructions.  This section gives examples of how you may effectively use the script.  If you have not done so, please read the section “Programming” and the examples given in that section.

 

Defined Elements of the Script

The script works with defined elements, namely, the inputs, outputs, variables, and parameters (see Programming).  These elements are visible in the “Peek” dialog and in the “System View” dialog.  These elements are also visible in web pages generated by the ActiveX component iNetGrowX.  The capability to display these elements on a web page significantly extends the visibility of your system.  For example, you may view the current values and modify the parameters remotely using the browser of a web-enabled cell-phone.

 

The values of the inputs, outputs, variables, and parameters are displayed in these dialogs.  The parameters may also be modified.

 

Modifying Outputs by Parameters

The outputs may be tied to parameters.  A simple example is shown below.

 

 

title  "change output"

input  iT1, iT2;

output oFan1;

var    vT_Average;

par    pOutFan1;

 

vT_Average = (iT1+iT2)/2;

 

oFan1=pOutFan1;

 

 

This is a simple script that does not automate the output activity, namely the turning on or off of the fan.  The variable vT_Average as well as the state of the output oFan1 will be visible in the dialogs or on the web pages.  The output is determined by the value of the parameter.  Simply changing the parameter to zero or to a non-zero value turns the fan off or on.

 

Viewing System Variables

The system variables are normally hidden from view.  However, you may use variables to reflect their values in the dialogs and on web pages.  A simple example is shown below.

 

 

title  "view system variable"

var    vMinutes;

var    vSeconds;

 

vMinutes = _minute;

Vseconds = _second;

 

 

 

This simple script that does not implement any automate tasks.However, the values of the variables will be visible in the dialogs and on web pages.  This allows the minutes and seconds kept by the real-time clock of the controller to be observed.

 

Also see : Programming, Script Syntax

 

 


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