Usage Example of a Commands Control

<< Click to Display Table of Contents >>

 

Usage Example of a Commands Control

1.To create a temperature control on the Monitoring folder of the Demo application, add a Commands-type Control on a Page.

2.Configure its reading and writing Tags. The reading Tag is monitored by the Zones to display to users the current value. The writing Tag, on the other hand, receives the value selected on Commands. To do so, in the Tag Read option, select the demo:TagInternal5 Tag and, in the Tag write option, select the demo:TagInternal7 Tag. With all Tags configured, users can configure Zones and Commands.

 

Configuration of Zones

1.On Zones, users must create a Zone for every possible value of a reading Tag. First configure a Cold Zone, which is responsible for informing that temperature is below 10° C. On This Zone, configure the Text option with the expression "Cold" and the Condition option with the expression "value < 10".

2.To configure a Hot Zone, which appears when temperature is above 23° C, configure the Text option with the expression "Hot" and the Condition option with the expression "value > 23".

3.Finally, configure the last Zone, the interval between 10° C and 23° C. Configure the Text option with the expression "Cool" and the Condition option with the expression "value <= 23 && value >= 10".

 

After configuring all Zones, users can configure all possible actions for each case. To do so, configure an Exhaustion Command to decrease temperature and a Warm Command to increase temperature.

 

Configuration of Commands

1.To configure the Exhaustion Command, configure the Text option with the expression "Exhaustion", the Condition option with the expression "value > 23", and the Value to write option with the value 1 (one). This way, when triggering this Command, the value 1 (one, true) is written to the TagInternal7 Tag, responsible for exhaustion.

2.For the Warm Command that behavior must be the opposite, that is, write the value 0 (zero, false) to the TagInternal7 Tag. This way exhaustion is turned off. To do so, configure the Text option with the expression "Warm", the Condition to show option with the expression "value < 10", and the Value to write option with the value 0 (zero).

 

After this configuration, the Commands Control is ready to monitor the reading Tag and ready to write if it enters the configured conditions.

Was this page useful?