09-30-2009 02:03 PM
Hello,
Like a lot of people I'm trying to prepare for the CLD exam. I'd like feedback on my solution - particularly where the exam graders are likely to take points off. So first I'd like an overal "grade" for what I'm posting here (labview 9).
This took me about 6 hours to do - too long. Part of that was deciding on the overall structure, and getting hung up on how to implement the "universal all stop" button.
Are there too many wire bends? For me it can be a very time consuming process to re-arrange everything to reduce the number of bends.
The description/tips and icon things also sucked up too much time.
Some specific things that I'm not sure about are:
Is it ok to use property nodes for the "stop" button and "main power-wash" switches? This solution works, but is it undesireable for some reason? I had difficulty comming up with an alternative structure that allowed the stop button to activate in the middle of any part of the cycle. I had worked on using an event structure to do this, but got frustrated and went with the property node.
Does anyone have any sense if using a queue to sequence the cycle is considered any better than using a numerically sequenced case structure? If I only have 4 hours, using a queue structure seems to be a little more labor intensive... (propagating error, initializing and releasing queue...). I can see the advantage of using a queue (flexibility), but functionally a regular sequence would also work. To phrase this better: are points awarded for using more flexible programming structures?
The timing sequences are rather primitive polling loops. Does anyone think that I'd get docked for that lameness? Is there a better way to do that? I thought about using timing VI's and event structures, but the added complexity didn't seem worth it. Well, ok, that and I couldn't implement it because there's still some things I really don't get with more sophisticated event structures.
09-30-2009 02:16 PM
Unfortunately I don't have LV 2009 installed yet so I can't look at your code. However I can answer several of your questions.
NI does not recommend using property nodes for reading or writing from controls and indicators. There are a few instances where it is OK such as initializing a control in the beginning of an application. Otherwise it is best to avoid using them to access the value of the control or indicator. You don't necessarily get extra credit for using an event structure but they certainly don't discourage it. Plenty of people have passed the exams without using one.
Using sequence frames would not be advised. LabVIEW is a data flow language and the use of sequence frames is effectively turning it into a sequential language. Using them would not be a good idea.
Without seeing your exact use of polling I can't say whether yours is OK or not. If you can avoid polling it is good. Event driven solutions are always cleaner. However there are times when polling does work and it can be used effectively. This one really depends on how you used it. If you do use polling though make sure you allow your application time to process other events or actions in your system. A free running while loop with no delay can bring the CPU to its knees.
09-30-2009 02:26 PM
I just saved it for version 8.6, attached here.
Hmmm... sounds like I need to work on a solution that avoids all those propert nodes.
09-30-2009 04:18 PM
Just a couple of things i see rightoff.
I think that enough for now.
09-30-2009 07:22 PM
Here are a few more suggestions after reviewing your code.
10-01-2009 11:57 AM
OK.
Back to the drawing board.
10-01-2009 12:11 PM
10-01-2009 01:12 PM
Just for fun, take a look at this Car Wash done recently in OOP, which I thought looked nice. You aren't doing OOP, so don't take too long on this one, but note how it seems to be less code than yours (even though OOP requires more encapsulation VI's).
As far as your VI's: Prop Nodes and just too many structure types in general.
10-03-2009 05:52 PM
Hey...
Here's my second attempt. I tried to neaten things up and eliminate the abuse of property nodes.
I'll have to go back and try a more standard supplier/consumer architecture later on.
I greatly appreciate your comments and feedback.
Apparently the VI analyzer has to be purchased separately for labview 9?
10-20-2009 12:16 PM - edited 10-20-2009 12:18 PM
Hey BadVI,
Here are some things that I see;
The last point should be a priority for your next revision. Without it, it is going to be impossible to do a lot of the things that previous posters have suggested. Anyway, hope this helps.
Cheers, Matt