07-22-2019 10:28 AM - edited 07-22-2019 10:47 AM
I am having trouble with my setup for connecting to and grabbing images from VBAI. The vi attached is the section of my main vi that does all the VBAI task. I originally had the “Connection” state outside of the while loop but at times I would lose connection to the VBAI engine and would need to reconnect to it, which is why I went with the state machine structure. This way if any error appeared during the process, I would close the connection and then reconnect.
The vi would lose the connection when the machine the vision system is setup for sits idle for a period of time due to maintenance. A period of time in my case can be 15 mins or it could be a few days. I am able to re-establish the connection through this setup but I would then get an error stating that the destination image was invalid (Error: -354713). This doesn’t make sense to me since the image created for the destination is the same input as before and no changes are made during the reconnection.
I am staying away from using an event structure to reconnect if it ever disconnects like how the examples show since I can’t be at the pc 24/7. If there is something not right with my vi or anywhere I can improve on, please let me know. Thanks
Solved! Go to Solution.
08-09-2019 03:07 PM
I know it has been a couple of weeks, so I'm not sure if you are still having this problem. But in your Clear Error case, you are disposing of all open IMAQ Image references and then never recreating them:
You can either remove this IMAQ Dispose VI from this case or create your images in the Connection case.
-Jordan
08-12-2019 07:25 AM
Just as you mentioned, I did realize that was my mistake a few days after I posted the question and removed IMAQ Dispose VI from the case. Everything worked after that. Thanks for replying or else I would have forgot about this post.