I have just started programming for my team we have lost our programmer and I have stepped in to learn LabVIEWfor the team and its going well so far. our team (1802) has been getting help from teams like 1986 in Kansas and they are great classes but only got me started. I will post a screen shot of the code if you can help I would be so thankful! This is what the code is trying to do…
Arcade Drive (Easy that’s the RoboRIO template)
Move two independent motors to spin one way and another. On an Xbox controller one motor will use button A and B and the other will use X and Y buttons
Use the POV Directional buttons on a joystick to move the two independent motors together at the same time.
I thought what I had would work, I see where I went wrong but I cannot thing of the solution. I was going off what I learned from the LabVIEW Training from the other day. Hope to hear you soon thank you very much hope you can help I am still very new to the language and desperately trying to learn all that I can before the season starts.
The POV output gives you a number from -1 to 360 based on which direction it is being pressed. No direction is -1, forward is 0, and it increases clockwise, outputting the angle from forwards. If you want to see if the POV is being pressed forward, get the first POV number from the array and check if it equals 0. If you want to see if it is being pushed backwards, check if that same POV number equals 180.
If you are going to use… Up to control something, it is advisable to “OR” all of the possible “UP” directions as many POV hats are tough to tell if you are up, or up&left or Up&Right…
This is a vi E2 wrote to turn POV to Boolean, see the or’s for the top, left, right, down outputs.
Hey my team has been made some Labview programming tutorials that you might find useful. I think the button drive one will answer you questions about how to drive two different motors at the same time. Let me know if you have any question or if you would like a video on something else
Sorry, I did not read the whole post or look at the code, now that I have, your mistake is you have multiple motor outputs in multiple loops, so some loops are telling the motor to turn on, some are turning it to turn off, you never know which command is last processed before and updated to the actual hardware.
There is one motor, there needs to be one motor set, then your program needs to control what speed you are telling it to run.
EDIT…
From your description, it sounds like you want to control 4 motors that are not on the driveline, but you RefNums are the same, I also can not see your begin, you need 4 different motor set refnums with unique names.