Log in

View Full Version : Using Sensors in Autonomous Independent


Felipe Sagui
27-01-2009, 15:02
I have a doubt about how use sensors in autonomous mode.

I create my own VI with the Gyro PID logic, when I put it on Basic Robot Main inside the "TeleOp Execute" case it works, but when I put this on Autonomous Independent VI it doesn't works.

Can anyone show me a solution or ideia to solve this problem?

Felipe Sagui
27-01-2009, 16:53
Sorry :D , the other programmer from my team forgot the while loop on the autonomous independent, so it was only running 1 time. :eek:

This problem is solved.

Thanks and sorry.

billbo911
27-01-2009, 17:25
I have a doubt about how use sensors in autonomous mode.

I create my own VI with the Gyro PID logic, when I put it on Basic Robot Main inside the "TeleOp Execute" case it works, but when I put this on Autonomous Independent VI it doesn't works.

Can anyone show me a solution or ideia to solve this problem?

Sorry :D , the other programmer from my team forgot the while loop on the autonomous independent, so it was only running 1 time. :eek:

This problem is solved.

Thanks and sorry.


I sounds to me from what I am reading here that you have the Gyro code running in two separate locations. There really is no need to do this. It is redundant, eats up more program space and may not work quite like you want it to.

If you run the gyro vi in it's own while loop, outside of the tele-op loops in Basic Robot Main, it will run regardless of whether you are in tele-op or autonomous. Then all you need to do is create Globals for the angle and/or rate outputs,to be accessed from within the "Autonomous Independent" vi, and you should be good to go.