Hello, I’m sorry if there is a post like this already, although I looked and saw none. I am just now starting to understand LabVIEW and we have just gotten a working program for motor controll but how do we use a Drive Function or use multiple motors at once? I tried and what I came up with is the attached. I have tried the LVMastery but I find it hard to learn from. Thank you for any responses.
Dual Motor Prototype.vi (19.2 KB)
Dual Motor Prototype.vi (19.2 KB)
Do this:
(1) Right click on block diagram
(2) Choose WPI Robotics Library
(3) Robot Drive
(4) Choose which ever you want (open two motors or four motors etc.)
If you are using 4 wheel drive(normal wheels), choose Arcade Drive
Hope it helped
what he said.
If the in-built drive functions are too complicated for you, Use the Motor VIs from the Actuators part of WPI Library. You can set up individual motors this way and build your own drive system.
I did that my rookie year just to see how the drive function worked.
Thanks for replies. I got a motor program up without using the sets for 1 joystick turn controll. Thank you though!
You need to decide whether you are using arcade drive or tank drive (or something else). For arcade drive, you need to open up the arcade drive vi and wire in the joystick you will use and such. For tank drive, use the tank drive vi and open 2 joysticks. Wire the ONLY the y axes of the joysticks to the tank drive axes inputs. It’s probably a little difficult to read this, but I hope this helps!
Today I coded the attached VI. Is the arcade drive function do what this does? If so I should probably use that and shorten the code.
single_controller_0.1.2.vi (13.4 KB)
single_controller_0.1.2.vi (13.4 KB)
Yes, this is what arcade drive does, here and here are what you really need to try to duplicate.
Both of those are actually in the FRC cRIO Robot Project framework that you can use in labview. (in wpi robotics library there are open 2 motors and open 4 motors btw, which will then map them to a single referum name then arcade drive can address both of them. )