Internet PLC Forum
General => Technical support => Topic started by: hamidraza on November 14, 2011, 01:12:56 AM
-
1)- how can in check a timer in cust. func. whether it is completed or not.(like testbit command)
2)-can i use the same timer in cust. func that was earlier used in ladder logic.
-
Hi there,
You can check if the timer has timed out like this:
IF TIMERPV[1] = 0 Then . . . .
You can also set the timer as follows:
TIMERPV[1] = 20
Hope this is what you need. :)
-
Thank you Mijoe.
Please also refer to this thread for some discussion:
http://www.tri-plc.com/yabbse/index.php?board=2;action=display;threadid=1046
You can also use SETIO, TESTIO and CLRIO to test the contact status of a timer.
-
how can i access the timer accumulated/present value.
like if i set a timer for 10 sec. and i want to check whether now 5 sec. has been completed or not.
-
It is the same question as you have asked previously so we merged the topic. Please try not to start a new topic when you are asking the same or related question.
TIMERPV[n] contains the timer present value for timer #n.
You can monitor the value of TIMERPV[n] if you run your program in a tight loop. Otherwise you can use the timer contact to trigger other events when timer times out.
-
how can i get the present/accumulated value of a timer.
i mean if i set a value of 10 sec. for a timer now i want to make a relay high when timer completed 7 sec. how can i get the instantaneous value of the timer.
-
You have asked the same questions 3 times and we can only give you the same answer 3 times.
TIMERPV[1] returns the present value of the timer #1.
The rest please refer to the previous posts in this thread.