LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control solenoid from labview

Hi all,

 

I am having a solenoid valve to be controlled from my labview program from a computer.

I already have an interface that is built to switch the solenoid valve on/off.

But I dont have any information on the interface. The interface is provided with a PCI DIO 96 card to communicate with the computer.

The interface has a "ni sc 2054"  (24 VDC) accessory and its connected to a "Grayhill 16 channel rack". I couldn't really understand the interface.

I need to switch the solenoid on/off using the PCI DIO 96 card. Can I do that without the knowledge of what's in the interface? The interface is working with a Windows 98 system but there is no way to view its code or make it work on the system with Windows XP. Does labview provide with this abstraction so that I can use DAQ and operate the solenoid without knowing what it actually does?

 

Or its ok even if I have to purchase a new hardware to control the solenoid. Any solution which doesn include the interface or with a new setup in the middle is also appreciated.

 

I have attached a snapshot of the circuit inside the interface, but I dont think if it will be really useful.

 

Thanks for your help.  :smileyhappy:

 

VJ 

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

Hi Vijay,

 

Looks like you've got an opto isolation board populated with "output" opto relays. (Those are the red blocks on the Grayhill board) 

Your Opto board is connected to a "Breakout" board, and that is connected to your DIO 96 card. 

This is a setup we use all the time.  You shouldn't need new hardware to operate your solenoid valve.  

I'm not sure from your question if you want to add a new solenoid to your existing hardware, or if you just want to control an existing one.

If you've already got your solenoid wired up, you need to know what channel (line) it's on.  The numbers beside the red blocks on the Grayhill board indicate which line each block is on. 

An easy way to test your wiring connection without writing any code is to start Measurement and Automation Explorer.  There should be a link to it from your National Instruments Start menu. 

Start that program, and look for something called "Devices and Interfaces" on the left hand side.  Under that menu, you should see some reference to your DIO 96 card.  If you select that, on the top of the right hand pane you should see something called "Test Panels".   When you click on Test Panels you should see something similar to the image below.  (Your's may look different if you're running an older version)

 

test panel 

 

Click the "All Output" button, and then click "Start".  Then move the switch sliders to select On or Off.  Make sure you aren't going to damage anything by turning on the wrong output if you don't know exactly which one your solenoid is connected to. 

As you turn outputs on and off, you should see the little red LEDs on your Grayhill board lighting up.  Once you know which Port and which Line your solenoid is on, you can then write LabVIEW code to turn it on and off. 

Good luck.




 

Message Edited by pallen on 03-05-2009 09:34 AM
---------------------
Patrick Allen: FunctionalityUnlimited.ca
Message 2 of 4
(3,952 Views)

Hi Pallen,

 

Thanks for your valuable input.

I got a different kind of panel when I tried what you said.

But I had 12 output ports (0 to 11)  and 12 input ports. Each had 8 lines as shown in the picture.

Should I select each of the 12 ports and change the combination of the inputs (0 -8)  to see if the solenoid is switched on/off?

Or should all the output lines of a port be switched on to switch on the solenoid?

How can I find this?

Thanks and kudos to you..

 

VJ 

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

Hi Vijay,

 

I'm not surprised you have a different panel.  Things have changed over the versions and I think I'm running either the latest or the next-to-latest on my laptop.  

 

Your card really only has 12 ports altogether. (12x8=96)  But from the test panel you can set them to either be inputs or outputs.  So it might look like you have more.  

 

Probably the fastest way to find which one is switching your solenoid is to set all ports to "Output", and then try setting each port "all high" and "all low".  This will toggle all the outputs on ports.  What will probably happen when you get the right port is you will see your solenoid LED and the ones next to it all turn on and off at the same time.  Then you just need to toggle the outputs individually until you pick out the right one.  

 

Hopefully that makes sense.  

 

Good luck.  

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 4
(3,868 Views)