ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting maximum visible array rows from front panel using property nodes.

I am trying to create a program that will display data on the front panel from an array. I have a property node set up to increase the number of rows to the array after every loop so it is more visually pleasing. After awhile, the number of rows extends beyond the visible window. I added an additional property node which includes a scroll bar assuming this would solve my problem, but the visible rows still increase down the panel. How do I set a maximum number of visible rows on the front panel?

 

Example: I want to start the program with only 1 row of the array visible. This display will grow when new data is collected into a new row of the array. I only want 20 rows of the array MAXIMUM visible at any given time and then after the array grows past 20 rows, I am able to scroll the display to show additional rows.

 

I am wanting to create an executable out of this VI so the display needs to stay in the visible window.

0 Kudos
Message 1 of 14
(6,555 Views)

It should be pretty easy to check the value you're about to write to the "Number of Rows" property is 20 or less, and if not write exactly 20.   Then, if it's 21 or over, wire True to the "Vertical scrollbar visible" property.

 

Optionally, you could also write to the "Index values" property the value of the index size minus 20, so that the most recent addition to the array is always shown at the bottom so the user doesn't have to scroll to it manually.

0 Kudos
Message 2 of 14
(6,542 Views)

I like these easy ones

 

No need for a scrollbar

Capture.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 14
(6,529 Views)

Since you need to leave room on the front panel for all 20 rows, the FP space is wasted anyway. So why not just fix it at 20 rows and focus on more important things? 😄

 

In any case, when resizing programmatically, just wire the array size and a "20" diagram constant to the inputs of min&max and wire the min output to the property node defining the number of rows.

0 Kudos
Message 4 of 14
(6,527 Views)

I am collecting data throughout the day and my customer would like to see all of the data for their test. I only have room to display 20 rows of the array at a time on the front panel. I just need to know if there is a way to fix the front panel array display to 20 rows while letting the array grow in the program.

 

I could have anywhere from 5 to 35 data entries throughout the test so I need the front panel to be dynamic enough to handle the different amounts of data so I can't just fix the array to have 20 rows.

0 Kudos
Message 5 of 14
(6,455 Views)

Hi EmHill,

 

I just need to know if there is a way to fix the front panel array display to 20 rows while letting the array grow in the program.

Yes, sure: Just set the array indicator to display 20 rows!

 

Two notes:

- Think of a separation of data handled "inside" of your VI and data displayed in an indicator. You (as "the programmer") decide, which data is shown in the UI!

- I would suggest to use a table or multicolumn listbox for display, they look much nicer than array indicators and offer much more possibilities!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(6,453 Views)

I tried your solution, but the array display on the front panel kept growing. I can have anywhere from 5 data points for the day or up to 35-40. I am taking one data point at a time so I have the array programmatically increasing in size to accommodate for the varying sizes of test data from day to day. I am continually checking after every data point taken if the size of the rows is 20. If it is, then make the vertical scroll bar visible. If it is less than 20, increase rows incrementally.

 

I want the array to continue to grow within the program, but visually, I want the front panel display to stop at 20 and then allow for the array display to be scroll-able in order to see all of the data taken throughout the day without it

0 Kudos
Message 7 of 14
(6,450 Views)

Hi EmHill,

 

I want the array to continue to grow within the program, but visually, I want the front panel display to stop at 20 and then allow for the array display to be scroll-able in order to see all of the data taken throughout the day without it

Yes.

And what's the problem in doing so?

 

Just use an array indicator, set to display 20 rows…

(You still can show/hide the scrollbar as needed.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 14
(6,445 Views)

Hey GerdW,

 

How do I go about changing the array indicator to display 20 rows?

I have gone into properties and changed the size to 20 from the front panel, but that causes problems with my initialization since I am initializing it to only contain 1 row.

 

I know this is probably something easy, but I am new to using property nodes and creating user-friendly front panels.

 

Thanks,

Emily

0 Kudos
Message 9 of 14
(6,440 Views)

GerdW,

 

 

Would something like this work? Or would it stop the array from growing and holding data past 22 rows?

 

 

Download All
0 Kudos
Message 10 of 14
(6,438 Views)