Please Review my CLD Sample Exam

I am going to take the CLD in a month or so, so I figured I would work on some of the exams and post it up here for your advice.
I started with the Car Wash exam, and will do the other ones as well.
Thank you.
Any and all comments are welcome.
Kenny
Attachments:
Car Wash.zip ‏68 KB

On first look (not that I'm able to give any opinions about any CLD review)
Using a enum instead of string as a queue data type would lessen the risk of making a typo error when your programming, and makes the programming a bit faster it would also "lessen" the traffic since enum is a lesser datatype than string, and combining it with a typedef would keep changes up to date
Im taking the CLAD tomorrow, and am hopefully ready for the CLD right after that Hope it wont be difficult. Good luck!

Similar Messages

  • Please review my CLD practice exam

    Hi all,
    I'm working my nerve up to take the CLD.  If anyone has the time, I'd appreciate some advice on style, test rules, etc. based on my solution to the Traffic Light sample exam.
    Seemed a lot easier than the car wash exam.  Is this an older exam? How do the real tests compare to the practice exams? Any advice is much appreciated.
    -Barrett
    -Barrett
    CLD
    Attachments:
    Stop Light Controller.zip ‏53 KB

    blawson wrote:  would a simple error dialog be all I'd need for error handling?
    -Barrett
    Message Edited by blawson on 11-16-2009 10:12 AM
    Generally speaking, I think that the error dialog should suffice. I don't think I'm violating the NDA in saying this...  (My sincere apologies to NI training & certification if I am - please delete my post if that's true)  On exams I usually do something a bit more complex, but it's probably overkill.  I usually run a separate loop in parallel and send my errors over there via a queue.  That way errors don't hang up the application.  Still, I use the stock error dialog (one of the two) in my error handler loop.  I don't think I've ever lost points for that, to my recollection.
    Also, regarding typedefs:  To avoid orphaned enums that should be typedefs, I wrote something backwards on my forehead with a marker. (OK, not really.)     "If it's a cluster or an enum, make it a typedef."  Following this rule, I always start out with a typedef to begin with and thereby avoid the problem.  My experience is that this almost always saves you trouble later on.
    Free advice, for what it's worth.
    Jim

  • Does NI post solutions to CLD sample exams?

    Does NI post solutions to CLD sample exams?
    Thanks in advance.

    There's solutions in the CLD sample exams zip file found here and there's a sample solution for the CLA exam.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Security CLD sample exam

    This is my answer to the CLD sample exam "security system" Does anyone have any suggestions or comments?
    Attachments:
    Alarm4.vi ‏35 KB
    File.vi ‏16 KB

    Islandman wrote:
    ... but I'm not sure what to do about the file reference. I use this to close the file at the end (that's why I circulate it). Since I log an event every time there is a change, I access the file many times, but I want to close the file at the end, only once.
    No, you're not understanding. You are using "write to spreadsheet file", which is a high-level function. You can open it like a plain subVI and see what's inside. You will notice that it opens the file, writes (or appends) the data, then closes the file, all inside the function. Thus there is no need to open or close the file externally. At all!  Ever! You have a useless and redundant mix of high-level and low-level file functions.
    Sure, if performance is an issues, that constant file opening and closing could be a bottleneck. So an alternative would be to use all low-level file function. You would open/create the file before the loop, keep the file open during the loop and write using plain low-level functions, then close the file after (outside) the main loop once the program finishes.
    ALSO: Your subVI needs a makeover anyway. Use intuitive control labels (not "numeric"!). Arrange the FP nicely. Add some documentation. You should also do something about the icon. It is surrounded by blank space, making the wires seem to hang off in thin air. It is also a bit disconcerting that you are not doing much error handling. The main program would never know if the file program encounters an error. Then you are abusing the file open error to determine if the file exists or not. There is a function for that! You don't need to get the date/time in the error case, so this function belong inside the other case.
    LabVIEW Champion . Do more with less code and in less time .

  • CLD Sample Exams: How to deal with references ?

    Hi@all:
    I reviewed  the sample exams solution for the CLD provided by NI and noticed, that they trifle with references. As shown in the Security System and the ATM Machine, references were opened, but not closed at the end.
    What do you think, will this cost Style points?
    The exams can be grabbed on the NI site searching for CLD.
    Solved!
    Go to Solution.

    I would ding them for a lot of points but it is not my test but NI's so play to their rules get the cert and then do it right.
    When you get to that part of the exam just add a note saying those refs do not need t  be closed because they are static and maybe you can get some bonus points for knowing the differnence.
    How to know the difference?
    See here.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • My Solution for CLD Sample Exam (Traffic Light)

    Hi there folks,
    I was just preparing for my CLD exam and was going through the sample exam provided on ni.com.
    I wanted to get any feedback for my solution. I looked at the solution and it seemed way to complex
    to achieve a simple task! Then again, I am still learning.
    ThanX in advance.
    Attachments:
    Traffic Light1.zip ‏81 KB
    Traffic Light2.zip ‏81 KB

    About queues vs shift registers.  Queues allow you the ability to insert elements into either end of the queue.  You can also write code to insert several elements at one time.  With shift registers, only one new element can be carried over to the next loop at one time.
    Lets say you have a state machine that always executes in the same order, no matter what the outcome, like State1 then State 2 then State 3.  A shift register works fine for this simple example.  However with queues, you can use a loop to insert the 3 states before the main state machine loop, then dequeue in the state machine.  This is really a matter of preference.
    Next example.  Lets say you had a situation where you want to run 3 states, but if the second one fails, you want to run 2 other states before going to the third one.  You could use a shift register, and you would have to look at each state to see which is next.  A queue would allow you to insert the 2 extra states in between states 2 and 3.  Of if you want to exit on some failure during a state.  You can use the queue to insert the exit state at the opposite end so that it is the next to be dequeued.
    Another situation is if you allow the user to call certain actions that require running several states.  When the user presses button A, you enqueue states 1,2,3.  If the user presses button C you enqueue states 7,8,9.  So now you have a state machine in which states are defined by some user action.  This would be more difficult to do with a shift register. 
    There are many other situations where a queued state machine is better than just a simple shift register.  For the simplest of situations, I might use a shift register only.  But I like to make it a habit to always use queues because of their versatility, and for the fact that I can go back and upgrade a simple state machine to a more complex one easily if it is done with queues.  Be sure to use shift registers on the queue error in and error out so that errors can be propogated from one state to the next.  On each state, check the error status.  If one occures, enqueue a state at the other end to jump to your error handling state (or exit).
    - tbob
    Inventor of the WORM Global

  • Car Wash CLD Sample Exam Solution

    Attached is my solution to the CLD Car Wash Sample Exam.  Comments will be appreciated.  The main VI is Main_6.15.10.
    Thanks in advance.
    Attachments:
    CarWash_6.15.10.7z ‏60 KB

    Here are my thoughts....
    Your solution is functional, so there are points for that right away.  Where I think there could be some more work is the architecture.  The exam requirements state that the design must be "easily scalable".  To me that means new states or cycles can be added without much messing about on the block diagram.  If you notice, there are only certain... lets call them Properties of each cycle type.  You could have an array of cycle properties such as cycle time, cycle position switches, cycle name, and flags for standard or deluxe.  Then you could reduce your cycle handling to a single state that just indexes through the cycle array and executed the next appropriately flagged cycle.
    I noticed a Select node in each of your cycle states with constant True and False wired to it.  That is a total of three elements plus two wires that should have just been a Not right off of the Boolean palette.
    You stop the program with a Stop button, yet you allow the user to close the window.  You should consider a Panel Close? event in your event structure to handle a use trying to close the window so that you can execute a graceful stop.
    There is no VI Description filled out for your main VI.  You should also have an icon for the main VI.  The suggested front panel shown in the exam has an icon.
    When your VI is running, you have the scrollbars, toolbar, and menu bar shown.  None of those serves any function for the application, so they should not be shown at runtime.
    The Stop button that is used to stop your application is reset with a Property Node.  Not that there is a performance issue here, but it is generally not good practice to do that unless you are forced to.  Consider just using a Mechanical Action of Latch When Released instead of Switch When Released.  That way you do not need to force the reset to the False state.  Of course, I would rather see something like a Stop state writing to the While Loop conditional terminal.  Also, you could have used a Local Variable to write the initial state of the Sim Switches instead of the Property Node.
    The graders like to see code comments describing your algorithms.  I would say that you need more of those.
    A 10 msec timeout on the event structure is a bit hyper.  Nothing in the system runs that fast, and the only thing you are waiting for is the user.  You could actually have a -1 wired there if you add an event case for the Stop button and Panel Close.  It will greatly reduce the CPU cycles (again not that there is a huge performance issue here).
    Come to think of it, the 20 msec wait for next multiple timer is a bit hyper too.  Your timing requirements are on the order of seconds.  You do not need to loop that fast.
    In general I prefer to have the Event Structure outside the State Machine.  Either that, or I use the Event Structure as the State Machine (in place of the Case Structure).  That way, if you need to respond to the user interface, you can do so without waiting to cycle back to the Idle state.
    This one was not listed in the requirements, but it would be very helpful to see the clock.  A cycle countdown timer or elapsed time indicator is so helpful to the user and the grader.  It confirms that things are working properly and the the application has not sieved up.  Users like to see something "alive" on the screen.
    To end on a positive... good job remembering to Disable the Purchase Selection buttons once the user clicks one.  I got ding'd for forgetting about that back when I took the CLD in 2003.

  • CLD Sample Exam Solution for Review - ATM

    Please see the attached ATM controller code. I would appriciate any feedback as I am sitting the CLD exam next week.
    Matthew
    Attachments:
    ATM.zip ‏374 KB

    Its probably been a few weeks since you took the CLD. How do you think you did?

  • Sample Exam Solutions for Review

    Good afternoon,
    I am taking the CLD exam tomorrow morning and wanted to submit my sample exam for review. I was able to finish it in just about 4 hours. 
    Here is my solution, please provide feedback.
    Thanks.
    Steven

    Manushak wrote:
    Hello all
    I have solution for "sprinkler controller".
    I would be glad if someone could take a look and give me a feedback.
    I want to write more comments, but my english is poor and there are many mistakes in my texts. Do you know, can i have any translater with me in time of exam. Or can i use online translators. It will help my very much.
    Overall a C- job  Some things you did well. Please excuse me for only pointing out the flaws as my time is limited.
    You have some bad habits that you need to break;
    Icons.  They need to convey information to the next maintainer of your code.  Is that a flame under a teakettle?  Like GUIs the color usage in icons should avoid garashness and help aid clairity.  Your file read vi icon uses a glyph I would associate with a error dialog.
    Use a project
    Tip Strips on every object the user can see on the GUI!
    Timing- you have failed to meet spec on preserving the elapsed time if rain occurs durring the servicing of a zone.  You need an elapsed timer with a pause feature.
    Wire bends.  Enough said?

  • CLD-R sample exam #2, question #11

     
    Answer A is the stated correct answer according to the sample exam answers section.
    Correct me if I am wrong but Merge Errors ONLY reports the FIRST error.  If multiple errors occur with those four error lines,
    ONLY one will be reported by error out, not ALL errors.
    Where I am going wrong with this one...is it because only one input to Merge Errors is used?
    (the error out line looks like a non-array input (thus how could all errors be reported without and array of error outs???)
    Thanks,
    Ryan
     

    1984 wrote:
    In the past 12 years I have developped and deployed unreliable codes like this in about 10 different countries.
    If this is unreliable then NI should start reviewing its own VIs as there are numerous VIs shipped with LabVIEW has solutions like this.
    Hey, lets assume this is a control system for (Why not?) a 250kWatt weather radar
    Stop the pulse modulator
    shut down the RF Source
    Remove power to the Klystron's magnet 
    Trust me, you want them to happen in that order.  with code shown as drawn above, there is a possibility to remove the magnetic field first.  That would dump a 60kV 12A pulse through the klystron with no field to focus the beam.  At which point a 70 pound klystron is going to impolitely install a new hole in the building's roof.
    Frankly, I despise that question as none of the distractors takes into account a failure in a predicated step of shutdown.

  • CLD Traffic Light Sample Exam.

    I am posting my solution for the CLD Traffic
    Light Sample Exam.  Comments and input is appreciated.  The main VI is
    Traffic Lite.vi.
    Thanks in advance.
    Attachments:
    TrafficLite_5.22.10.zip ‏47 KB

    Nice work, VI Joe.  I heve just a few comments.  The first two will get you more points from the judges, the third is personal style preference.
    Add descriptions and tip strips to your controls (and indicators).
    You go to either Idle or Display from almost every state; poll the controls before your main Case Structure executes and update the indicators afterwards instead.  You wouldn't need to use a State Queue any more if you did this.This would also get your Stop button to work as required.  As VENKATESH.J mentioned, it needs to respond immediately.
    This is a cleaner way to queue up multiple states:
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • CLD-R sample exam question #37

    Hi all,
    I've been looking over the most recent CLDR sample exams and I'd like clarification on the answer to one of the questions.  I figure that since the question is publically available, it's ok for me to refer to it here.
    The question is from sample exam #1.  The specific question is #37.  Code is shown in which "This VI's path" is stripped twice and a path to a subVI is built using "build path" and a subVI name (i.e. therefore using a relative path to refer to the subVI).  The resulting path is then used to open a reference to a subVI.  The subVI is run dynamically using a Call by Reference Node.  The reference is then closed.
    The question states:  "Which of the following steps must be taken if you decide to build the block diagram shown into an executable?"
    The possible answers are:
    a. The file path needs to be stripped one more time because the build process will add another layer to the file structure, causing problems
    b. The VI that is being called dynamically needs to be manually added to the build specification
    c. The application window will not close when the executable has been stopped.
    d. One or more functions will not work outside of the development environment.
    The correct answer is given as "b".
    I think "a" is an equally valid answer.  The build process DOES add another layer to the file structure, thus goofing up all the relative paths, and that needs to be accounted for when building executables.
    Why on earth would you offer two correct answers to a question and only accept one as the "right" answer?   That makes no sense to me.

    a. The file path needs to be stripped one more time because the build process will add another layer to the file structure, causing problems
    \ The source file settings Set destination  can be configured " the same heirarchy so this is not absolutly needed  (And Diane, the paths are stripped from the other end so a folder in front is no problem)
    C & D are not actions this is the worst sort of distractor.  Random statements that don't fall into the rule of the question.
    E.G.
    What questions will you find posted to the NI Forums
    A.I have a problem with communicating to a device on a serial COM port.
    B.Why on earth would you offer two correct answers to a question and only accept one as the "right" answer?
    C.You should use an Express vi for that!
    D.Here is a link to a KB article.
    B is the only correct answer but many examinees will choose the bad distrators.
    Jeff

  • Please review my solution!

    Hello All,
    I am planning to attend the CLD exam next week. I am practicing some of sample questions. I solved the ATM question.
    Kindly please review and let me know the feedback. Attaching the code in both 2014 and 2010 version along with question.
    Thank You!
    Regards,
    Rajesh Nair
    Attachments:
    ATM 2010.zip ‏173 KB
    Automatic Teller Machine 2014.zip ‏250 KB
    100928C-01.zip ‏293 KB

    Overall I've seen worse but, you do have a major problem as I se it from looking at your code.
    You FORGOT the USER.  Seriously, the user is key.  Tip Strips and Discriptions on EVERY user control or indicator is a must.  Postition the FP so user controls are visable is a must.
    I'm not "in love" with your queue handler but could se it on a larger project with a generic queue data type and a priority boolean.  overkill for a CLD exam you only get 4 hours and yo need to document those controls and indicators.
    Type defs-  All have default icons (Break that habit now or you'll find something like this someday and be sorry)
    There are a few developers I'd be tempted to shoot.  It is a point on code reviews around here now.
    Wired terminals not on root block diagram will get you dinged.  do a search i've said it before.
    Jeff

  • Timing CLD practice exams

    Hi,
    I wanted to bring up this topic for those who are preparing for taking the CLD. 
    As you know there is a four hour limit for taking the exam.  While preparing for the exam, using all the materials, webcast, and the certification discussion board, it is important ... , no critical, to clear your schedule and time yourself for a four hour exam.  Twice.
    Many developers get caught in the time crunch, both in their daily activities and in the test.  Putting yourself in the position of having to face a hard deadline for completing the exam is a great wake up call.  You don't want that call to be during the actual exam. 
    Timing your practice exams is a great way to experience the psychological pressures you will face during the four hours. 
    There is a wide spectrum of programmers that take the CLD, experienced pros, those who use it once or twice a week at work, advanced beginners, and all other experience levels.  Preparing with a strict time limit gives all the broad spectrum of candidates the opportunity to see where their personal methods support or hinder the effort to complete in four hours.
    In general, take no more than thirty minutes to read the specification, understand the specification, and plan your design. 
    Again, generally speaking, the last thirty minutes should not be used as a "last ditch" effort to start a new piece of functionality or race to a last minute addition.  If a bug is introduced in this last half hour, the damage done to overall functionality could be much worse than the potential gain.  One good use of the last thirty minutes is to continue testing integrated modules/SubVI's, to fix small discrepancies , to make one more verification that what you have already programmed is working correctly.  One of my clients used to tell me "test, test, Test !" 
    Of course, it is impossible to give directions that will meet all individual methods.  This is why taking a practice exam under strict time limits is a HUGE suggested best practice.  You get to see first hand how your strategies and test taking methods fit the four hour time limit.   You can plan and prepare your solution and methods, but until you time it firsthand, you are only measuring your knowledge of the methods.  In most cases, nothing teaches faster than timing your sample exam and learning from your own mistakes.
    If you are struggling with both implementation and timing, complete one practice exam without time, then take it again , timed, with just three and a half hours limit as you already know the specification.
    One time saver is to document and label as you program.  While you are in a section of code, document what that case, SubVI, or algorithm is doing.  Right at the point of conception it is easy to jot down a one line description.   Waiting until the end and then documenting all the work you have done is not as efficient as documenting "in the moment".  You might be testing in the last thirty minutes and run out of time to document the complete application.  Also, when you are working with already documented code, you are giving yourself a road map as you integrate modules or add functionality to the application.  Try this while you are taking the practice exam.
    I hope you find this advice helpful and something to think about, but more importantly I hope I have convinced you to take some practice exams with strict time limits.  Although I have touched on a few topics, the focus here is to promote the timing your CLD practice exams in preparing for the CLD.
    Mark Ramsdale
    Project Manager and CLD
    Customer Certification and Training at National Instruments

    Jeff·Þ·Bohrer wrote:
    RDarn the mobile interface.
    Tim, I hear you. What do you consider to be a "normal project"?
    PS My CLD-R is at 8:00am tomorrow.
    "Normal" = project for actual work
    Good luck starting in about 13 minutes!
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • CLAD Sample Exam 1, question 2:

    CLAD Sample Exam 1, question 2: can a wire be used to pass date between 2 llps that are intended to be runn in parallel?  CLAD Sample exam1  provides the following url as an answer:  http://zone.ni.com/devzone/cda/tut/p/id/9393 . This doesn’t explain the answer. Please provide a correct explanation.
    Solved!
    Go to Solution.

    B Spears wrote:
    NIquist wrote:
    Is that the actual wording?  Why can't they make these questions less
    ambiguous?   Just because you intend for the loops to run in parallel doesn't mean they actually do it.  BUT, the data will still be passed between the loops eventually, so technically, YES, a wire can be used.  Why didn't the question just say: "two loops that ARE running in parallel"?
    The wording actually seems to be pretty decent. Two loops cannot be running in parallel if there is a wire running between them. The situation you describe--where one loop stops, data is passed, then the other loop begins--does NOT describe two loops running in parallel, rather two loops running sequentially.
    When the question says "intends", it asks you to play the part of the designer of the code: if you want to have data passed between two loops, how would you design that? The answer is certainly not a wire.
    True, but the fact that we're even discussing the semantics proves that it's confusing.  I'm sure NI has a tough time coming up with multiple CLAD versions covering essentially the same questions but those questions should be testing for knowledge of LabVIEW, not English Language.  A test taker should be able to focus on the what a question is asking and not how it's being asked.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

Maybe you are looking for