04-23-2019 10:22 AM - edited 04-23-2019 10:27 AM
Hello,
I'm trying to create an array of clusters where each cluster would have indicators and controls. When moving the cluster to an array I lose all the connections between the cluster indicators and the controls. The image shows a dummy example of the type of cluster I would like to put on an array.
Whats the "best" way to accomplish this?
Thanks
Solved! Go to Solution.
04-23-2019 10:30 AM
Hi Neuro,
When moving the cluster to an array I lose all the connections between the cluster indicators and the controls.
Whats the "best" way to accomplish this?
Just rewire the lost connections!
(I guess this is not the real answer but you didn't explain your problem with an example…)
create an array of clusters where each cluster would have indicators and controls.
A cluster is either a control or an indicator, but you cannot mix controls and indicators in one cluster!
(You can make all cluster elements as controls, but set some of them "disabled" to use them as an indicator…)
04-23-2019 11:10 AM
Not quite sure what you are trying to achieve. Since you're not sure how to code it, maybe you could tell, in words, what the goal of this exercise is. Concentrate on the "why" not the "how". You supply the "why" and we can probably supply the "how".
04-23-2019 01:04 PM
I'm not sure how you "rewire" it so that it works within an array. Yeah I was using them as control with one being disabled.
It might be easier to explain what I'm trying to do. I need to quickly setup an arbitrary number of "channels", with each channel having associated outputs (meters/values/etc) and inputs (values/buttons/etc). For that reason I thought an array would be a simple solution to accomplish something like this (which is an example problem used for illustration purpose):
On my first post there is block diagram showing how these are connected, how could replicate the same logic for each element of the array?
Or, is there a better approach to accomplish what I'm trying to do? I would expect that there is a way to create a set of dashboard with its logic that I could use anywhere I need, but just drag-and-dropping the cluster into the array didn't kept the block logic of the cluster.
I hope it was clearer now, if not, I could refer you to the real problem, but I feel that would bring up some unnecessary (for the discussion) details...
04-23-2019 01:13 PM
I think you just want a for loop, handling each element in the array one at a time in the same way you were handling just one cluster.
Also you maybe interested in an example I made here, which shows how to make and handle a grid which is really just an array of clusters. That example had a few extras like being able to set the background color of any element by using a color box as the background, and having multiple rows where each row is its own 1D array of a cluster. Still that example should show you how to detect control value changes by looking at what element in the array had a value change.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-23-2019 01:16 PM
I need to set up a variable amount of "channels" in the field. Each channel needs to display output values and allow to enter input values. Some input values modify some aspects of the output panels, for instance they could set the range of values of a gauge (say between -80 to - 20 dB) and the range where the value would be dangerous (say, amplitude > -40 dB), which I would do by using a color ramp or maybe an alarm LED. As all channels are identical and independent, I though an array would allow me to quickly and easily setup an arbitrary number of channels. In the 2 previous posts I showed a dummy example which is not exactly what I'm doing, but illustrates the exact problem I'm trying to solve.
Hope this is clearer, but if required I can get into further detail...
04-23-2019 01:43 PM
You're running into a common problem with array properties. Every element in the array must have the same properties with very few exceptions! such as, cluster.numeric knob.value may change for each element but, cluster.numeric knob.scale.visible cannot be set on each element.
An array of knobs just doesn't work! Spitballing. ... try a Chart. You could stack the plots and use horizontal cursors and plot color / background color for limits on the individual plot scales. Some interesting ideas are setting the history length to 1 and messing around with point size and axis rotation....... maybe that will fire some other synopses...
04-23-2019 02:47 PM
I didn't expect Labview to have such limitation, specially because I would think that what I'm trying to achieve is a very common. Is that what you suggest the usual way it is approached?
04-23-2019 02:58 PM
It is the array that has that nature not clusters.
If you can put an upper limit on the number of THNGIES, you need you can create a cluster with more than enough of the clusters you wanted to put in the array and hide the clusters you are not using.
Beyond that it does involve a bit of effort.
One approach is use a picture control and "invoke node get image" to make it look like you have a collection of similar but different elements but that will require logic to make sure each image show in the right place and then when you want to poke at one of those things, you can detect the mouse down, move an off-screen prototype of the thingie over the picture and let the user poke at the protype.
Then there is a possibility of a XControl that has multiple sub-panels and a scroll bar. With the appropriate logic you can make it look like you have an array with different data types in it.
Post an image of the dream screen you want to develop and someone maybe able to offer a quick solution.
Ben
04-23-2019 03:01 PM
@Neuromodulator wrote:
I didn't expect Labview to have such limitation, specially because I would think that what I'm trying to achieve is a very common.
An array is a collection of elements that can only differ in value, each is addressable by its index. All share the same properties.
This lean-ness makes arrays so efficient! Imagine you have an array of 100M DBL values. Would you really expect LabVIEW to carry font(color size, style), input range, format, background color, etc. etc. for each array elements. That would easily increase the size of the data structure by several orders of magnitude!
What you want, can easily be achieved, just not by using arrays. 😄