Our team is trying to use the smart dashboard to process vision on the laptop and send motor values to the robot to aim at the target. We have the vision processing working. We lock on to targets and can set a motor value in the dashboard project vi.
We use the SD write dbl vi to send the value to the robot, and our trouble begins. When we run the code, we get an error in “handle dirty elements.vi” on the client/server selector, all the way to the left of the vi. The isclient boolean seems to be the cause.
If we pop open the panel for “handle dirty elements.vi” and set it to true, we can run and pass data to and from the robot from the smart dashboard.
Is there some initialization that we need to do to get this to work without intervention? What vi calls handle dirty elements?
Is there a smart dashboard white paper that might explain this?
I’ve seen something similar when there was a variable of one type already in the table, and I tried to write a variable of the same name but with a different type.
You might also want to try the Network Tables patch. https://decibel.ni.com/content/docs/DOC-29228
As you noticed, the original release of the LV network tables could create variables believing it was the server and then it suddenly becomes the client. This race condition would cause issues with a few of the variables. As mentioned, the patch was released to address this and a few other issues.
Greg McKaskle
I am another Mentor on the same team trying to resolve this mystery.
We will apply the patch suggested next time we work on the robot.
One thing that has puzzled us is the lack of information provided about why the program wouldn’t run. Rather than the usual “broken run arrow” and the errors dialog that normally guides you to the problem, in this case an unknown VI, Handle Dirty Elements.vi always popped open with a VI icon blinking in negative. None of us really knows what that means. No information was given that might steer us to where the problem was and since Handle Dirty Elements.vi is something provided in the libraries, we weren’t familiar with it’s function or even what other VI used it.
We also wondered what was going on in this same VI where it also showed the flashing negative box on a invert VI that is outlined in red. It is unterminated and appears to be doing nothing. The true case is empty.
I hope the patch fixes all this, but for our curiosity and future reference, I’d like to know these things.
What happened there was that I left a breakpoint in the code. The red outlined node is just the trigger code for when the Validate operation declares that the table is no longer good. This was left in during the beta program and I don’t recall it ever being reported. It should have been removed or replaced with a better error code or dialog box.
Once the VI is at a breakpoint, the editor blinks the next node that will execute, and that happens to be the ?: operation that was blinking.
Greg McKaskle
Thanks Greg, that makes sense now. It never occurred to us that there was a breakpoint running and we didn’t recognize it. But it fits with what happened when we continued to run the code and it began to work.
I notice the trigger code is in a disable structure in the patched version.
Thanks again for your help. We’re crossing our fingers for next week when we can get back to it.
- Al