43-TV-25-30 Iss.6 GLO Aug 07 UK 283
Note in this script above there is no way to reset the timer, this could be modified to allow
the user to reset this timer from a switch fed into a digital input as follows:
BLKV1=trun[1,0]; If it is then keep the timer running without resetting
return tget[1]; Return the current timer value
}
else If not then
{
BLKV1=tpause[1]; Pause the timer
return tget[1]; Return the current (paused) timer value
}
if(D1!=1) Tests if the DI 1 is not set
{ If it isn’t then
if (GLBV1==1) Tests if the global variable 1 is equal to channel 1
{
BLKV1=trun[1,0]; If it is then keep the timer running without resetting
return tget[1]; Return the current timer value
}
else
{ If not then
BLKV1=tpause[1];
return tget[1]; Pause the timer
} Return the current (paused) timer value
}
else If it is
{
BLKV1=treset[1]; reset the timer 1 to zero
return tget[1]; return the current (zeroed) timer value
}