08-13-2012 03:57 PM
I am trying to write a 1-D array of values to thier corresponding 8 tank sliders.
So each element of the array will be displayed as the value of the slider.
How can I do this?
It works if you display it to a cluster of numeric values, but not the sliders.
I also tried writing the array to the "value" property of the each of the sliders, but still doesn't seem to work.
Any suggestions?
Solved! Go to Solution.
08-13-2012 04:12 PM
Post your VI so we can see how it is structured and what you are trying to do.
It sounds like you need to use Index Array on your 1-D array, expand it downwards to get multiple outputs and wire each output to one of your tank indicators.
If it is a cluster of tank indicators, use the Array to Cluster function (right click to set the number of elements), then wire that.
08-13-2012 04:22 PM
Here is my code,
so I basically want to write the values of the table (each row) to 8 sliders.
For now I just want row 1 to be displayed on the 8 sliders.
I tried using the array to clusters, but I can't seem to get it working...
Thanks!!
08-13-2012 04:53 PM - edited 08-13-2012 04:55 PM
001,
How did you create those sliders? They are actaully clusters of two elements, both of which appear to be identical sliders sitting on top of each other.
That is probably why you are having so much trouble wiring your data to them. I suggest that you create a new cluster with standard sliders. Then you can use the Array to Cluster primitive to move the data.
Two cautions: 1. The Array to Cluster defaults to 9 elements in the cluster regardless of the number of elements in the array. Pop up on the cluster output terminal to change the number of elements if needed.
2. You apparently added items to the cluster out of order. The cluster order is important if you want to get the data to the right places.
Also, it would be much easier for us to test your code if you included some data in 2D Array Input. Put the data in there then Edit >> Make Current Values Default. Then save.
Lynn
08-13-2012 10:01 PM - edited 08-13-2012 10:07 PM
i think you want to make a 1d array of sliders to match your graph...
and i think you want to represent your 2d array with your sliders as oppose to your cluster of 2 element cluster...
08-14-2012 11:11 AM - edited 08-14-2012 11:12 AM
Thanks! I have no idea how I ended up creating the sliders like that, I figured it shouldn't be this complicated!!
But it works perfectly now!