Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VBAI State Diagram Usage/Flow

Solved!
Go to solution

I am new to the use of VBAI so please excuse the newbie question.  In my state diagram, what is the effect and/or consequence of looping back onto previous states as opposed to going to the "End" point?  I basically inspect for bad parts and set variables per passed or failed parts.  If the number of failed parts in a row exceeds a certain number, then I wait for the user to toggle a switch.  In the state diagram, after reset switch is toggled, I loop back to the beginning of the state diagram.  Should I loop back to the beginning of the state diagram after a reset, or should it proceed to the "End" point in order to start the state diagram again?  Below is an example:

 state.JPG

 

 

0 Kudos
Message 1 of 4
(4,012 Views)
Hopefully the state image will attach to this one.  Sorry !!
0 Kudos
Message 2 of 4
(4,011 Views)
Solution
Accepted by MarkOberg

The state diagram you have is fine. Somethings to keep in mind about going to the end state:

- it will increment the built-in system variable iteration count..you may not want this to happen in your case anyway.

- after going to terminal state, the product select state will be run. If you're not doing product select, this is fine. If you are doing product select, you will not be able to switch products/inspections while waiting for a user to press the toggle button.

- after going to the terminal state, all results are cleared so users don't accidentally use a result from a previous iteration and think it's valid. If you don't go to the terminal state, all the results will be kept around and you may not know if a result you use is from a state that was run before going to your "Bad" state or after. This isn't a problem with your state diagram since you always go to the first state after the Bad one, but in more complicated state diagrams you could get to a situation where you want to use a previous result and you wouldn't know if that result came from the image before the failure or after depending on which paths you took before/after the bad part.

 

Hope this helps,

Brad

0 Kudos
Message 3 of 4
(4,001 Views)

Is that documented anywhere?

 

Thanks,

Mark

0 Kudos
Message 4 of 4
(3,996 Views)