Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control solenoid valves from computer

I work for a small PV&V department. We have a cDAQ-9188 chassis with numerous cards for performing data aquisition, using Signal Express. We also have a PLC (Automation Direct) for controlling various cycles tests. I am normally able to program the PLC to perform multiple tests at one time, however we are currently running a test off site and the PLC is being utilized. We have another upcoming cycle test which will need some simple control function (turn directional valve on 2 seconds, rest 1 second, reverse directional valve 2 seconds, rest and repeat. It appears that our NI9375 card would be able to be utilized to control the directional valve (with a relay). Can someone verify this and provide a sample LabView program I could start with to control our test (we also have LabView, but I have not spent enough time on it to become familiar with programming it). Thanks in advance. 

0 Kudos
Message 1 of 7
(3,885 Views)

Hi RonSS,

 

LabVIEW has a lot of example programs out there, and includes a bunch of examples to help people get started on their code and applications. You can search through a lot of these examples in LabVIEW by starting from the LabVIEW Splash Window:

 

Help > Find Examples... (This will launch the NI Example Finder)

 

From here, you can look through the library of pre-packaged examples. For your applications, I think the most useful ones would be found under these directories in the "Browse" section of the example finder:

 

Hardware Input and Output > DAQmx > Analog Output 

Hardware Input and Output > DAQmx > Digital Output

 

The type of output of course will depend on what inputs the valve is expecting from your controller.

I also found a link to a related forum post, you may find some of their suggestions helpful:

 

http://forums.ni.com/t5/Digital-I-O/How-to-control-solenoid-valves-from-computer/td-p/2372934

 

Finally, here is a link to the NI Example Program finder, which you can use to search for code examples from the NI Community:

 

https://www.ni.com/examples/

 

These examples are mostly provided by users from the NI Community, and contain some examples released by NI as well. If the pre-packaged examples in LabVIEW don't really seem to work for you, you can check here as well. 

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
0 Kudos
Message 2 of 7
(3,855 Views)

Thanks for you input. Do you know if I have the right hardware to make this happen?

0 Kudos
Message 3 of 7
(3,852 Views)

Hi RonSS,

 

You said that you were using a cDAQ-9188 chassis, but we'd also have to know what specific modules you have plugged in to the chassis in order to help you determine if your hardware will work as well.

 

Also, if you could give a description of what inputs your solenoid (Analog Voltage, AC or DC, how many volts, etc.) is expecting in order to control it properly that would also be helpful.

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
0 Kudos
Message 4 of 7
(3,847 Views)

The card I believe we can use is the NI9375. I do not plan on supplying any inputs (I use a hardwired level/temp sensor to keep the power supply safe). I am hoping this will be a simple on-off program. Thanks.

0 Kudos
Message 5 of 7
(3,844 Views)

Sorry, I did not read the reply correctly. I do not  have any relays yet, since the directional valve solenoids require more amperage than the NI9375 can provide.

0 Kudos
Message 6 of 7
(3,843 Views)

I am not familiar with the NI9375 but according to the data sheet it should be possible to drive a solenoid directly. The outputs are suitable for 24VDC signals. Please check output current per channel and per module. If it is not already integrated in the solenoid to drive, do not forget to add a flyback diode to surpress excessive voltage when switching off the solenoid. 

If you need higher driver currents you have to use some power driver circuitry. 

0 Kudos
Message 7 of 7
(3,827 Views)