View Full Version : Labview Solenoid Programming
3p1c w1n
11-02-2010, 17:12
The programmer for my team left last yeear so i've been trying to learn labview
My question is that the current robot calls for multiple push button solenoid's
I was wondering if someone could post how to do that and show some pictures that would be nice
What im looking for to sum up is
multiple push button digital output / solenoid
push button turns 1 motor
the magnetic digital input for the pneumatic
Mark McLeod
11-02-2010, 17:31
I have an example here (http://www.chiefdelphi.com/forums/showpost.php?p=907769&postcount=15) for a push button solenoid and the rest of the required pneumatic system.
Here (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=8478&d=1265156994) is a relay example for when you have a motor driven by a Spike. This does forward and reverse, but you can change "reverse" to "off" if you like.
Did you want a motor example that uses a speed controller?
I don't know what "the magnetic digital input for the pneumatic" means...
I'm really new to programming, so don't really know much... I'm trying to figure out how to use the Solenoid example code in the basic cRIO code. Is that the pictures that you posted, or is that something else?
Tasha
3p1c w1n
12-02-2010, 14:33
so for multiple solenoids would i use multiple solenoids would i put in multiple solenoids doing the same thing foe each
I would do the same thing for the Relay as I would for the solenoid correct
and pneumatic encoder i was speaking of is the MRS magnetic reed switch from BIMBA
The motor control will simply Raise 2 pistons so when they extend to reach the top of the tower
Mark McLeod
12-02-2010, 14:48
Yes, just add more of the same solenoid code for each new solenoid you want to add.
Repeat the Relay code for more Relays (Spikes). The Relay is treated a little differently than the solenoid, because Relays have 4 possible inputs - Forward/Reverse/On/Off and you need to use a case statement block to set those properly.
The magnetic reed switch gets connected to one of the Digital Sidecar inputs labeled Digital I/O. The same place that the pressure switch got connected and to the same signal/ground(1) pins, no power.
The pictures I posted are just my example of how to setup the compressor and use solenoids with the 2010 LabVIEW framework.
3p1c w1n
12-02-2010, 15:39
I have come across another problem
When I tried to put in 1 solenoid and 1 motor relay for the motor to lift the arm A popup that says my code is broken
I am not sure if these pictures uploaded with this post but on the chance they did it is a picture of my begin vi and the teleop vi
the begin vi I think is suPPosed to open a reference to a relay and solenoid
please look at it and tell me if I am on the right track?:ahh:
Alan Anderson
12-02-2010, 15:47
Sorry, no picture came through.
If you try to run a broken vi, LabVIEW will give you a list of the places that are broken. Selecting from the list will take you directly to the broken spot in the block diagram.
Mark McLeod
12-02-2010, 15:53
What I see looks correct and as it should be.
I see that the error is in teleop.vi, but I can't see where it is.
You can tell by the broken arrow button in the top left of the window header. (The Begin.vi has a nice error-free solid arrow.)
Double-click on the error in the popup window as Alan recommended and it will take you to the problem and highlight it.
What's in the False case for the Relay?
3p1c w1n
12-02-2010, 15:54
What would i need in the false because currently there is nothing
Mark McLeod
12-02-2010, 16:00
Well, what happens is your motor will begin to run forward as soon as button 11 is pressed, but there is nothing to stop it.
Usually, in the False case you'd set the Relay to Off.
3p1c w1n
12-02-2010, 16:06
ok I set it to off when the case is false and error still pops up. I attached the error message.
Thanks for your help.
Alan Anderson
12-02-2010, 16:14
I attached the error message.
Don't try to build the broken project. Just click the "run" arrow and LabVIEW will be able to show you where it is broken.
3p1c w1n
12-02-2010, 17:29
Thanks for the help
I haven't gotten that stuff working yet but I did get the compressor running
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.