<< Click to Display Table of Contents >>
Usage Example of a Commands Control |
1.To create a temperature control on the Monitoring folder of the demonstration 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.
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.
1.To configure an 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 a Warm Command, on the other hand, 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 for monitoring the reading Tag and ready for writing if it enters the configured conditions.