Scadabank.com
Basic Scripting 

(Answers)

Counters in InTouch

 

Exercise #1 - Create a counter with InTouch scripting that counts up at a rate of once per second, and goes from zero to ten, then starts over at zero.

 

Option 1: Using Application While Running script

 

 

Option 2: Using a DataChange script

 

 

Exercise #2 - Adjust the counter scripting above so that it counts from zero to ten, then counts down from ten to zero, and repeats.

 

Using Application While Running script, and the comment field of the Counter1 tag

 

 

Exercise #3 - Using a time base of 100 milliseconds, create one counter that counts up to 500 milliseconds and stops, another counter that counts up to one second and stops, and a third counter that counts up to five seconds and stops.

 

Using Application While Running script and three counter tags