LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference Conflict Help Needed

I two different vi's that are essentially programmed exactly the same. So for the data reduction, report generation, and database queries I created generic code and used a reference to the front panel cluster (manual entry forms) to pass to the other subvi's. The cluster do have different contents in them (both contain only string controls, numeric controls, enum controls, and date controls but have a different number of each). I have attached two images. The first has no wire conflict and the second does. I am not sure why there is an error but wondering if anyone can shine a light for me.

FoxTestSystems_0-1722918161507.png

 

FoxTestSystems_1-1722918210355.png

 

 

0 Kudos
Message 1 of 5
(426 Views)

Hi FTS,

 


@FoxTestSystems wrote:

The cluster do have different contents in them (both contain only string controls, numeric controls, enum controls, and date controls but have a different number of each). I have attached two images. The first has no wire conflict and the second does. I am not sure why there is an error but wondering if anyone can shine a light for me.


Do you need even more "light" than what I marked in the citation?

 

Just because the reference has the same label and look doesn't mean the referenced cluster is the same!

LabVIEW uses strictly typed wires and also references carry information about the referenced datatype. Your subVI probably expects a cluster of a certain datatype (aka data structure) so it probably doesn't make sense to wire a reference to a differently structured cluster. (You can disable that strictly typed behaviour but then you need to handle variants in your subVI…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(404 Views)

I don't need more "light." Thank you. I am slowly figuring things out. Although the above was given the same name, I know the contents are different and has no dependency on the name. The question was more in line with the idea that my access to the properties through the reference had identical options and therefore seemed to have been okay to pass either one. But as you said, perhaps there is an option somewhere that I can toggle since both clusters are not of a strict type.

 

 


@GerdW wrote:

Hi FTS,

Your subVI probably expects a cluster of a certain datatype (aka data structure) so it probably doesn't make sense to wire a reference to a differently structured cluster. (You can disable that strictly typed behaviour but then you need to handle variants in your subVI…)

 

0 Kudos
Message 3 of 5
(354 Views)

So this solved the problem... I needed to uncheck "include data type" and everything is smooth sailing now. Thanks for the help Gerd your comment led me to the solution.

FoxTestSystems_0-1723004518376.png

 

Message 4 of 5
(348 Views)

@FoxTestSystems wrote:

So this solved the problem... I needed to uncheck "include data type" and everything is smooth sailing now. Thanks for the help Gerd your comment led me to the solution.

FoxTestSystems_0-1723004518376.png

 


You might want to make sure that the everything came through as expected.  e.g., Maybe some controls of the same data type have data swapped because LabVIEW assigned them in cluster order because it "guessed" wrong.  This really comes into play if you update one or both of the controls.  Without a strictly typed reference, LabVIEW will have to guess how the data should be interpreted.

 

It would probably be worth it to replace the offending control with the strictly typedef'd one so you don't have to worry about this.  (I don't know how feasible it is in your project though - for instance, maybe this other control comes from a library that you cannot make changes to, and what you did is your only option.  But then, maybe the option is to replace your typedef with the one from the library.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 5
(333 Views)