Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

custom VI Run - Return Values Shifted! Any Solution?

Hello,

i am running LabView 2010 and Vision Builder 2010.

I have some custom VIs, which do not have this problem, but one VI acts strange:

 

The return Values are shifted, one Value is missing.

Runvi.PNG

If you look at the indicators, you see "Raster_Statistiken", which has the Value that "Right_Beginn" should have.

"Right_Beginn" has the Value which "Right_End" should have and so on.

So the original return value of "Raster_Statistiken" is skipped (It is an Array of Clusters) and another value is filled in, which causes a shift for the next Indicators.

After "Top_Beginn" ist an Indicator "Top_End", which should have the Value "0", but it has no value at all.

 

Thank You,

Rene

0 Kudos
Message 1 of 7
(3,678 Views)

Hi,

 

I just saw your post, but it's allready five days ago you posted it.

So my first question, does this problem still persist?

 

 

Thanks,

Christian

Message 2 of 7
(3,669 Views)

Hi Christian,

well i just deleted the Array of Clusters, so the Values dont get shifted (i dont need them later in the calculations, so i dont need to recalculate).

But the problem isnt really solved, it is just a workaround.

 

Do you have any idea how to solve this? So i dont get stuck if i really need the Values (e.g. later use without recalculating).

 

Thank you!

0 Kudos
Message 3 of 7
(3,663 Views)

Hi,

 

I would assume that something went wrong with indexing (array starts with 0) with the custom steps code?

 

 

Christian

Message 4 of 7
(3,661 Views)

Hi Christian,

i did some testing and this seems to be a displaybug within VB 2010.

 

Displaybug

 

As you can see, the Measurementexplorer shows the correct result, while the custom-VI Indicator-Field is shifting the results.

I'm not sure, whether my much larger custom VI (with much more Indicators and Controls) had the same behaivour of a displaybug or had actually the return values shifted...

I will test that later.

 

I've attached a little Testproject.

Download All
0 Kudos
Message 5 of 7
(3,657 Views)

Hey,

 

This happens because arrays are not supported as Controls/Indicators for the Run LabVIEW vi step.

 

Out of the help:

 

Q: What types of controls and indicators can I use in my VI?

You can use any controls or indicators in the VI. However, to use the value of a variable or measurements from a previous Vision Builder AI step for the value of a control, the control data types must be numerics (Enum8, Enum16, Enum32, Enum64, I8, I16, I32, I64, U8, U16, U32, U64, DBL, SGL, or EXT), strings, boolean values, NI Coordinate Systems, or NI Image controls. Indicators must be numerics, strings or boolean values to be accessible in future steps.

 

 

Christian

Message 6 of 7
(3,653 Views)

Hello Christian,

i know, that arrays are not supported.

But the behaivour is still confusing.

It should not show the Arrayindicators or, if they are being shown, they should not affect the usable indicators.

 

Thank you

0 Kudos
Message 7 of 7
(3,637 Views)