LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of asynchronous reentrant vi references

Solved!
Go to solution

I have a fgv in which I am trying to store references to reentrant VIs. I can see the reference being stored in the array, but when I use index array to get a certain reference, I get an error.Can anyone help with this?

0 Kudos
Message 1 of 19
(4,505 Views)

Where does the error occur? Within the FGV? You'll need to show us that code then.

0 Kudos
Message 2 of 19
(4,485 Views)

the error occurs anytime I use the index arrayvi

Download All
0 Kudos
Message 3 of 19
(4,470 Views)

Looks like your Find in Array returns -1 because the entry isn't found. You'll need to move the Index Array into the True case.

 

Edit: I've taken a look at your set case. Are you sure you are building your reference array correctly? I'm on mobile right now, but this doesn't look sound.

0 Kudos
Message 4 of 19
(4,447 Views)

its actually returns the correct index. that is the problem. the refnum in the array is correct, and the index is correct but I get a 0x0000000 in the output when I use the index array to get a particular index. 

0 Kudos
Message 5 of 19
(4,432 Views)

The current configuration shows insert into array when I add an element. I used the build array function previously and got the same result. 

0 Kudos
Message 6 of 19
(4,426 Views)

Could you share your FGV as a vi-file? In LV2014 or lower if possible.

0 Kudos
Message 7 of 19
(4,407 Views)

The option code of "Prepare for Reentrant Run" is 0x08 not 0x80. 0x80 is "Call and Forget" which probably invalidates the reference after the vi has been executed. Not sure why this would throw an error at Index Array (instead of returning an invalid reference) but see if this fixes it.

0 Kudos
Message 8 of 19
(4,390 Views)

Call and forget is what I wanted, I think. the execution of the referenced vi is a preallocated clone reentrant. 

0 Kudos
Message 9 of 19
(4,344 Views)

so basically if I want to do a call and forget, I cannot retain the reference to the vi's called?

0 Kudos
Message 10 of 19
(4,291 Views)