LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update array one row at a time and clearing array

This is a 10-subvi program, so I will narrow down to the main issue.  The user enters data into many controls.  Then they click a "Clear"  button I made that clears all the controls and displays the data in an array (the array is called Summary).  The data is shown in one column.  Each time the user hits the Clear button, the data in the controls is cleared and put into the next column in the Summary array.  Then I have a "Clear Summary" button that clears the whole array of data.  Since I don't have unlimited screen space to keep making columns, I would like to limit the user to 12 columns of data, then they have to clear the Summary array to be able to enter more data. So here are my issues:

 

When the user hits the "Clear Summary" button, it does clear all the data.  But when they hit the "Clear" button after entering more data, the data appears one column past the column that had the previous data.  So if they entered data for columns 1 and 2, then hit Clear Summary, when they hit Clear, the data will appear in Column 3.  I want the data to appear in column 1 when the user hits "Clear Summary."

 

I have attached the two vi that are interacting and causing this issue.

 

Thanks for any and all help.

 

Download All
0 Kudos
Message 1 of 4
(2,348 Views)

Hi Dhouston,

 

"Since I don't have unlimited screen space"

It seems you have unlimited screen space: you really want us to look at pictures of your BD, that are 4000×6000 pixel wide? That's about 25 times the size of my laptop screen...

 

Please:

- Clean up the VIs.

- Use functions like "cluster to array" instead of huge UnbundleByName followed by BuildArray.

- Show small icons instead of "symbols" for all controls/indicators in the BD.

- Use more subVIs.

- I suspect most of those property nodes in your snippets are actually local variables. This calls for race conditions...

- Use one (!) shift register to hold your "array" data. That's all that is needed...

Best regards,
GerdW


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

My screen is 2560x1440, but I refuse to import that snippet. Since all your property nodes got mutiliated, you should attach the actual VIs instead.

 

Obvously, you have a race condition, with is syndemic with your overuse of value property nodes. You have way too much duplicate code. Use arrays and array operations instead.

0 Kudos
Message 3 of 4
(2,318 Views)

I would gladly give you some pointers, but as others have elluded to, your BD is convoluted and a mess.  This makes it very hard to diagnose your issue, which is why you have not gotten any specifics, because no one has this kind of time.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 4
(2,296 Views)