Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Exam Solutions for Review

Hi all,

I have my CLD exam soon and some feedback on my exam I did this morning would be really helpful.  It took me roughly 3 hours to code it up and then I spent some time tidying it up, documenting and running VI analyser.

My concerns:

  • There is no protection on the order of execution.  For example, the user could start the boiler even if some of the steps have not been carried out.  This is because the events can be generated and queued by the message handler.  If I was developing this application, I would disable buttons that I don’t want pressed to preserve the order this sequencer needs to run in.  I didn’t here because it is not in the specification.  What do you think?  Maybe a state machine design would have been better.  This problem would not have occurred.
  • I have not used value change event for the Knob and Slider because loads of events generated for every single value.  Instead I used the mouse up event to get the last value the slider or knob settled on.  This works great until the user moves the mouse away from the slider when the mouse is released.  When this happens no event is registered.  Is there a better way to do this?
  • VI analyser pointed some helpful things out but a lot of the problems were from the template Queued message handler template that I have used.

Run Instructions

  • Click Reset Boiler and set Run Interlock switch closed
  • Click Start Sequence
  • Once Sequence is complete, click pilot button
  • Increase flame sensor value to greater than 30%
  • Set forced draft switch on
  • Set fuel control valve  to greater than 10%
  • The boiler is now running, to shut it down click boiler shutdown

I’m starting to think that a state machine design would have been much easier but I purposely chose an event driven state machine because I need practise with them.

Some constructive criticism would be really good. Thanks

Lewis

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 71 of 623
(11,739 Views)

Hello Lewis_G,

 

Even tough I'm not a LabVIEW expert (see post below) I would like to post some feedback to your code.

 

Your "Initialize to Default" code is a bit strange. This is a link to the NI site how it should be according to NI. How Can I Programmatically Reset All the Controls on My Front Panel?

 

Personally I would insert a "To Variant" block before all the "Enqueue Messages" so there are no coercion dots. A 2nd thing I would suggest is to keep the output file open for the entire duration of your program and not open and close it every time. Attached is my version how you can do this with a "functional Global Variable".

 

Also you might have heard of the fact that NI will use the VI Analyzer to score your exam (partially at least). If you don't have it you can contact your sales representative to request a trial (so did I).

0 Kudos
Message 72 of 623
(11,621 Views)

Since I didn't want to mix posts here my request for some comments on my code.

 

Altough I didn't time the exam exactly it should be about 4 hours.

 

The biggest problem I have is that there are a lot of comments missing so that might be a area where I should improve.

A 2nd bug is that the reset Resets to the "initialize" state.

A 3rd problem is that the Setup test dousn't show if you go into Setup mode.

 

Hope you can help.

0 Kudos
Message 73 of 623
(11,617 Views)

Hi Tim,

 

Thanks for letting me know your thoughts.  You'll be happy to know I passed my CLD with 90%.

 

VI Analyzer is free and it ships with LabVIEW under Tools>>VI Analyzer.  It was definately helpful in my exam and pointed out some mistakes I made.

 

With file references,  I only tend to keep them open if I'm streaming to file or manipulating it regularly.  Maybe this is bad practice?

 

Kind Regards

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 74 of 623
(11,615 Views)

Hi, Everyone:

 

I'm kind of depressed.  While I am light years beyond when I started studying for the CLD three weeks ago, I'm still not able to complete it in four hours.  Not close.  In fact, I've given up on even completing it and trying for style and documentation points instead and snag maybe 5 functionality points to scrape by.  That means it needs to be 1/3 complete and I don't even think I'm there yet.  Using Peter's "The LabVIEW Style Book" as a guide, plus everything I ever learned here in the forums, this is all I can get out of the Sprinkler Controller.  I think I've gotten as far as I can without some guidance.

 

Please help!

 

Thanks.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 75 of 623
(11,594 Views)

I really hate how fickle this forum is with attachments!  😕

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 76 of 623
(11,590 Views)

Hi Bill,

 

I just took a look at your code and I can only say WOW in my opinion the code looks great. (just compare it to mine a few posts above).

 

The thing is (as you noticed) you have only 4 hours. I think the trick is to do even a step BACK from what you are doing (less style) and use a simpler design pattern. 

Fun to try: The Boiler sample exam. This thing is a <beep> if you try it using your current pattern (take 8 hours if you like Smiley Tongue). I didn't post it since I messed-up this sample.

 

My best guess why we keep on failing these exams (look at the solutions) is that they are more written to be implemented in a Microcontroller/PLC instead of LabVIEW (no offence) with a UI.

 

In my current project I also have to program Microcontrollers and on a very high level the code of those devices would look a lot like the LabVIEW code below.

