Author Topic: Timer present value setting  (Read 11504 times)

sid80555

  • Newbie
  • Posts: 36
  • I'm a llama!
    • View Profile
Timer present value setting
« on: July 08, 2011, 08:45:46 AM »
I am using a keypad to enter a value which sets the timer value.I use F1 and F2 keys to increase the value of the timer.But the problem is that the timer does not start from the value i enter immidiately as i enter it on the keypad.For example the set value of the timer is 800 sec and i input a timer value of 30 sec(by decreasing using f2 key) ,it first finished the 800 sec and then starts counting down the 30 sec.How do i update the timer value immidiately as i enter it using the keypad? I guess it is beacause i am using the gettimerSV[] function to get the set value of the timer instead of the present value.Do we have a funtion like gettimerPV[] or something?

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Timer present value setting
« Reply #1 on: July 08, 2011, 10:01:52 AM »
TIMER present values can be directly accessed using the following notation:

timerPV[n] = 10       ' n is the timer number 1..255
                             ' set timer n to the value 10

A = timerPV[n]        ' read current value of timer n into variable A

gary d

sid80555

  • Newbie
  • Posts: 36
  • I'm a llama!
    • View Profile
Re:Timer present value setting
« Reply #2 on: July 08, 2011, 02:14:18 PM »
Thanks a lot gary... works fine now :)