LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling 48 solenoid valves (2 in sync at 1 time) using LabView

Hardware part: 

- 48 Solenoid Valves (8 'turrets' with 6 valves each - 2 turrets work in sync at a time with one turret sitting on top of another) (all connected to power source and driver boards).

- NI SCB-100 connector box this is where all the signal cables go.

- NI USB-6509 (connnected to the connector box and a pc running labview)

Software part:

 

In the Measurement and Automation Explorer, I have been able to generate digital output signals (NI-DAQmx tasks) that open and close the individual valves. I have created 4 tasks (1 task per 2 turrets) and can now manually open and close individual valves 'on demand'.

 

Question:

 

I'm hoping to put together a vi that allows me to:

 

1) open 2 valves at the same time and make sure they stay open for a particular amount of time.

2) have a sequence of this very thing happen depending on how many valves I select. In other words I'd like each valve to be represented by a 'tick box' so I can select say 4 valves in todays experiment and 24 valves in tomorrows experiment. 2 valves need to be open in sync (they are normally closed) at 1 time.

 

Your help would be much appreciated. This work is part of my phd research and I'm completely new to LabView...

0 Kudos
Message 1 of 4
(3,585 Views)

Hello bdebaere,

 

Let me try and help you out with your two questions.

 

1) open 2 valves at the same time and make sure they stay open for a particular amount of time.

 

Let me start by a brief explanation.  The USB-6509 DAQ board is software timed Digital I/O.  What this means is both the time it takes to change the output and when to start changing the output is determined by the software used to control it.  A hardware-timed solution changes the output on a hardware clock edge.  When using an operating system, such as windows XP, that is not determistic, this makes your output time not deterministic. 

 

In short, you should have no problems writing two lines high at the same time if you include them into the same task.  Your software is going to have to reconfigured the channels in the task each time you write to a new line.  The amount of time that these valves are left open is not going to be deterministic because they rely on the software timing mentioned above.  However, this will generally be within milliseconds after calling the DAQmx write.  For example, the below code will write lines 0 and 1 high, wait 1 second, and write both lines low.  Both lines will be written high and low at the same time, however, the time between writing it high and low will be software timed (generally it will be 1000ms +/- a few millisecond).  If you are running other applications, this time could change from a few milliseconds to a much longer delay.

 

swtime.JPG

 

2) have a sequence of this very thing happen depending on how many valves I select. In other words I'd like each valve to be represented by a 'tick box' so I can select say 4 valves in todays experiment and 24 valves in tomorrows experiment. 2 valves need to be open in sync (they are normally closed) at 1 time.

The task can be reconfigured for a chosen number of lines.  In the above example, just use a case structure (based on the lines selected) to configure which lines are going to be used in the task.  

 

If you are just getting started with LabVIEW, I would highly recommend taking a look at the follow links:

 

Getting Started with LabVIEW - Great link for getting started learning LabVIEW.  Includes links to the Three-hour and Six-Hour Courses.

 

Instructor-Led Courses - This site will assist you in finding an instuctor-led course if you are interested in taking some formal LabVIEW training.

 

Please let me know if you need any additional help.

 

Regards,
Paul C.

Message Edited by Paul C. on 08-10-2009 02:40 PM
0 Kudos
Message 2 of 4
(3,538 Views)

Many thanks Paul C. for your input - it's a good way to get started for sure! I have registered for a NI workshop in a few weeks.

 

Much appreciated - Bart 

0 Kudos
Message 3 of 4
(3,464 Views)

Pual covered the hardware part of this. Looking ahead I would not be suprised if you want to control these from seperate functions. If so see this Nugget where I showed an eaxmple of controlling pumps that may be helpful.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(3,460 Views)