LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Identifying events in clusters of controls

I literally have 4000 individual numeric controls that I have grouped into clusters for easy access. I convert the cluster outputs into arrays so that I can efficiently write the data to the underlying hardware.

I have tried two approaches so far, both of which aren't acceptable:

1) Assign a 'Change Value' event to each control.

This allows me to know when a control changes and react accordingly. However, I need to enter and maintain 4,000 event cases ... I now have 4,000 opportunities to make a "typo" kind of mistake.


2) Assign a 'Change Value' event to each cluster. Determine which control changed by comparing old and new values.

This is promising given that I can easily figure out which control changed and take action on a 'per a cluster' basis. However, this breaks down if the user writes the same value to a control .. then I don't know which control was touched! In most cases, this is not an issue, but there are some situations where the user may need to have the same value written through the control multiple times.

Ideally, a 'change value' event for a cluster would return an reference or index to which control changed.

Any sugguestions on how to approach this or am I stuck with approach #1?

Regards,
Ron


P.S. Is there an easy way force a cluster output (mix of numerics) to a particular numeric representation (i.e. U32)? This would help with putting all the control values into an array.
0 Kudos
Message 1 of 6
(2,537 Views)
It would be hard to believe that all your controls are of different type. If you convert them to an array anyway, why don't you just use an array control directly? 😉 Clusters are not that great to handle huge data sets.

I have made a quick example (LabVIEW 7.0) using a 4000 element array (40x10x10) control. I shows one way on how to get the 3D index of the changed element using an event structure.
0 Kudos
Message 2 of 6
(2,526 Views)
Actually, the same can be done with significantly less code...! 😉

(It may or may not be more efficient. See attached, LabVIEW 7.0).
0 Kudos
Message 3 of 6
(2,517 Views)
Yes, it's hard to believe that one could have 4k individual controls,
but each is individually named and has different ranges. Some of them
will be used more than others (necessitating slide bars and radio buttons).
There is some repeatition, but not enough to made a whole lot of difference.

I could place them all in one big array, but that would invalidate the
whole reason for the project, which is to provide easy and intuitive
access to these controls.

I'm just wondering if there's another approach to this problem that I have
missed.

Regards,

Ron
0 Kudos
Message 4 of 6
(2,504 Views)
I don't see how there could possibly be easy and intuitive access with 4000 controls.
Randall Pursley
0 Kudos
Message 5 of 6
(2,501 Views)
Basically, I break up the controls into different functional groups
using tabs and VI calls. I end up with five major categories that in
turn call approx 5 VIs each. These VIs break-up the controls into
managable chunks.

Ron
0 Kudos
Message 6 of 6
(2,488 Views)