Vision processing works in RUN, not in START-UP

Everything in our code works properly when we “RUN” it from the MAIN.VI. Rectangular Target Tracking works and controls our turret rotation and shooter RPM.
But, when we “build” and “Run at Start-up”, the vision code doesn’t control anything. Our Robot correctly responds as it should when no targets are being identified.

Any clue as to why/how this could happen? I was not hovering over the coding team, so I can’t attest as to how they “imported” the tracking code from the example. My guess is that it is running the Real-time set.

We had the same problem.

In our code, we noticed that each time the project was restarted (like after a computer reboot) all the vision values that we had altered in the front panel of the vision.vi (vision size, particle count, intensity…etc) had changed back to their original setting. What we had to do was go and change all the controls in the vision.vi to constants in the block diagram editor so we could be sure that they wouldn’t change when the code was initially started.

Also, we noticed that our code only worked when we switched to the intensity tab on the vision.vi front panel (I think it starts out on the color tab by default). The weird thing about this is that in the block diagram it shows that the intensity tab is what’s set to default. We altered the tabs on the front panel so that the intensity tab was first and the color tab was second.

After that, everything was fine. Hope this helps.

That sounds possible. We did mess with setting the “Intensity, color” etc, tabs to a constant and may have caused it to default to the wrong thing. We won’t know for sure until week 3.

When you change the value of a front-panel control, you aren’t modifying the default that it will have the next time the program is loaded. To make the new values persistent, use the Edit > Make Current Values Default menu option. Or, if you just want to modify one control’s default instead of the entire front panel, right-click on that control and choose Data Operations > Make Current Value Default.

Wow, I wish I knew this a long time ago. This is excellent, thanks Alan!

OK, I just wanted to post this follow up in case any one else runs into this issue.

We found the root cause of the issue we were having, and it purely was an oversight on our part. We must have looked right at the cause a hundred times, no exaggeration.

Every time we opened up Main.vi to begin calibration, we enabled Vision, and moved on to our calibration of the vision processing code. We never even realized we needed to set “Enabled” as the default state. Thus, when we built and deployed the code as Start-up, vision was set to the default state of disabled. Therefor, vision processing was not taking place on the deployed code.
Once we set it to enabled and set that as the default, everything worked as expected!