Define TON timer

Request New Features here.
liulanger521
Posts: 10
Joined: Fri Oct 08, 2010 7:31 pm

Define TON timer

Post by liulanger521 » Sun Nov 06, 2011 9:50 pm

In my application, I need a TON timer.

The function block Timer On Delay implements a turn-on delay..

TON(IN, PT, Q, ET) means:

IN and PT are input variables of the BOOL and TIME types respectively. Q and ET are output variables of the BOOL and TIME types respectively. If IN is FALSE, Q is FALSE and ET is 0.

As soon as IN becomes TRUE, the time will begin to be counted in milliseconds in ET until its value is equal to PT. It will then remain constant.

Q is TRUE when IN is TRUE and ET is equal to PT. Otherwise it is FALSE.

Thus, Q has a rising edge when the time indicated in PT in milliseconds has run out.

How could we define it or achieve the function!

It is best that we have similar timer function in version 2.4 or others, like in CodeSys!
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Define TON timer

Post by ksaenz » Mon Nov 07, 2011 9:41 am

Hello liulanger521,

We will add this to the wish list for the next version of the PowerVision Configuration Studio.

In the meantime I attached an example to be able to do this today with a state machine.

The example uses 100ms increments for the PT timer because state machine transition timers work with 50ms increments so you could actually go as low 50ms. In 2.3 you could also use one high speed timer as low as 10ms.

Do you use more than one TON timer?
How fast and precise do you need the timers to be?

Thank you,

ksaenz
Attachments
TON Timer.zip
Created with PVCS 2.2.10678
(264.87 KiB) Downloaded 27 times