LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String refnum

Solved!
Go to solution

Hello

 

I have  Main VI that contain a cluster of 13 elements (string)
I want to connect this cluster as an input to a subVI. See Attachment

 

But then there is this string --> String Refnum error. Can anyone please help

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
Download All
0 Kudos
Message 1 of 10
(5,756 Views)

In the subvi you have a cluster containing 13 references to strings,

and it's a different thing compared to the control you wire to it in the main vi.

 

I think you want instead to pass the reference to the whole cluster you have placed in the main vi.

Message 2 of 10
(5,748 Views)

Hello NightCrawler,

 

As Marco said, references and values are different, and you can not connect them to each other.

If you just want to read/write values of the elements of your cluster in a subVI, you may need to pass the reference of your cluster, and play with the property nodes related to it.

 

See the example attached ! 😉

Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Download All
Message 3 of 10
(5,743 Views)

cross post in German LV forum...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(5,738 Views)

Hello Eric

 

 

I cant open the attachment. I am having Lbaview 2011... Could you please repost it in 2011 format``??

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 10
(5,734 Views)

MarcoMauri...

 

But one question.... is it possible to make a cluster of references? I have strings in another part of the same VI. Nw when I have a lot of references together, Can i make a cluster of it to make the VI look small.???

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 10
(5,728 Views)

Hi mathew,

 

yes, it's possible to bundle a cluster of references. Infact it has been done in your subVI!

Use a Bundle(ByName) node to create your cluster...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(5,725 Views)
Solution
Accepted by topic author Nghtcrwlr

Hi!

If all you need is to update a lot of indicators you may consider using the reference to the cluster (and avoid using tons of references for single controls).

 

ref_ex.png

 

 

hope this helps,

Marco

Message 8 of 10
(5,711 Views)

Thank you guys!!

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 10
(5,664 Views)

And unless the cluster contains tons of long strings and arrays and you branch the wire to 500 different places in your program, it would be even better to simply pass the entire cluster through the subVI instead and wire its output value back to the terminal or a local.

 

Value Property updates happen synchronously in the UI thread and are VERY slow. They never can win in performance from a more dataflow oriented wire diagram even if such a diagram may cause some data copies somewhere because of branched wires, but with a proper dataflow wiring you shouldn't get that problem either.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(5,638 Views)