We have been trying to debug some gyro drive straight code, and have an issue that has been posted before, here about the bad data being coming from the gyro.
We have isolated the issue, think we understand the issue, but do not know how to fix the issue, if there is a fix.
Scenario, you are using labview, you load your code from the laptop, and are running the code from the laptop, so that you can debug.
You enable the bot, gyro is giving good data, you probe, data, see an issue in the code, disable the bot, stop the code from the labview laptop, using the stop sign icon, and fix the code.
At this point you click run again in robot main, and the gyro now is not giving correct data, growing, spinning, etc.
You stop the code, load up the gyro example, everything works, load up the robot code, everything works with the gyro, stop the code, gyro never works the second time.
Now that we have seen this scenario, we can reboot the crio each time and the gyro responds as expected.
We know that when you hit the stop button on the labview laptop, you are aborting code, and the cRio stops without going through the normal shutdown sequences, with the close.vi and closing all the refnum’s. We think that this is the main issue with the gyro code.
Question, are we doing something wrong with aborting the code this way, with the stop icon, and we should be stopping the code where it can finish and exit through the close.vi ? Is that even possible?
Have other teams seen this scenario? Can it be coded in a way where this can be avoided, or do we just need to power down between debug sessions, which is more time consuming.
Scott
TORC2137 Programming Mentor.