01-26-2015 08:36 AM - edited 01-26-2015 08:37 AM
Hi,
I am very new to labview so any help would be apprciated.
I am using the ni usb-6009 as a power source for my solenoid valve. The valve is 12vdc but because the max output voltage for the ni usb-6009 is 5v i have designed and build an op-amp circuit which will amplify the voltage. I want to create a vi that will give a +5v digital output when a push button is pressed and 0v when the push button is off. What would be the most efficient way of doing this? Thank you.
Solved! Go to Solution.
01-26-2015 08:45 AM - edited 01-26-2015 08:47 AM
Hi Adam,
using one of the DIO pins should be most efficient…
(It's good to know you already use an OpAmp to drive your valve! A simple transistor (either bipolar or MOSFET) should be sufficient too.)
LabVIEW comes with a lot of example VIs. They also explain how to output a single boolean value!
01-26-2015 08:49 AM
How much current does the solenoid draw? You say that you are powering the solenoid from the USB-6009 so just converting the voltage from 5V to 12V will not work - there is a current limit of 8.5mA on the 6009 which will not be enough to power the solenoid. You will need to use an external supply that can provide sufficient current to drive the coils of the solenoid and then use a transistor circuit to switch on the supply from the digital output of the 6009 (which can't draw more than 8.5mA).
Once you've got your circuit right, you can use MAX Test Panels, the Data Acquisition Express VIs or the DAQmx palette in LabVIEW to control the digital output. There are lots of examples in LabVIEW on how to do this 🙂
01-26-2015 09:19 AM
01-30-2015 06:47 AM
Hi guys,
Sorry for being so slow in writing back. The output current required is 300 mA. This is also the same for the 12VDC peristaltic pump that I am using. Would a current source be the best approach for getting this? Thank you.
Adam
01-30-2015 06:54 AM
You just need a supply that can handle the current. If you are using the simple transistor or MOSFET circuit GerdW mentioned, then your external supply should just need to handle the current and you will be fine.