Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

"NaN" - how to test in VBAI <-> LV?

Solved!
Go to solution

I am using VBAI to measure the length of a line.

I use LabVIEW as the custom interface.

In VBAI, I use "Update Inspection" to send the length data to LV.

 

How can I check, in the vi, that this number is "NaN? This will happen if the line is not found.

 

I tried using LV's "NaN/Path/RefNum" but it just does not work.

 

Help please..

0 Kudos
Message 1 of 4
(3,414 Views)
Solution
Accepted by topic author splee

I'm not sure how you're testing this. I just tried it and it works fine. Make sure the Update Inspection step has the flag to "Run the VI after updating indicators".

 

If it's still not working for you, let me know and I can send you a simple example (if you need an example, let me know what version of VBAI you use).

Thanks,

Brad

Message 2 of 4
(3,412 Views)

Oh yes I checked the "Run the VI after updating Indicators" and it worked!!

Thanks a lot.

Why is the default not checked? What is the purpose of "Not" running the VI after updating Indicators?

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

When you add a Update Custom UI step, it will check if the UI referenced has any code in the block diagram. If not, it will not check the box (and I think the box may not even be visible). If you later modify your UI to have code behind it, the step will still have the checkbox unselected. If the UI does have code when you add a new step, it will check the box by default.The reason not to run the VI is because if it doesn't have any code behind it, running the VI doesn't do anything except take up more time. We tried to make the decision about running the VI smart so it only does it when there's something to run...there may also be use cases where you have code behind the UI and use multiple Update inspection steps, but not all the steps need the code behind it to run...just update controls/indicators.

 

Hope this helps,

Brad

Message 4 of 4
(3,406 Views)