2013-12-12 09_16_45-Untitled 1 Block Diagram on Untitled Project 1_My Computer _.png

The "Wait on Notification" aren't real notifies (since I only have 1 thread) but they interrupt the main loop, do their thing and return back to the main loop.

 

As you can imagine this will work better with some types of code.

 

P.S. Could you also provide some feedback on my sprinkler?

0 Kudos
Message 77 of 623
(11,580 Views)

@TimBotsM wrote:

Hi Bill,

 

I just took a look at your code and I can only say WOW in my opinion the code looks great. (just compare it to mine a few posts above).

 

The thing is (as you noticed) you have only 4 hours. I think the trick is to do even a step BACK from what you are doing (less style) and use a simpler design pattern. 

Fun to try: The Boiler sample exam. This thing is a <beep> if you try it using your current pattern (take 8 hours if you like Smiley Tongue). I didn't post it since I messed-up this sample.

 

My best guess why we keep on failing these exams (look at the solutions) is that they are more written to be implemented in a Microcontroller/PLC instead of LabVIEW (no offence) with a UI.

 

In my current project I also have to program Microcontrollers and on a very high level the code of those devices would look a lot like the LabVIEW code below.

2013-12-12 09_16_45-Untitled 1 Block Diagram on Untitled Project 1_My Computer _.png

The "Wait on Notification" aren't real notifies (since I only have 1 thread) but they interrupt the main loop, do their thing and return back to the main loop.

 

As you can imagine this will work better with some types of code.

 

P.S. Could you also provide some feedback on my sprinkler?


Hi, Tim:

 

The code is written in a pretty straightforward manner, using a familiar pattern. I don't see the overuse of property nodes and local variables.  I don't see anything wrong with the code, so I'll move on to the style and documentation.

 

I'm obviously no expert on this, but I would probably like to see more documentation in the form of free labels, because you don't have as many chances to docoment subVIs as I did.  I would also like to see long wires labeled.  I would like to see any structures other than "error/no error" case selectors have labels/sub-diagram labels describing briefly what is going on.  (In the real world, I would probably put a reference to the Software Requirements Document there.)  Although I am not a fan of labeling ALL constants on the BD, I see in the forums that is something they might get fussy about.  Also, I see that there is some BD cleanup that you can do.  In particular, I am referring to your placement of the "bundle by name" nodes.  The "enqueue element" node in your  "Running Determine Next" state would probably be better lined up with the error cluster wire - but that's just a preference of mine, because you have it lined up with the output of the "select" node instead.  Most of these are probably minor, although you might get seriously dinged on the lack of long wire lableing.

 

One other thing:

I see you made the "Zone Indicators" cluster into a typedef.  While this is a recommended design move, I don't know if it would violate the rule that you use only the controls supplied, since technically you are replacing one of their controls with your own.  I would rather avoid the question in the first place by not changing it.

 

If you have time left over, I'd probably resize the structures to be more space-conscious.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 78 of 623
(11,565 Views)

@billko wrote:

Hi, Everyone:

 

I'm kind of depressed.  While I am light years beyond when I started studying for the CLD three weeks ago, I'm still not able to complete it in four hours.  Not close.  In fact, I've given up on even completing it and trying for style and documentation points instead and snag maybe 5 functionality points to scrape by.  That means it needs to be 1/3 complete and I don't even think I'm there yet.  Using Peter's "The LabVIEW Style Book" as a guide, plus everything I ever learned here in the forums, this is all I can get out of the Sprinkler Controller.  I think I've gotten as far as I can without some guidance.

 

Please help!

 

Thanks.


Can you save a copy to LV 2010? That will allow more people to look at it. I am currenlty using 2012 but not everyone has upgraded yet.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 79 of 623
(11,543 Views)

OK Bill I took a look.

 

I'm VERY impressed.  But I'll pick on you just a bit to convince you to bang out the CLD and earn that polo.

Capture.PNG

Instead of typedefing a custom type def you could have avoided the coersion and subsequent questions about thought processes by just dropping a Re-init all invoke node in the chain of initilization code prior to the loops.

 

Now, any code you do for ME- use a real init routine!  for the exam - meet the requirements, drop the method on the BD and move on (5Min +)  That's right Keep it simple! you only need to prove you can implement a recognizable design pattern- you don't have to master it- Save that for your CLA exam where you don't need to actually code it. (You just have to tell your CLDs how to implement your very good idea there)

 

I like your use of a template.... next time give the file the correct extension.

 

Slim it down just a bit and you will knock it out in 4 hours


"Should be" isn't "Is" -Jay
0 Kudos
Message 80 of 623
(11,536 Views)