01-22-2016 02:54 AM
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?
Solved! Go to Solution.
01-22-2016 03:19 AM
Where does the error occur? Within the FGV? You'll need to show us that code then.
01-22-2016 03:53 AM
the error occurs anytime I use the index arrayvi
01-22-2016 04:06 AM - edited 01-22-2016 04:11 AM
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.
01-22-2016 04:12 AM
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.
01-22-2016 04:16 AM
The current configuration shows insert into array when I add an element. I used the build array function previously and got the same result.
01-22-2016 04:31 AM
Could you share your FGV as a vi-file? In LV2014 or lower if possible.
01-22-2016 04:47 AM
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.
01-22-2016 12:52 PM
Call and forget is what I wanted, I think. the execution of the referenced vi is a preallocated clone reentrant.
01-24-2016 01:19 AM
so basically if I want to do a call and forget, I cannot retain the reference to the vi's called?