Log in

View Full Version : Motor in Autonomous.


2829ron
22-02-2011, 18:30
Created robot project without game code. Teleop works fine. When I add motors in autonomous they don't run, but the robot will drive. Please help.

Thanx,

David

http://i612.photobucket.com/albums/tt209/tbcab/auto.png

j.cole
22-02-2011, 18:37
I think you need shift registers instead of loop tunnels try that and tell me if it works.

2829ron
22-02-2011, 18:41
Okay. I'll try that. I had tried that on this code before with what I have coded disabled. Does it need to be deleted?

Thanx

David

j.cole
22-02-2011, 21:54
Im not sure what your asking there

DavidGitz
22-02-2011, 22:41
Here are some "issues", although none of these I don't think are the cause of your problem:
-You should not need shift registers. It is still passing the same reference.
-The +1 in your while loops isn't needed, i is incremented automatically. (unless you want your while loop to run 1 less than the indicated number.
-I would reduce the timer value to less than 50 mS, like 40 or 20. There isn't really any reason to run it longer.
-We like using the express vi "Elapsed Time" instead of looking at the the i value. It is easier to program and I think it's more consistent.

But I think your issue is either in your references (check the Begin and make sure they match) and check if it works in Teleop. If it works in Teleop it is a Programming issue, if not then Electrical.

2829ron
23-02-2011, 10:34
Thanks everyone. Got it to do something with arms and drive motors yesterday (a little more on the drive motors then I wanted :o ). So I guess I'll code it now and test it at regionals.

Thanx again,

David