visual countdown timer on touch panel
trx250r87
Posts: 31
Can anyone recommend a method for creating a countdown timer on a touch panel. I'm using an AXT-CA10 and Axcent3 controller. Some sample code would be greatly appreciated! I would like to use this as a visual feedback while a projector is warming up and cooling down.
Eric
Eric
0
Comments
That should work, haven't tested it and wrote it off the top of my head.
(also you have syntax errors ;p)
Completely untested. Hopefully this gets you started.
INTEGER COUNTTIMER_W
INTEGER BARGRAPH_WARM
INTEGER COUNTTIMER_C
INTEGER BARGRAPH_COOL
*** Put this in program section***
// System Warm Up Timer and Bargraph Display
IF ((CountTimer_W <>999) and (CountTimer_W <40)) // second number is time to count up to
{
WAIT 10 // updates every second
{
CountTimer_W= CountTimer_W+1
SEND_LEVEL VTP , 3, COUNTTIMER_W
IF (CountTimer_W=40)
{
CountTimer_W=999 // stop counter
nSystem_Warm=1
WAIT 20
nSystem_Warm=0
SEND_LEVEL VTP, 3, 0
}
}
}
// System Cool Down Timer and Bargrahp Dispaly
IF ((CountTimer_C <>999) and (CountTimer_C <=120)) // second number is time to count up to
{
WAIT 10 // updates every second
{
CountTimer_C= CountTimer_C+1
SEND_LEVEL VTP , 4, COUNTTIMER_C
IF(COUNTTIMER_C=30)
{
PULSE[dvScr1,Scr1_Stop]
PULSE[dvScr2,Scr2_Stop]
}
IF(COUNTTIMER_C=120)
{
CountTimer_C=999 // stop counter
nSystem_Cool=1
WAIT 20
nSystem_Cool=0
SEND_LEVEL VTP, 4, 0
}
}
}
I use this code in all of my older units and have never had an issue. The only thing I have every found is not to have any other functions going on during the process because it might miss it.
Thanks guys, I'll give some of these a try...
Eric
Eric
Oops, neeed to read a little closer...and put my code in Netlinx studio first
I use it with Axcent III and Netlinx. It should work as it is for Axcecnt III. The VTP is just a device name but can be changed to TP.