We have implemented a holonomic solution for our drive train. In the programing we have changed the begin vi to a 4 motor open. In the teleop.vi we have changed the false value to drive. When the program is uploaded without error, we change to the driver station using the classmate pc. There we get readings that eeverything is fine except the camera that were using. The pmws register movement but the robot itself does not. Any help would be greatly appreciated.
Pedro - are you attempting to “Run” the code using the arrow in robot main.vi, or are you building then permanently deploying it to your robot?
In addition, you don’t really want to be switching users. It’s better to deploy the code then log off the developer account and log into the driver station account. Simply “switching users” leaves program running in the other account that will slow the computer down. I can’t tell if that’s what you’re doing, so can you clarify?
I have tried to run it using the arrows but yeilded no results so we tried to run it using the driver user. What we have done is to replace the 2 motordrive vi on the begin vi with 4 motors so we can use the ref. on the teleop vi. On the teleop vi we tried to implement a holonomic solution. With the basic 2010 project it runs. as soon as we apply a chonge in 4 motors on begin and teleop it does nothing. I will try to paste a screenshot.
Simply having 4 “Invalid”'s is a first mistake. You need to set those to what the PWM channel is.
Second - You placed this code in Teleop?
You need to put the “Open 4 motor” in Begin.vi, then set it to a Robot Drive refnum. Then, get thar refnum in Teleop.vi
You also need to not have loops inside of teleop, because Robot Main handles the loop for you
If the PWM’s are being set but the robot is not moving, check wiring and the disabled switch. If next to “Disabled/Enabled” in the Driver Station it says “Watchdog Not Fed” then your code is stuck in an infinite loop or something else has happened.
You should only be opening your motors once, in begin. You need to open them using the correct pwm connection #, and you need to assign them a name using the “setref” vi.
In teleop, you refer them to with the getref command.
Please look closely at the way the default framework opens and utilizes motors. That should help.
Likewise, you don’t want to be closing the motors at the end of each loop. The close commands should be in your “finished” section.
Thank you guys ill try it soon. Theyre invalid because i didnt know which pwm was each motor and whats inside the loop is what we placed in the false option on the teleop. Ill try it soon when I get to the workshop.
Pedro, can you clarify on what you mean by two sensitive?
If you mean that you push a little, and the bot goes fast, then you have to ramp or scale your magnitude. You can do that a couple of ways.
I’ll give you some hints: You could use a math box, and an equation of a line or parabola to calculate a new magnitude based on your input magnitude. Say, if your magnitude is .4, you can change it to .2. You’ll need to different equations though, one that has very little slope, and another at the end of the first that has a high slope that when you push full magnitude you still get a full magnitude response.