76
Technical support / Re: TBASIC Input On/Off Question
« on: December 10, 2019, 10:28:10 AM »
Without fully understand your program, we would like to jump in with some comments about using SETTIMERSV - this command changes the Set Value of the timer when it is activated, but does not activate the timer when it is executed.
On Nano-10 and FMD PLC we don't recommend sprinkling this function all over your TBASIC program as the set value change are not backed up in flash memory unless specifically forced to do so by the program. Timers' and counters' are normally preset during program transfer but TBASIC allows you to perhaps use a HMI to make changes when needed, but it is not meant to be changed all the time by a program.
If you want to two different timer values for an action you could use two separate timers. Alternatively, you can start a timer with a desired count down value anytime by assigning the time-out value to the TIMER[n] variable and clearing the timer contact. You do not need to change its Set Value using the the SETTIMERSV command. Please check the following FAQ thread for explanation:
https://triplc.com/smf/index.php?topic=1046.0
On Nano-10 and FMD PLC we don't recommend sprinkling this function all over your TBASIC program as the set value change are not backed up in flash memory unless specifically forced to do so by the program. Timers' and counters' are normally preset during program transfer but TBASIC allows you to perhaps use a HMI to make changes when needed, but it is not meant to be changed all the time by a program.
If you want to two different timer values for an action you could use two separate timers. Alternatively, you can start a timer with a desired count down value anytime by assigning the time-out value to the TIMER[n] variable and clearing the timer contact. You do not need to change its Set Value using the the SETTIMERSV command. Please check the following FAQ thread for explanation:
https://triplc.com/smf/index.php?topic=1046.0