Quote:
Originally Posted by rrossbach
Our team did some experimenting and found that at least in LabView, the last time Auto Disabled runs the DS input values are in fact zeroed out just like they are if you try to read them during Auto Enabled. I assume the C++ handling is similar but we have not checked that.
It's hard to handle this in the LabView Basic Framework, but is pretty straightforward in the Advanced Framework - attached is an example Disabled.vi for the advanced framework that shows this, hope it's useful! The AutonMode.vi also attached is just a simple "functional global" variable. Autonomous Independent just reads the cached value.
Ron
Team 2607 - software mentor
|
The values should never be zeroed if the DS is in Auto Disabled state even if it is the last run (how would the DS know that anyway?). I dont have LV installed on this computer and I haven't studied the advanced framework or your code (I stopped programing in LV before the advanced framework, but I do understand LV, especially dataflow programming). However what I think is happening there (based on what I am hearing) is the Auto Disable LV state runs once while the DS is in Auto Enable (reason for the zeroing) before transitioning to Auto Enable.
In either LV or C++ if you
call IsDisabled() or its LabView equivalent before testing your Auto Selection switches you should be fine.
My team has used two 6-position rotary switches to select our auto routines for the past few years. They give us 36 slots (usually enough even for our team) using only 2 analog ins as opposed to 5+ digital ins (usually need those for other controls).
[Back on topic] Dawgma (1712) camera tracked and scored 4 times (hitting all 7 balls 3 times) in auto. Even when they didn't score in auto they often scored immediately afterward[/Back on topic]