LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Solenoid Control using LabView and Arduino

So I have what I belive to be a very simple question, but I'm pretty new to LabView and am not totally sure how to do it. I'm trying to use Arduino and LabView to control a solenoid, and so far its working pretty well, but the system keeps looping.

I'm using a boolian button to activate the solenoid, then I'm delaying for a given amount of time, then closing the solenoid. The issue is that the boolian button needs to be deactivated in order for the loop to stop, otherwise the solenoid will continue to open and close until I deactivate the button. Does anyone know of a triggering type of button, that only sends one signal per mouse click?

Thanks!

solenoid.png

Message 1 of 53
(17,660 Views)

Labview provides 6 different mechanical swttch options for a Boolean Button. 

Right click on the Boolean Button

Select Mechanical Action

Try each Mechanical Action until you find one that is suitable.

I can't tell you which one to use because Labview's cause and effect explanation is confusing.

hrh1818

0 Kudos
Message 2 of 53
(7,357 Views)

Most likely you'll want "Latch when pressed" or "Latch when released."  The latter is similar to most Windows® dialog buttons in that you can press and hold it and it will not do anything.  You would then still be able to decide whether or not you want to have the button react.  If you choose that you don't want it to react to the press, you can drag your mouse off the button while still pressing and it will not be activated.

Both of these options will only be read as true once by LabVIEW.

0 Kudos
Message 3 of 53
(7,357 Views)

could you please post the vi file ?

0 Kudos
Message 4 of 53
(7,357 Views)

Hey fawaz,

Just right click on the button on the front panel of your VI and choose Mechanical Action.  Details on what each option does can be found here: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/changemechactofboolswitch/

0.PNG

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 5 of 53
(7,357 Views)

how to control dual solenoide valve in labview+arduino using pwm?

0 Kudos
Message 6 of 53
(7,357 Views)

fawaz,

Unfortunately, we cannot answer your question becuase you have not provided enough information regarding your system.  You will need to describe all of the hardware that you are [planning on] using and what you are trying to do with your system.

Also, I recommend that you start a new discussion (with as many details as possible) specifically for your question so that we can better assist you with your project.

0 Kudos
Message 7 of 53
(7,357 Views)

hi

my project is about controlling pneumatic two solenoide valve( up and down) using PWM on labview+arduino uno which will work as proportional valve.

project equepments

1 double acting air cylinder

2 5/3 double solenoid valve, 24v

3 arduino uno, 5v

4 labview software

0 Kudos
Message 8 of 53
(7,357 Views)

Hey fawaz,

In your code you should not branch the Arduino Resource wire.  What I mean by this is that you shouldn't split the wire for the two frames of the sequence structure, instead pass the same wire all the way through all LIFA VIS.  The same applies to the error wire, don't split it, just pass it through each VI (in one side out the other) to chain them together.

Do you have questions about the code?  Does it work?  If not what does it do?  As Nathan mentioned you have to provide us with a lot more information to help you.  Keep in mind we have no idea what you're working on , what you've tried, what is working, what is not working, and what specific questions you have.  Let us know and we'll do our best to help you.

Thanks!

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 9 of 53
(7,357 Views)

How do you know you can PWM your solenoid valves?  Most solenoid valves have a 30 to 50 millisecond response time. See:  <http://www.tlxtech.com/solenoids/high-speed-solenoids>   The default PWM frequency for analog write to a digital pin is approximately 490 Hz.  See: <http://arduino.cc/en/Reference/analogWrite>  Are you using special high sped solenoid valves? 

It is also possible to change the analog write PWM frequency.  See.<http://playground.arduino.cc/Code/PwmFrequency>  However, the lowest analog write PWM frequency is approximately 31 Hz.  Plus you will need to modify LIFA to change the analog write PWM frequency. 

hrh1818

0 Kudos
Message 10 of 53
(7,357 Views)