LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference Comparison

Solved!
Go to solution

I have the references of two dynamic dispatch VIs, both clones of the same VI, with the setting shared clones reentrant execution. They are running in parallel, much like the way the actor framework launches actors. When I use the equals primative on the references it returns true, despite the references' hex values being different. If I type cast the references to I32 and then use the equals primative, I get false. 

 

My only thought is that this has something to do with the equals operator possibly being overloaded for references, and maybe because I'm using shared clones or something the references, although different values may point to the same location in memory and it actually compares that. For instance, I know you can have two different pointers pointing at the same memory location. I don't know if this is possible with references though. Just grasping at straws, with my extrememly limited low level, text based programming knowledge. Any thoughts, anyone?

 

edit: yes, I have disconnected all wires, then rewired to ensure that wasn't the issue.

0 Kudos
Message 1 of 4
(2,438 Views)
Solution
Accepted by topic author GregFreeman

Hi Greg,

can you provide a sample project to be tested?

 

Moreover: a hint can be found here:http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/comparison_funcs/

in the section "Comparing References".

 

Regards,

Marco

Message 2 of 4
(2,399 Views)

@MarcoMauri wrote:

Hi Greg,

can you provide a sample project to be tested?

 

Moreover: a hint can be found here:http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/comparison_funcs/

in the section "Comparing References".

 

Regards,

Marco


I will reproduce and put something up here a little later. After reading that, it probably is what I suspected. 

0 Kudos
Message 3 of 4
(2,388 Views)

You need to cast to U32 or compare the "VI Clone Name" property.  What you observed is covered in the help file but its a dig to get at.

 

See the third bullet in the 

Opening References to Reentrant Vi

heading in Open VI Reference Function


"Should be" isn't "Is" -Jay
Message 4 of 4
(2,349 Views)