Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

usb 6212 solenoid

Solved!
Go to solution

I'm trying to control a TTL solenoid valve using a USB 6212 and LabView.  I'm new to LabView and am not sure if my code is correct.  I'm also not sure what channel I am supposed to use.  I appreciate any help.

 

0 Kudos
Message 1 of 8
(4,172 Views)
Solution
Accepted by topic author biomedP

Hi biomedP,

 

I've had a look at your code and its a good start, but if you are just trying to turn the TTL on and off you dont need a U16 to control it. If you change your DAQmx write to boolean(1 line) you can just write a true or false (on/off) value to your solenoid.

 

 

Help solenoid.JPG

 

I'm not sure how far you are into this project but to develop it further you might also want to add some kind of loop or some control values. I have attached a file named "Solenoid%20Control-1_mod[1] revised.vi" which should point you in the right direction.

 

You might also want to look in the help files for further guidance:

 

Step 1: Go into LabVIEW and go to help.

Step 2: Click "Find Examples"

Step 3: On the browse tab, on the tree table click "Hardware Input and Output" > "DAQmx" > "Digital Generation" > "Write Dig Chan.vi"

 

Check out that example, it might solve some other problems.

 

About the channel, just check where the solenoid is plugged into your 6212 and change the input on the VI to match.

 

Let me know if you have any other questions.

 

Thanks, Owen.S

Message Edited by Owen.S on 09-22-2009 08:27 AM
Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,151 Views)

Hi biomedP,

 

Did you get your application working okay?

 

Thanks,

Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(4,117 Views)
Yes I did Thanks!
0 Kudos
Message 4 of 8
(4,111 Views)

Sorry to reply to this message.

I would like to have a help to design a similar solenoid valve control VI with frequency (hz) and counter (how many on/off) input setting.

Can you help me ? I am not familiar with control field.

Thanks !

 

Joe

0 Kudos
Message 5 of 8
(3,513 Views)

Hi Joe,

 

What exactly are you looking to do?  Do you have a more specific question?  What hardware and software are you using?  It may be better to start a new thread on this question, but that is up to you. 

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 6 of 8
(3,497 Views)

Hi, Kyle,

 

I am using NI-9485 SSR to control two solenoid valves.

I have to set the On/Off timing (in ms) and the frequency (# of On/Off in one second) of these two valves through 9485 and LabVIEW program.

The second valve must be Off when the first valve is On and vice versa.

I know how to design a single valve control by digital output.

However, I have problem on control two of them simultaneously.

Please advice.

That would be much help if you can provide me a sample code.

Thanks !

 

Joe

0 Kudos
Message 7 of 8
(3,452 Views)

Hi Joe,

 

If you have set up control for one valve, all you would need to change is instead of writing to a single channel you will write to multiple channels (changing the DAQmx Create Channel vi to have two channels, writing to two channels with DAQmx Write).  You can write a 1D array of '10' or '01' which will turn one valve on one valve off and vice versa.  They will be simultaneous as you update the array in your program.  Hardware timing is implemented with the DAQmx Timing vi, and software timing is done without the timing vi. 

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 8 of 8
(3,413 Views)