01-19-2024 04:07 AM
Hello,
I thought that if a Caller VI doesn't go out of scope there must be a way for the SubVI to retrieve a non changing RefNum to its Caller.
I want to use the same FGV Logger throughout many modules running in parallel, without changing the FGV's names.
So I store the different logs seperated by a Ref in a map. I can't use the name here for seperation.
Unfortunately the RefNum I am retrieving right now is changing throughout the calls.
Solved! Go to Solution.
01-19-2024 06:31 AM - edited 01-19-2024 06:52 AM
Hi Quiztus2,
Why can't you use the VI name from the call chain exactly ? It uniquely identifies the VI in memory, and is different for each clone for reentrant VIs:
PS: The fact that multiple refnums to the same VI clone are not considered the same is specific to maps because they use the numeric value of the refnum instead of checking if it actually represents the same object in memory (see this discussion). You don't have this issue if you use an array and the function "Search 1D Array".
Regards,
Raphaël.
01-19-2024 07:57 AM
Why can't you use the VI name from the call chain exactly ? It uniquely identifies the VI in memory, and is different for each clone for reentrant VIs:
PS: The fact that multiple refnums to the same VI clone are not considered the same is specific to maps because they use the numeric value of the refnum instead of checking if it actually represents the same object in memory (see this discussion). You don't have this issue if you use an array and the function "Search 1D Array".I
I didn't know/expect that. Very helpful, thanks.