LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an Array of Rings Programmatically

Solved!
Go to solution

Hello,

 

I've been using StringsAndValues[] node for creating a ring with defined values.

 

ring1.png

 

I wonder if it is possible to define an array of rings and put different strings-values for each ring element in this array... I've been struggling with this issue but couldn't find a way out. The problem is, property node takes the last value of the loop. 

 

ring2.png

 

Obviously my approach on property node is wrong. Any alternative thoughts-suggestions?

 

Cheers,

 

Palazzo

0 Kudos
Message 1 of 35
(5,197 Views)

Once you come to an array you cannot have different element and every element will be identical. Why are you using Ring control? Explain in detail so that an alternate solution might be offered.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 35
(5,185 Views)

Rings are for the UI. I am creating a table (actually it is a array of clusters) for users to see available DAQ system properties like voltage ranges, supported options etc...

 

asd.PNG

 

I am trying to use rings where can be different values for each channel. For channel 1, for example, "Couplings" might be AC or DC. I do not see any other way to see that different values in a single raw of an array...

 

BR, Palazzo

0 Kudos
Message 3 of 35
(5,175 Views)

Hi Palazzo,

 

basic rule in LabVIEW: in an array all elements share the same properties and their only difference is the value!

 

So you CANNOT have an array of rings with different strings/values per ring element…

 

Your second picture shows a misunderstanding:

You set the properties of your scalar ring and read its value using a local variable. Those values are autoindexed into an array of rings - with ring elements independent from your scalar ring…

To set properties of the array ring elements you need a property node of the array element anyway - but still all elements share the same properties, so the FOR loop is senseless then…

 

Edit, just saw your second post:

There are examples showing how to use a table (or multicolumn listbox) to show all settings and to open independent VIs in front of that table to allow user settings…

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 4 of 35
(5,174 Views)

Thank you. It takes me quite some more time. I am not big expert. :).  Thanks.

0 Kudos
Message 5 of 35
(5,158 Views)

Hi Gerd, thanks for the reply.

 

What I understand from your reply is that one cannot define an array including elements with different properties. Fair enough... Sadly this seems preventing me to program dropdown menus to create custom tables then. I've checked couple of topics regarding table usage, after your suggestion; but filling the table cells requires same "for loop" approach. If I have 20 different channels, than every single ring should be programmed seperately! Insane!

 

Cheers,

 

Palazzo

0 Kudos
Message 6 of 35
(5,142 Views)

I posted an example here http://forums.ni.com/t5/LabVIEW/array-of-cluster/m-p/1822451#M625032 showing how you can place a ring over a table, making it appear that the ring is part of the table. You use only one ring, and update the StringAndValues[] property each time the user selects a different cell in the table. This particular example doesn't update that property but it does update other Ring properties so I think it's obvious how you would change the strings as well.

 

Note that the keyboard navigation in that example might no longer work correctly in newer versions of LabVIEW; changes in event handling between LabVIEW 2012 and 2013 broke that portion of it. The rest of it works fine, though. I did once fix the keyboard navigation but never put it to use and don't remember where I saved it, but if I can dig it up I'll add it to that thread.

0 Kudos
Message 7 of 35
(5,106 Views)

Hello Nathand,

 

I have my own version of this approach also; positioning the ring to active cell's position and writing the input to the cell afterwards. Works fine but I couldn't deal with the bothersome UI issues here, clicking the ring twice to open down, some blinking cursors while opening ring etc... I think you've had the same issues but it seems only way to do this now... Thanks for the reply...

 

Palazzo

 

 

0 Kudos
Message 8 of 35
(5,069 Views)

Hello Palazzo.

I send you my pictures of LV, that works, but only one channel works. For obtainig of my problem. It is beginning of my solution.

This to me is not clear. If you can me help. This is just the beginning of the development process.

Thanks.

Jaror

Download All
0 Kudos
Message 9 of 35
(5,062 Views)

Hi Jaror,

 

why do you hitchhike this thread?

Please stick with your own thread!

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 10 of 35
(4,999 Views)