From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD Practice Review - Car Wash

Hey, so I've done all 4 available CLD Prep Exams.  I was curious if I could get some feedback on the Car Wash.  This, imo, was the easiest of them all and so I was wondering what kind of marks I would end up getting with the attached as the end result.  Like, just how many "unnecessary bends" are present in my code?  What does it need?  The code is in 2011 SP1.  Thank you.

0 Kudos
Message 1 of 9
(5,969 Views)
Please click on Options and request the moderator to move this post from the LabVIEW board to the more appropriate Certification board - http://forums.ni.com/t5/Certification/bd-p/Certification.
Message 2 of 9
(5,954 Views)

Done, sorry about that chief.

0 Kudos
Message 3 of 9
(5,946 Views)

Well while we wait for the thread to be moved here are some comments:

 

  • Your main has uninitialized shift registers for no reason.  They should be initialized with constants.
  • All of your VIs are missing VI Icons
  • All of your VIs are missing VI Descriptions
  • Saved controls are also missing icon and description
  • Your front panel controls don't have tip strips, or descriptions
  • Wires are routed behind structures in a couple VIs
  • There are far too few comments.  All cases in the state machine needs comments explaining what the state is for.

I also don't remember all the requirements so there is likly funcitonal things I don't remember.  Like aren't controls supposed to be disabled when a car is going through the wash?

Message 4 of 9
(5,937 Views)

One thing I noticed when looking at your code.  This is a very minor point, and likely won't ever show up on the CLD, but it is a pet peeve of mine.  Feel free to ignore this comment, but...

 

You stop your processing loop on queue error. You don't stop it with a queue message.  This means that if your command loop stops while there are still items queued, they will NOT be processed.  It also means that if you get an error anywhere else in your processing loop, it will stop without ever notifying the command.

 

Why is this important you ask?  Because if you acquiring data, writing data to disk, etc. you can easily run in to a situation where you miss some data or don't close out your file / references correctly, etc.  It is, in my opinion, simply bad practice.  Also, full disclosure:  I don't have a CLD, I've just been programming in LV for many years.  I saw this on the LV forums and thought I'd respond.  Good luck on your test!

0 Kudos
Message 5 of 9
(5,899 Views)

So basically, it comes down to documentation, which I agree is horrendous and almost nonexistent.  Also, to  your comment about functionality.  The problem only specified that the Options needs to be disabled during operation, which it does.  Nothing mentioned about anything else, including the "Start" button even though it does specify that that needs to be enable at initialize.  Which I guess I should assume at some point it needs to be disabled.  Either way, the Start Button doesn't really affect anything during operation.  The Que resolves itself.

0 Kudos
Message 6 of 9
(5,898 Views)

I think your point is definitely noteable.  I actually wasted a lot of my time debating with myself on your exact issue.  The LV Producer/Consumer template that is available is made with the shut off on Que error.  However, the Data version that does not contain an Event Structure is not operated this way.  So if NI were to ding me for calling quits using Que error, my response would/should be this is how you have it set up on your template.  But I agree with you.  The more preferable way would be to have the event structure que stop and then have the release que dependent on a boolean value provided after the consumer loop ends.  T/F would be irrelevant. 

0 Kudos
Message 7 of 9
(5,895 Views)

@DailyDose wrote:

The more preferable way would be to have the event structure que stop and then have the release que dependent on a boolean value provided after the consumer loop ends.  T/F would be irrelevant. 


 

My solution is to merge errors, run an error handler on them (log to file, general error handler, whatever you prefer), and then release queue. No real need for an extra bool because it won't release the queue until both errors have arrived.

Message 8 of 9
(5,889 Views)

Nice code, thanks

Certified LabVIEW Developer
0 Kudos
Message 9 of 9
(5,751 Views)