Labview help

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.

Thanks 2564

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.

heres a link to the screen shot

Ok. So the fact that it works with the default project means you’ve got the hardware wired correctly so far as that goes.

Can you post your actual code? I suspect we’ll find an error in it that is causing it to not work correctly.

ok im trying to upload a screenshot

we placed the code on the false in the teleop.

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.

Pedro,

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.

this is what I placed in teleop:

this is what I set on begin:

I did not change the name of the setref so that I would not have to edit the rest of the code in the other vi’s.

One last last thing (yes I said last 2 times) we are using mecanum wheels

Also if anyone else cares to comment it would be appreciated because 2 people in 127 views, well; you get the idea
thanks

the 4 motors worked. Does anyone know how to make a better holonomic; since this one is way too sensitive?

When my team is testing code, we just opened up the drivers station windows in the developer login.

it always works fine for us and you might want to try it.

thanks thats what we did thank you all

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.