07-02-2018 09:05 AM
Hello everybody,
I will try to explain my problem.
I have X clusters in a cluster or a tab control or just in front panel (it could be adaptable for the most efficient way).
Each cluster had the same composition :
- 2 delta numeric control ("delta min"/ "delta max")
- others controls not useful for my problem (reference value, value min/max...)
I have an Excel file with all min/max delta for the X clusters.
I separate in 2 arrays my min max delta, but now I would like with a for loop fill in each delta numeric control for all clusters. I replaced the excel file by 2 random arrays.
So, in fact, at the beginning of my for loop, I have :
- 1 "delta minimum" array (with x values)
- 1 "delta maximum" array (with x values)
- 1 [cluster/tab control] of clusters (with x clusters)
The arrays and clusters are in the same order.
Could you help me to fill in the different clusters ?
You could delete the big cluster if the solution is easier without.
Thanks in advance,
Florian
Solved! Go to Solution.
07-02-2018 09:13 AM
Hi Florian,
two notes:
1. as your clusters all look the same you should use a typedefinition for them
2. I want to recommend a different scheme for storing/handling your data: create an array of clusters! Either keep the names/labels of your current clusters in a 2nd array (of strings) or add the label as string into your current cluster. Then you can easily autoindex each cluster to fill in the delta values…
Side note: the data structures for storing data in the program doesn't need to be the very same you use for displaying those data to the user!
07-02-2018 09:45 AM
Thank you GerdW for your first idea !
My cluster is defined by specification, but if the specification is modified, I will spend less time to modify !
For the second idea, I don't understand where do you want I create the array of clusters. Anywhere i put the cluster to array function, I have a no-validated way :
- directly after cluster
- after an unbundle for each cluster.
I think my "RAZ count" pushbutton is a problem for this function, but I have to RAZ each counter separatly.
That's why I thought with a reference or property node, I could fix my problem, but I don't find the way of use.
For the side note, I have to display and save all this datas, even if it is not very user friendly ! 🙂
Thanks for your help
07-02-2018 02:20 PM - edited 07-02-2018 02:21 PM
Hi Florian,
For the second idea, I don't understand where do you want I create the array of clusters.
See attachment: inside your "big outer cluster"…
For the side note, I have to display and save all this datas, even if it is not very user friendly !
My point is: you can handle the data more efficiently in the block diagram, but you display them as requested by your requirement sheet (or customer). UI display data structure doesn't need to be the very same as data structure used internally…
07-03-2018 04:26 AM
Hello GerdW,
Thanks for your help.
In the same time you send me your solution, I did the same approximately the same thing.
I update "appended array" with success. Now, I would like to not show "appended array" and update my independant clusters for a better view than in array.
Thank you again for your help,
Best regards,
Florian
07-03-2018 04:44 AM
Hi Florian,
Now, I would like to not show "appended array"
You don't need this indicator at all - once you get rid of those local variables by using wire!
and update my independant clusters for a better view than in array.
Use IndexArray to get the elements from your array.
(Right now you know the order of elements in the array as you made that BuildArray using a certain order.)
Note: in my example I changed the cluster to additionally contain a "label" string. Using that approach you could automate the conversion from "array" to "display of many clusters" once you use the same label for the display clusters as is stored within the array of clusters…
07-03-2018 11:04 AM
Hello GerdW,
You begin to know my Labview code and I need again your help.
My project is in good way, but I have again some troubles :
- I want for each cluster to color in red the min/max error counter if an error occurs. I already did that, but with the typedef, I don't find the good way for this coloration.
- If an error occurs, I have to log the error with all datas of the cluster. An error occurs when i want to write in my file. The file is well created with the option "open or create", but when i want to write ... error.
After this two problems, i think a very big part of the code will be ok.
Thanks for your help,
Florian