LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array cluster issue

Solved!
Go to solution

Using an array cluster for a control to program an instrument.   For adding additional elements I Click on cluster.  Right click and choose  data operations.  Then choose insert element before.
WHY WHEN REOPENING AFTER CLOSING THE ELEMENT IS GREYED OUT AND DISABLED.  

 

Please use the following vi for reference.

 

Thanks,

 

dg_dog

0 Kudos
Message 1 of 10
(3,964 Views)
Solution
Accepted by dg_dog

Hi dog,

 

WHY WHEN REOPENING AFTER CLOSING THE ELEMENT IS GREYED OUT AND DISABLED.  

No need to cry!

 

Question: why do you expect it to be NOT greyed out?

As long as you don't save the new data within the control (by making the value default) it will not remember your changes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,954 Views)

Yep, you either need to save your changes by setting them as the default.  Or if this is something that gets changed programatically then you might need to save the cluster data into a file then when the program re-opens you can load that data back into the control using a property node.

 

I haven't been able to find another way to programatically update my control default values.

0 Kudos
Message 3 of 10
(3,916 Views)

Fbaird,

 

There should be a method to make current values default.

 

http://zone.ni.com/reference/en-XX/help/371361L-01/lvprop/vi_make_current_vlus_dflt/

 

It is a little tricky to use but I think this example might make it a bit more clear.

 

http://www.ni.com/example/26173/en/

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 10
(3,909 Views)

Please correct me if I am wrong but that won't for the program while it is running.  It only works when the program is in edit mode and does not work on the run-time engine so not applicable if you want it to work in an exe.  For me that is where I need it.

 

Might be what the OP is looking for though.

0 Kudos
Message 5 of 10
(3,905 Views)

Correct, I would use a config file for an executable.  I thought you were speaking more generally.

Matt J | National Instruments | CLA
0 Kudos
Message 6 of 10
(3,897 Views)

@Fbaird wrote:

Please correct me if I am wrong but that won't for the program while it is running.  It only works when the program is in edit mode and does not work on the run-time engine so not applicable if you want it to work in an exe.  For me that is where I need it.

 

Might be what the OP is looking for though.


Be careful with your wording.  A VI is a program.  "Edit mode" should probably have a better name.  You won't be editing your VI when the invoke node does its magic.  You'll be at runtime.  You just can't use this in a runtime engine as it would require modifying the exe.  You can't use it while the executable is running.  You can certainly use it when a program is running, given the correct environment.

 

If you're looking to modify those values in an executable, there are plenty of examples to help create either a basic ini file or a simple csv that will allow you to read in whatever data you'd please and fill the values.  You can easily save data between different runs of the executable this way as others have mentioned.

0 Kudos
Message 7 of 10
(3,867 Views)

Thanks for making me realize I am human........

0 Kudos
Message 8 of 10
(3,832 Views)

Gerd answered the original question exactly and right away, so I am not sure about the purpose of the subsequent circuituous side discussion that only seems to confuse the original issue. 😄

 

 

0 Kudos
Message 9 of 10
(3,820 Views)
Gerd answered it correctly if the changes only take place while editing the VI. If the changes take place in any other way, a different solution was needed. Someone asked how to solve it in one of those other cases. It's not hard to see their purpose 😛
Message 10 of 10
(3,803 Views)