LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an array with controls and indicators?

I want to create a scrollable array of control/indicator pairs from a config file.  Something that looks like the attached image.  Of course, I can only create an array that's either either a control or indicator -- not both (the operator should not be able to edit the name or change the state of the LED).  So I guess I need to split the array and have two side-by-side and SOMEHOW link the scrollbars.  But then I have no idea how I can get the control switch states from the array.  Is there an easier way to do what I'm trying to do?

 

 

0 Kudos
Message 1 of 7
(4,402 Views)

Yes you can not have an array with both indicators and controls but there are a few tricks to do this. 

1.  Make it an array of controls, disable (set to disable to 1) for the "indicators"

2. Make it an array of controls and filter actions using the mousedown on the "indicators"

3.  Use multiple arrays, splitting indicators and controls, link the scrollbar using the scrollbar value change event and use property nodes to link all scroll action.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 7
(4,396 Views)

Ah -- I like option 1.  I'll give it a try.

Thanks!

Keith.

 

0 Kudos
Message 3 of 7
(4,392 Views)

Hello,

 

Another option would be to use the custom control I built for you, see below.  You can just drop this into an array, it should look like your example (more or less).

 

Cheers!

Message 4 of 7
(4,383 Views)

I have LV 8.5.1 an can't read your VI (LV 8.6).

 

0 Kudos
Message 5 of 7
(4,378 Views)
Sorry about that, see below for the 8.5 version.
Message 6 of 7
(4,374 Views)

Hello,

 

I am not able to find a way to have an array of multiple data types. I would suggest making an array of controls. Then, you can find that array on the block diagram and right-click and create a local variable (right-click the control » Create » Local Variable). Then, you can change that local variable such that it can be written to (right-click » change to read).

 

Hope this helps,

 

Dan Richards

Dan Richards
Certified LabVIEW Developer
Message 7 of 7
(4,298 Views)