Several "solutions" of the CLD success package are somewhat flawed and should require a makeover. (See also this post).
Here is my quick preliminary attempt for a replacement to the exercise #16 solution. (LV2015). It can be saved for an earlier version if needed (original was 9.0).
Please go over it and suggest changes. Look for typos!
as a beginner, lot of advanced features are used, i.e. References.. Any precousions to use these references? Do we need to close them after use?
The main VI has a structure like a "producer loop" rather than a regular "state machine" you can find from the LV template. it seems that "consumer loop" is not necessary for this case.. we are beginners and we like to start from templates.
also for the documentation, could you add some for the SubVIs? It may help to understand..
I know many people studying for CLD are not very professional programmers so that more introductions (documentation, simple features) may help.
Thanks again for the hard work!
Thanks for the comments!
No, static references never need to be closed (details).
If you look at the original "solution", it uses many more references, many are not needed. It also constantly closes static references, which does absolutely nothing except clutter the diagram.It gives a bad example, thus the rewrite.
We do need property nodes for the required "enabled/disabled" functionality. We can do all that in the main VI using statically linked property nodes, but it is much cleaner to put them in a subVI, thus the need for references.
As I wrote on the comments, I would design the problem quite differently. If we use an array of more complicated clusters, no references are needed. For the rewrite, I am not allowed to change the problem or template.
What kind of documentation is missing in the subVIs? I can add more, but I am not sure what's not clear. I'll have another look tonight.