Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up a reference table for measurement comparison?

Solved!
Go to solution

Hi There,

The setup section of my VBAI inspection code automatically indexes through a range on exposure times.  The image intensity, at each exposure time, is compared to intensity range settings at that exposure time.  (This is due to many part colors) When the image intensity matches both the setting AND that exposure time, it has recognized the best exposure time setting, and it stops and is then ready for the inspection testing.  The different paired settings of exposure time and intensity are part of the algorithm code.  When new colors are added, the code must be expanded.

I would like to know if a reference table can be set up so that the code searches the table for the correct matching pair.  Then we would only need to add rows to the table. 

Thanks,

0 Kudos
Message 1 of 3
(3,243 Views)
Solution
Accepted by topic author Rob518

I'm not sure I fully understand what you want to do, but it sounds like you might be able to take advantage of the new array feature in VBAI 2012. With this, you can create two numeric 1D variables...one that is an array of exposure values and another than is an array of expected intensity measurements. In the Setup part of your inspection, you could either use two Array Operator steps (to get the same index from each array), or you could use a calculator step to get the exposure time to acquire with and the expected intensity to compare against.

 

You can also use the Read/Write INI step on the last tab to update these two array variables with the exposure/intensity values from an INI file so it's easy to update the INI and get your variables automatically updated without changin the inspection as you need to add more combinations.

 

Hope this helps,

Brad

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

It sounds like you probably understand what I mean.  We have only VBAI 2011, but I will check out the .INI file possibility. 

 

Thanks for you help. 

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