From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

double timer

Solved!
Go to solution

Hi everyone!

I've a problem to resolve on my VI (please find the pic attached). I need to control the flow rate of a pump (timered) only if it receives the signal from a DI.
the signal to the second timer (the one of the flow rate pump) is driven by a first timer that gives a boolean out (digital signal then) only when a determinate time is passed every two signals in.

The Digital inputs come from a counter, if between a signal and the other pass over "xx" seconds , the signal must be sent to the pump but with the second timer it must be temporized.

 

Actually the first timer is working well, but then the pump just starts (pump on the VI = boolean indicator) and the signal is not timed (intermittently) from the second timer!

I also tested the second timer (stand alone) and it's working...

 

where is the gap?

 

p.s. I apologize for the italian information in the panels..

0 Kudos
Message 1 of 10
(5,786 Views)

Hi Frechete,

 

please consider that until the elapsed time is under 60 seconds you send a true command on the reset input of the second elapsed time and when 60 seconds are passed the second elapsed time is not resetted and starts the count of the 20 seconds, but if the first elapsed time reaches the time target, it starts again: which is the time target of the first elapsed time?

 

Thank you,

have a nice day.

 

FBM

0 Kudos
Message 2 of 10
(5,740 Views)

Hi FatBoyMonchi, thanks for reply,

well , the state machine works like this.. If from the first timer pass a time greater than 60 seconds from a signal to the other one, it must send a boolen T (a digital output) passing by the second timer that must activate the pump just for few seconds (e.g. 10 sec every 20 sec) in order to have a right flow-rate from the pump. 
So, about your question, I've to put also a time target to the first timer? but in that way when the time is reached, this timer (the first) will reset and send again a signal to the second one.. 
But probably you're right, I can fix a time target to the first-timer higher than 60 seconds... in order to have a signal to the second timer just once.

Thank you!

0 Kudos
Message 3 of 10
(5,733 Views)

well, I really don't understand why the second Timer still doesn't work.... 😞 

actually it is giving ON or OFF to the output without respecting the elapsed time / time target..

0 Kudos
Message 4 of 10
(5,726 Views)

Hi,

 

please note that if don't pass a time target to the first Elapsed Time, it is going to use the default value (1s)...

🙂

 

FBM

0 Kudos
Message 5 of 10
(5,700 Views)

If you want, tell me what is your purpose, so we can find another way to do what you need.

 

Have a nice day!

 

FBM

0 Kudos
Message 6 of 10
(5,698 Views)

Here I'm, thanks FBM,

well the VI receives from a DI the signals from a gas counter, at each turn of the counter it will be counted through "format into string" (as you can see on the pic). When from a count to the other one pass e.g. more that XX seconds (first timer) then the boolean signal (ON) from the first timer must be directed to a DO that can control the start of a pump, but.. the pump must run every XX seconds, not continuously, so that's why I need a second timer that can control the flow rate of the pump with intermittence.

This is how my case loop of the VI should be work.. but the second timer doesn't work.. also if a use another case loop for the second timer, I still don't understand where I'm wrong on it.

 

have a nice day too!

0 Kudos
Message 7 of 10
(5,693 Views)
Solution
Accepted by topic author Frechete

Here I attach an example I made just like your, only to show you that it's working right, but only if you use a correct time target for the first elapsed time function.

 

Hope it helps,

have a nice day.

 

FBM

Message 8 of 10
(5,686 Views)

thank you,

the fact is that the first timer has to count how much time passes through a signal to the next one, and if the time passed is more than XX second it has to send a signal to the second timer..

0 Kudos
Message 9 of 10
(5,671 Views)

If you have a max time the first elapsed time has to wait for, then use that value, but if not, maybe you have to modify the code...

 

Have a nice day!

 

FBM

Message 10 of 10
(5,655 Views)