LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay Relay Circuit for Digital Output powering a Solenoid Valve

Hello,


Still learning, but looking for an example of a delay/relay circuit to open & close a valve at an adjustable delay time & relay time using Compact Daq.  For example I would like to set the delay for 1 second and the on for 5 seconds.  The valve will continually until stopped turn on for 5 seconds and off for 1 second.

 

Thank you,

0 Kudos
Message 1 of 2
(556 Views)

I don't think you've thought the problem through completely.  You talk about two "Boolean Events" -- turning a valve on (for 5 seconds) and off (for one second) in a cyclic manner, and another "Start/Stop" Command that "controls the Valve Control".  

 

You specify the Valve as "off for 1 second, on for 5, and repeat".  You say a little less about the second control, except it seems to be "off" initially, and then goes "on" (and maybe stays on forever?), allowing the Valve to "wait, go, go, go, go, go, wait, go, go, go, go, go ...".

 

Consider the Valve.  You want it to start Off for one second, then on for 5 seconds, and repeat.  What kind of structure in LabVIEW does repeats?  While (hint!) you're thinking about this, what goes on "inside" this loop?  A Decision, On or Off.  What kind of value is On and Off?  Ask George (Boole).  How do you make a choice?  In case you forgot, look at the structures below.

Valve Demo.png

OK, what happens when this starts?  Note we don't know what "Valve" is, initially, but let's assume it is False (off) (this is something you should think/worry about).  Because we start by bringing a "False" into the While Loop, the "False" Case statement will (when the Case exits) change "Valve" to True, turning it on.  Is that what you want?  Not quite -- you want to wait for 1 second (or 1000 msec).  Do you know a function that "waits" for 1000 msec?  [Look in timing palette].  Where would you put this function?  Remember the Third Rule of Data Flow -- "a Structure/Function cannot exit until everything inside runs".

 

I assume you know about Shift Registers, and can tell me what will happen when this loop runs the second time (while the Valve is on), and you can figure out how to turn it off after 5 seconds.

  

So all you need to finally do is to figure out how to Start and Stop the whole shebang.  This can be a little complicated by asking "how immediate do you want Start and Stop to be"?  Do you want two buttons, "Start" and "Stop", or a switch, "On" and "Off"?  What are the "trade-offs"?  [Here's a question -- what happens if you go "On - Off" within 3 seconds?  Do you immediately Quit, or do you stop when the Valve turns off?]

 

Think about what you want to do, then you'll figure out how to do it.

 

Bob Schor

Message 2 of 2
(518 Views)