LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program a solenoid in Labview?

Hello,

I am an engineering student trying to accomplish a design project.  I would like to use Labview to turn a solenoid on and off.  I'm not sure how to implement this.  What microcontroller/processor do I need to make this happen?  Is there a recommended solenoid that would make implementation easier?

0 Kudos
Message 1 of 13
(4,401 Views)

There's not much in the way of inexpensive hardware available that will run LabVIEW.

I keep hoping that the Raspberry Pi will one day manage it but I don't think it's there yet.

You can look at NI's hardware offerings for embedded controllers with I/O like the cRIO but they are a bit outside the range of what most students are willing to spend.

Go to whomever gave you this assignment and ask them what hardware is already available from them for you to execute this assignment.

 

If the cRIO route is too expensive, besides a processor that run LabVIEW like a PC or MAC, you need it to also have some I/O that can be used with your solenoid. I do know that LabVIEW can be used to control the I/O bits of a parallel printer port on a PC, but those are rare now days. So you may need to buy something that will give you a switchable output and hopefully what you buy will be rated to control your solenoid (voltage, current and the ability to handle the di/dt voltage spike that you will get when the thing is switched off). If what you have or what you buy is not rated for the solenoid, then an interface circuit will be required so you do not damage your output.

0 Kudos
Message 2 of 13
(4,376 Views)
There are numerous options for cheap digital I/O that can control a solenoid. NI hardware includes something like the 6008 or 6501. If you want to use a micro, an arduino has digital lines that can be set by a LabVIEW program. Depending on the solenoid, you may need an external driver to provide enough current to turn the solenoid on.
0 Kudos
Message 3 of 13
(4,359 Views)

You don't need a microcontroller or processor, you just need some kind of digital IO device that can trigger a relay. The cheapest NI option I'm aware of is the USB-6501. Then you need to find an appropriate relay; it needs to have a control voltage that matches the output from the digital IO device, and it needs to switch enough current and voltage to drive your solenoid. Don't forget to add a flyback diode to avoid damage to your IO device when you turn off the solenoid.

0 Kudos
Message 4 of 13
(4,348 Views)

@Dennis_Knutson wrote:
There are numerous options for cheap digital I/O that can control a solenoid. NI hardware includes something like the 6008 or 6501. If you want to use a micro, an arduino has digital lines that can be set by a LabVIEW program. Depending on the solenoid, you may need an external driver to provide enough current to turn the solenoid on.

But note that the Arduino will not be the device running the LabVIEW. It will just act in response to LabVIEW running on computer talking to the Arduino. Arduinos cannot yet run LabVIEW.

0 Kudos
Message 5 of 13
(4,342 Views)

@nathand wrote:

You don't need a microcontroller or processor, you just need some kind of digital IO device that can trigger a relay. The cheapest NI option I'm aware of is the USB-6501. Then you need to find an appropriate relay; it needs to have a control voltage that matches the output from the digital IO device, and it needs to switch enough current and voltage to drive your solenoid. Don't forget to add a flyback diode to avoid damage to your IO device when you turn off the solenoid.


If you want to use LabVIEW to do the controlling, then somewhere there must be a processor capable of running LabVIEW.  It was not clear from the statement of the problem whether he expected his IO & solenoid to be tethered to a computer or if he was looking for a stand-alone controller.

0 Kudos
Message 6 of 13
(4,336 Views)

Ideally, it would not be connected to a computer at all.  My group is trying to use a solenoid to pick up an object and use an xyz stage to move it to a different location.   

0 Kudos
Message 7 of 13
(4,328 Views)

Furthermore, the XYZ stage is being programmed by LabView

0 Kudos
Message 8 of 13
(4,324 Views)
WNM,

The point wasn't whether the arduino could or could not run a LabVIEW program. It is cheap digital I/O. And, an arduino CAN run LabVIEW code with the extra cost toolkit available.
0 Kudos
Message 9 of 13
(4,310 Views)

@WNM wrote:

@Dennis_Knutson wrote:
There are numerous options for cheap digital I/O that can control a solenoid. NI hardware includes something like the 6008 or 6501. If you want to use a micro, an arduino has digital lines that can be set by a LabVIEW program. Depending on the solenoid, you may need an external driver to provide enough current to turn the solenoid on.

But note that the Arduino will not be the device running the LabVIEW. It will just act in response to LabVIEW running on computer talking to the Arduino. Arduinos cannot yet run LabVIEW.


I don't expect you had a look at the "Arduino compatible compiler for LabVIEW"? The "Raspberry Pi compatible compiler for LabVIEW" is currently in Beta and scheduled to be released in the next few months:

 

https://www.tsxperts.com/arduino-compatible-compiler-for-labview/

https://www.tsxperts.com/labviewforraspberrypi/

 

 

Message 10 of 13
(4,270 Views)