View Full Version : General Labview Help
eyeswideopened
01-02-2013, 15:58
Ok, here is what is going on. I am on a first year team, my team like to be "dreamers" and they are asking a lot of the programming department. At the moment my team is using Labview to program the robot. Also, some other noteworthy things to add in are... 1) I am the only programmer 2) There is no programming mentor. I am on my own completely. Ihave programming experence but not with labview. I really need help with some major things because everything is going wrong and there are a lot of deadlines that are comming up that I do not thing I willbe able to meet without some serious help.
1) how do I make a throtle control for a) the drivemotors b) a seperate chain drive motor
2) what is that paddle like thing at the bottem of the attack 3 joystick called and how do I use it do control the throttle.
3) how do I do anything with pneumatics? they want to make a piston shoot the frisbees and I am totally lost.
4) how should I integrate all of this into tank drive
5) how do I set up communication with the cRIO?
anything else that is useful please help. If you need to you can contact me on my blog (http://eyes-wide-opened.tumblr.com) Any help would be appreciated.
Thank you.
Mark McLeod
01-02-2013, 16:10
1) how do I make a throttle control for a) the drive motors b) a separate chain drive motor
I assume a joystick is your throttle. Most drivers just lean on the joystick to move.
How do you want to control or override that movement?
Think about what you want to have happen and we'll help work you through what's needed.
2) what is that paddle like thing at the bottom of the attack 3 joystick called and how do I use it do control the throttle.
It's called the throttle interestingly enough.
It shows up as axis 3(throttle) on a joystick Get.
3) how do I do anything with pneumatics? they want to make a piston shoot the frisbees and I am totally lost.
There is example code using pneumatics under the Getting Started window -> Support -> Find FRC Examples..., then in the pneumatics folder.
4) how should I integrate all of this into tank drive
That depends on how you want the throttle to work and what you want it to do for you.
5) how do I set up communication with the cRIO?
The default robot project sets up everything you need.
Did you install:
the Kit DVD
The LabVIEW Update
The Utilities update
the Driver station updateHere are some other examples (http://team358.org/files/programming/ControlSystem2009-/LabVIEW/) I use when teaching FRC LabVIEW.
eyeswideopened
01-02-2013, 16:23
They are having me use a third attack 3 joystick to do the lifting arms and the shooting. They want me to make the paddle at the bottem control the throttle and then use the trigger to shoot the frisbee. (the throttle is for the chain drive which powers the frisbee thrower). They want buttons 6 and 7 to be the up and down for the lifting arms while climbing. I am not sure how to make 6 just motor up and 7 just motor down.
Mark McLeod
01-02-2013, 17:20
They want me to make the paddle at the bottom control the throttle
...
(the throttle is for the chain drive which powers the frisbee thrower)
This gets done the same way you use the regular joystick movement to control the drive motors. You're just taking the control from a different axis.
Here's an example, but change the axis 2(y) to axis 3 (throttle), and Joystick 1 becomes Joystick 3 or whichever joystick you name to control all this:
http://team358.org/files/programming/ControlSystem2009-/LabVIEW/SingleMotorExample.jpg
and then use the trigger to shoot the frisbee.
That would be your pneumatics. So something like this (but change Joystick 1 to Joystick 3 again):
http://team358.org/files/programming/ControlSystem2009-/LabVIEW/DoubleSolenoid-2011.jpg
The compressor also needs code like this to run:
http://team358.org/files/programming/ControlSystem2009-/LabVIEW/CompressorExample2.jpg
They want buttons 6 and 7 to be the up and down for the lifting arms while climbing. I am not sure how to make 6 just motor up and 7 just motor down.There's been a bunch of others asking how to do just this.
It does depend on what device you'll be using to control the arm motor (Spike or motor controller). But here's a general answer from somebody else that assumes a speed controller is being used:
http://www.chiefdelphi.com/forums/showpost.php?p=1121889&postcount=8 (http://www.chiefdelphi.com/forums/attachment.php?attachmentid=11793&d=1328657181)
eyeswideopened
01-02-2013, 18:20
Thank you very much, I will try that stuff.
Mark McLeod
01-02-2013, 18:25
If you have trouble finding or creating any of these icons just ask and one of us will help you locate what you need.
BitTwiddler
01-02-2013, 19:07
Thank you very much, I will try that stuff.
May I suggest you go visit Mark's team's website at:
http://team358.org/files/programming/ControlSystem2009-/LabVIEW/
This is an excellent resource that I often go to for ideas on how to program common tasks.
Try it.
eyeswideopened
02-02-2013, 12:57
what are the "foward" and "reverse" blue boxes called? Thank you
Mark McLeod
02-02-2013, 13:57
The easiest way to get those is sort of a trick.
You can always get the right type from the icon that needs it.
Hover your cursor over the Solenoid Set input node.
Right-click and choose Create -> Constant.
That'll get you one of those enumerated types blue boxes.
Copy and past that blue box to get the ones you need, then remove or disconnect the original from the Solenoid Set.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.