Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a boolean global variable to a previous step status measurement in VBAI 3.0?

Once inserting the Set Global Variable Inspection step, then selecting a declared boolean variable and then choosing set to a measurement, the error occurs. After selecting the step status with its new value, the global variable will not change from its default value. The global variable remains in its default state without changing to the step status of the selected measurement.  The purpose is to have a global variable correspond to the pass/fail status of a previous inspection step and then call that global variable (pass/fail) in another state. 
Has anyone used the global variable to control a boolean measurement?
0 Kudos
Message 1 of 3
(3,367 Views)

Hello HuShane,

Are you actually getting an error (with an error code?) or does your global variable simply not get set?  I am assuming your are using the Set Global Variable step, and setting the variable to a measurement.  Doing this should always set your boolean variable to the pass/fail status of your measurement.  Could you post some screenshots of this error, along with version information of VBAI?

Regards,

Jasper S

0 Kudos
Message 2 of 3
(3,336 Views)

I don't get an error message. The global variable just defaults to the set to acquire Image - Step Status. A measurement that is allows true.  I cheated it. I created a second global variable and it worked. Since I needed two, I had to make 4 global variables. Two that always default to the acquire Image - Step Status and two that remain at the measurement I need. I found this works, I just will always have two global variables that I will never use.  My version is 3.0 Build 20060912141620. 

0 Kudos
Message 3 of 3
(3,334 Views)