LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Holding on to an indicator.

I type in some data (a string in this case) and perform some manipulations on the data. I decide I like the answer and decide to keep the data I typed in and store it in a global. Now I type in some more data. However, I loose the data in the global. How do I hold on to the data?

Thanks
0 Kudos
Message 1 of 4
(2,724 Views)
Hi exo,

either use an array where you append the new data or (when using strings) add the string to the global (read global, add new string by using "concatenate string", write to global).

Instead of a global (which is used as a "variable" known from text based languages) you can use a shift register in your main loop...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,715 Views)
A plain global just keeps whatever you last wire to it.
 
You could create a functional global (or action engine) that grows the string in a shift register for example. Of course, you would need a few more actions, such as clearing all data.
 
Message 3 of 4
(2,708 Views)
I think the array idea will work.
Thanks.
0 Kudos
Message 4 of 4
(2,707 Views)