From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

output cRIO timer

Solved!
Go to solution

Hi everybody,

I'm new with labVIEW but I need help to accelerate my studying progress to make one system, I've done, working. 
I'm working with a cRIO and some AI and DI/O modules.

 

1) I have an analog signal input, an AI, that when it is below a fixed value, let's say for example 6, it will give a signal to a DO that makes the start for a pump.

2) My problem is that: when the pump starts, it must run not continuously but every let's say 20 seconds for 40 seconds.

3) When the signal from the AI is over the value of 6, the pump must stop.

 

I did a .vi that works fine with cRIO and AI, DI/O modules for the points 1) and 3). My problem is the point 2) if the pump starts I don't know how to make it "timered-looped" and to stop it when it has to stop (from the AI, signal beyond the fixed value)

I hope to have been clear.

Thank you very much for your help 

0 Kudos
Message 1 of 4
(4,900 Views)

Can you share some code?  There are many ways to do this.  Figuring out which way would work best for your exact situation needs a little more context.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(4,896 Views)

Hi crossrulz,

thanks for replying me.

here the .vi I built, before inserting the timer, or a rough idea of it, the .vi worked easy, now I have problem..

0 Kudos
Message 3 of 4
(4,891 Views)
Solution
Accepted by topic author Frechete

It looks like you are really close.  I would not put the time check inside of a case structure.  Instead, make the timer reset when the AI is not more than 6.  Make the timer set for 40 seconds with an autoreset.  This will reset the timer after the 40ms.  Just add a little bit more logic for when your outputs are on and I think you will be there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(4,880 Views)