12-14-2009 12:27 PM
I'm working on my FTC Auto code and I'm trying to make some SubVIs that watch the "Enabled" state of the robot.
Since these VIs have internal loops I expected that I could create a global variable for "Enabled" and use it in the SubVI.
But as soon as I put a Global Variable on my VI, I get the "Broken arrow".
When I expand the error description I'm just see my VI with an X next to it. No details.
I tried looking the Advanced NXT documentation, but there is no mention Global Variables at all.
I guess I can try building a VI that reads and writes the Enabled state... but what a hassle!!!!
Have I missed something?
Phil
12-15-2009 12:02 PM
Hi Phil,
Global Variables are currently not supported. This isn't documented in the Advanced Programming guide because the LabVIEW compiler can catch this problem and break the run arrow. I'm surprised you are not seeing an explanation in the error list. This is what my error list window looks like when I drop a global variable.
It looks like you'll have to use a VI to handle this state, also known as a functional global variable.
Cheers,
Mark
12-15-2009 12:16 PM
Hi Mark.
That error is because the global variable wasn't wired.
Try wiring it in and then checking the error.
If the VI is targeted to the computer, no error is shown, but when I target to the NXT I get the broken arrow with no specific error message.
12-16-2009 09:55 AM
Phil,
Thanks for the additional information. This is a bug and I will be filing a report on this.
Thank you for bringing this to our attention.
Cheers,
Mark