LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous switching solenoid valves

Hi there.

 

I am using labview to control an closed circuit of flowing oil. within that circuit there are two solenoid valves that i am using to divert the full oil flow from one path to another. Therefore in labview i have used a shift register within a while loop to automatically alternate switching of the valves i.e. when one is open the other is closed.

 

This works fine from a Labview point of view. However, the solenoids are quicker to open than they are to close, so my pressure trace of the oil flow is not as close to a square waveform as it could be.

 

I would like to somehow delay the boolean 'true' signal (which is what opens each solenoid) by a variable ammount (probably 500ms max) so that effectively i can fine tune the switching of the valves.

 

Hopefully that makes sense. I guess that there is an easy solution but i'm a complete novice really. 

0 Kudos
Message 1 of 12
(3,115 Views)

Hi Boooomer,

 

put a delay between switching one DO and the other DO.

 

Or use a statemachine (with some meaningful states) to create a nice scalable VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(3,102 Views)

Hi GerdW

 

Thanks for the reply, but could you put it in lay terms for me please as i'm really new to labview

 

thanks

0 Kudos
Message 3 of 12
(3,097 Views)

Hi Boooomer,

 

i'm really new to labview

When you are really new to LabVIEW you should take all those free online courses offered by NI on their website (www.learnni.com ).

And you should study the example VIs coming with LabVIEW.

And take a look at the example projects coming with LabVIEW.

And learn to write the name "LabVIEW"… 😄

 

in lay terms

- a delay requires some sort of wait function

- a statemachine is a basic programming concept (and is no special LabVIEW term)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(3,090 Views)

Ok thanks

 

Is anybody able to give me some specific help at all?

 

Would much appreciate it

0 Kudos
Message 5 of 12
(3,045 Views)

Hi Boooomer,

 

some specific help at all?

What's wrong (and unspecific) with using a delay between the switch operations?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(3,039 Views)

Obviously i want to delay the switching operations, but i'm trying to find out specifically how i do this in LabVIEW

0 Kudos
Message 7 of 12
(3,018 Views)

Hi Boooomer,

 

some pseudocode:

do something
wait(500 ms)
do something else

Quite easy when you use DATAFLOW to sequence the commands…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(3,015 Views)

ok i'm not getting anywhere with this.

 

I've attached a screenshot of my best attempt so far.

 

I've used a shift register to trigger a case structure to switch between true and false. The case structure should delay its operation by the value i put into the "milliseconds to wait" input and then stop functioning when the shift register changes from true to false or vice versa.

 

At the moment when i run the programme and press the start button inside the event structure the led's light up when they should but they stay on permenantly.

 

Any ideas?

0 Kudos
Message 9 of 12
(2,908 Views)

Hi Boomer,

 

right now you switch one valve in the TRUE case and a 2nd  valve in the FALSE case. The valves will never switch as they get the very same DO value all the time…

You use 3 timing functions in the loop - you will never get any useful timing this way!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(2,900 Views)