Thread: PID While Loop
View Single Post
  #4   Spotlight this post!  
Unread 02-02-2016, 16:43
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 116
aeastet is an unknown quantity at this point
Re: PID While Loop

Why do you have the PID in the other loop? From what I see you are using it to turn. If this is true once you get the PID to turn your robot it should go to close to zero on the output if you set it up correctly. If you put it in the same loop you could use an "In Range?" vi to make your robot quit turning if your PID has some residual output. If you put this in a second loop things get more difficult.

The other thing I see is that you are trying to feed values from one loop to the other with tunnels. That is not the way LabVIEW works. If you want to get a values into the bottom loop you will have to use a local variable or some pther method to do that. THe distance will not go to the bottom loop this way.

Last edited by aeastet : 02-02-2016 at 16:45.
Reply With Quote