02-09-2016 02:35 AM
Hello gurus of the forum!
I am an engineering student that has recently undertaken the responsibility of redesigning a microscope control system. I opted to use as a base the JKI State Machine. But I have run into a problem managing my data flow.
In the old version of the program I had lots of wires in the main going all over the place, getting modified through VIs and just solicited by others. (cf. Spaghetti State Machine) .
What I would like to do is regroup the data flow into one big fat pipe (wire). This would clean up my Main.vi nicely and make it easier to get specific variables (instead of looking for the correct single wire lurking in the main.vi). The problem is that it looks really difficult to modify specific variables due to the number of arrays in arrays in arrays. (cf Pipeline). For example, if I wanted to to update/modify the U32 Datatype located in Core>Configuration Output> Camera Config Output> Buffer, how would I do that without unbundling the whole thing then putting in back together?
Maybe I'm doing this all wrong and there are better ways to manage flow. Anyways I would like to know what you think!
Thanks for your time,
Sam
Solved! Go to Solution.
02-09-2016 03:27 AM - edited 02-09-2016 03:30 AM
Your image just shows a cluster in a cluster in a cluster. This is trivial, since the unbundle just lets you select via a menu with submenus. In your second image you would unbundle "Configuration Output.Buffer.datatype" in one step. So I must not be understanding your issue. Where are these "arrays"?
02-09-2016 04:02 AM
I think he's refering to the arrays in the first screen shot and has not yet added them to the refactored VI (second screenshot).
I am not sure having just one big fat wire with EVERYTHING into is the best solution, I think you should try to group data together only when it makes sense - of course less wires will make it look cleaner but maybe it makes more sense to have a few wires, maybe separate variables, parameters/settings.
And for your measurement data, well it's not that difficult to unbundle - dundle again when you want to work on then.
I saw you have IMAQ images, be carefull with these, they are pointers, not actual data 😉
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
02-09-2016 04:13 AM
Ok, I'm feeling a bit stupid, I just discovered you can use Bundle By Name to update a specifique part in a large data flow... (cf image)
@TiTou: Yes that is what I mean 🙂
And yes, regrouping everything in one wire is probably a bad thing. I am going to regroup them by category/use, but they are going to still be really big. And managing that was what was worrying me, but that's no longer a problem now 🙂