LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Valve control program Help

Good afternoon everyone,

I’m still a work in progress in learning LabView and could use some help with what I believe is a very simple project.  I want to write a program to control 9 valves, with the possibility of expansion down the road.  They are 24vdc valves and this program would involve automation and manual intervention.  Example:

Start program

Valves 3, 4, 5 and 9 energize for 2 minutes

Valves 3, 4, and 5 de-energize

On-screen prompt asking “Has liquid been received?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 energize and 9 de-energizes for 1 minute

On-screen prompt asking “Ready to send final product?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 de-energize and valves 1 and 2 energize for 3 minutes

Valves 1 and 2 de-energize

Final on-screen prompt of “Production complete”  - End

This isn’t the exact program but I need to know how to set something up like this.  Or, is there a similar program I can check out to learn how?  Also, what hardware would I need for the NI interface of distributing the 24vdc?  Here is a diagram of the setup.  Thanks in advance!

Cyclotronized_0-1759951189721.jpeg

 

0 Kudos
Message 1 of 7
(281 Views)

I'd like to add the valves at 24vdc are running at 130mA and 3.1W

0 Kudos
Message 2 of 7
(254 Views)

Seems like you could use a NI-9485 relay module to directly switch these loads based on the voltage and current. You have specified 9 control channels so you would need 2 cards; they could both go in one cDAQ chassis.

 

You could go substantially cheaper by buying relays off the shelf and designing your own control circuits, but if you're starting down the NI route I feel like you're already forgoing cost in favor of something that is robust and easy.

0 Kudos
Message 3 of 7
(222 Views)

@Cyclotronized wrote:

Good afternoon everyone,

I’m still a work in progress in learning LabView and could use some help with what I believe is a very simple project.  I want to write a program to control 9 valves, with the possibility of expansion down the road.  They are 24vdc valves and this program would involve automation and manual intervention.  Example:

Start program

Valves 3, 4, 5 and 9 energize for 2 minutes

Valves 3, 4, and 5 de-energize

On-screen prompt asking “Has liquid been received?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 energize and 9 de-energizes for 1 minute

On-screen prompt asking “Ready to send final product?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 de-energize and valves 1 and 2 energize for 3 minutes

Valves 1 and 2 de-energize

Final on-screen prompt of “Production complete”  - End

This isn’t the exact program but I need to know how to set something up like this.  Or, is there a similar program I can check out to learn how?  Also, what hardware would I need for the NI interface of distributing the 24vdc?  Here is a diagram of the setup.  Thanks in advance!

Cyclotronized_0-1759951189721.jpeg

 


Do any of these valves control anything critical?

For example, when this automation is running and the windows computer decides to update and crashes or stuck, causing your LabVIEW automation to fail, will it result in any catastrophic failure on the equipment the valve controls?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 7
(205 Views)

Hi Cyclo…,

 


@Cyclotronized wrote:

could use some help with what I believe is a very simple project.  I want to write a program to control 9 valves, with the possibility of expansion down the road.  They are 24vdc valves and this program would involve automation and manual intervention.  Example:

Start program

Valves 3, 4, 5 and 9 energize for 2 minutes

Valves 3, 4, and 5 de-energize

On-screen prompt asking “Has liquid been received?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 energize and 9 de-energizes for 1 minute

On-screen prompt asking “Ready to send final product?” with an ‘OK’ button

Clicking ‘OK’ moves to next step

Valves 6, 7, 8 de-energize and valves 1 and 2 energize for 3 minutes

Valves 1 and 2 de-energize

Final on-screen prompt of “Production complete”  - End

This isn’t the exact program but I need to know how to set something up like this.  Or, is there a similar program I can check out to learn how? 


On the software part in your question: you describe a scheme that is known as "state machine"!

I see those states:

  • initialize
  • switch list of DO outputs (aka valves) ON/OFF
  • wait specified amount of time
  • wait for user input (wait for OK)
  • show result (and wait for user input)
  • deinitialize

Combine those states with a file that contains the parameters (like wait times, list of DOs to be switched) and you are done…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(199 Views)

This is a simple sequence of events, unless you plan to say NO to any of your dialogue questions, and so choose to do something else, this could even be simply implemented with a ‘sequence structure’ with ‘waits’ and LabVIEW dialogs to ask the questions and with DAQmx setting the digital outputs to control the valves.

0 Kudos
Message 6 of 7
(192 Views)

Thanks for the responses!
@santo_13 wrote:  Do any of these valves control anything critical?

 

They carry a radioactive liquid through a purification process resulting in an injectable radiopharmaceutical. If the program were to crash the synthesis would be aborted and cause a failed production.  No one would be exposed or any hardware damaged.  It would be unfortunate but not life threatening.  

There would be no option for "No".  The main thing here is to advance the synthesis once liquid transfer has made it to the next phase.

 

Are there any examples of something close to this I could use as a reference since I'm still fairly new to LabView?

 

Thanks again everyone!

0 Kudos
Message 7 of 7
(140 Views)