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.

Similar Messages

  • 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?

  • 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

  • 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 Car Wash CLD Example

    Hello,
    I just completed the Car Wash CLD example using a modified producer/consumer with events pattern. I would like any feedback regarding the implementation.
    Thanks!
    Attachments:
    CarWash.zip ‏163 KB

    Hopefully this is still helpful. I would've reviewed last week but I just finished this example myself.
    I think you'd earn solid marks for coding style. Your code is clean, organized, and well-commented/documented.
    Unfortunately, I can't seem to get many of the functions to work as expected... the architecture is also pretty complicated. I noticed a few instances of elements being self-enqueued into the same state machine. This is a bit challenging to follow and (possibly?) debug.
    http://linkd.in/mikele

  • 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 .

  • Car wash CLD exam solution?

    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.
    Attachments:
    car_wash.zip ‏50 KB

    Here are a few more suggestions after reviewing your code.
    Clean up your wires. There are unnecessary bends all over the place as well as wires that run back on themselves (Out of position property node).
    Definitely get reid of all the property nodes. You really aren't using data flow with property nodes all over the place.
    As mentioned earlier, everything including the subVIs eed to be documented.
    Verify your functionality. This application doesn't meet the requirements. The out of position LED is not light properly for one. As mentioned your stop is not a graceful shutdown of the application.
    Use a project for your application.
    Consider placing your timing control in a subVI. You effectively have multiple copies of this functionality in your code.
    Don't use the Wait VI for timing control.
    As mentioned this really isn't a producer/consumer architecture. Take a look at the examples for how this normally looks.
    All constants should be labeled.
    Resize the front panel. Front panels should be size appropriately and shouldn't be a huge window with a few controls and indicators on it.
    Resize the block diagram to fit on a single screen and avoid the need to scroll to see everything.
    Make sure to align the controls and indicators are aligned on the front panel.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • 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

  • 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!

  • 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?

  • Cant figure out what error in my car wash tunnels

    I made a vi to practice the car wash CLD sample question. And labview says there is missing assignment in every one of my 10 tunnels. But I checked, there is an enum array going into every one of 10 the tunnels. Where did the error come from? 
    I cant figure it out!   My tunnels look exactly like the one in the CLD sample answer attached.
    Solved!
    Go to Solution.
    Attachments:
    Car Wash LV86.zip ‏73 KB
    sunflower car wash 100.zip ‏44 KB

    Hi,
    Just move that Enum tunnel upward which you are indicating in RED arrow. You can find a unwired tunnel.Just delete that. Since it has been overlapped you are not able to see.
    Thats it.All your error will vanish.

  • ATM CLD Exam Solution: Feedback Welcome

    Attached is my solution for the ATM Exam.  It took about 6 hours to complete, but I think I could get it down to 4 (I took a significant detour).
    I'd love to hear from fellow test takers or graders out there on the choice of architecture and readability.
    Thanks,
    Tom
    Attachments:
    CLD Sample Exam - ATM Machine - Tom.zip ‏295 KB

    Here are a few more suggestions after reviewing your code.
    Clean up your wires. There are unnecessary bends all over the place as well as wires that run back on themselves (Out of position property node).
    Definitely get reid of all the property nodes. You really aren't using data flow with property nodes all over the place.
    As mentioned earlier, everything including the subVIs eed to be documented.
    Verify your functionality. This application doesn't meet the requirements. The out of position LED is not light properly for one. As mentioned your stop is not a graceful shutdown of the application.
    Use a project for your application.
    Consider placing your timing control in a subVI. You effectively have multiple copies of this functionality in your code.
    Don't use the Wait VI for timing control.
    As mentioned this really isn't a producer/consumer architecture. Take a look at the examples for how this normally looks.
    All constants should be labeled.
    Resize the front panel. Front panels should be size appropriately and shouldn't be a huge window with a few controls and indicators on it.
    Resize the block diagram to fit on a single screen and avoid the need to scroll to see everything.
    Make sure to align the controls and indicators are aligned on the front panel.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Sample CLD (Car Wash) Solution for Review

    Hi,
    This is my first time posting. I am studying to take the CLD and I have attached my solution to the Car Wash sample exam (LV2011) using a PC-Events architecture. I ignored the time constraints for now to see where I stand as far as functionality and style. I tried to be thorough (not creative) with documentation as well. Any feedback would be greatly appreciated.
    Thanks!
    Steve T., Engineer
    NSTec
    Steve T., Engineer, CLAD
    Albuquerque, NM
    Attachments:
    Car Wash.zip ‏128 KB

    Steve Tomany wrote:
    Great, thanks for the feedback. Any chance you can show me how you use the queue naming and the sub vi in this way? I've played with it but my attempts do nothing to improve the BD.
    Thanks
    Sure,  Here is a copy of my PC loop (events) template with the consumer loop as a sub-vi (Type Defs disconnected)
    (NOTE: my template contains vi documentation template as well)  This won't save you on the CLD exam since the shipping templates are all you can use.  But having your own for "Real Life" sure speeds up programming time.
    Jeff
    Attachments:
    ProducerConsumerEventsSilver.vi ‏35 KB
    Consumer.vi ‏22 KB

  • CLD Solution - Car Wash System

    Hi all,
    I have one lLVOOP solution for the car wash example for the CLD.
    Would like to have comments on this from you all
    Also, you can rate me between score of 0-40
    Thanks!
    -Parag D
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"
    Attachments:
    Wash System.zip ‏130 KB

    Did you complete it in 4 hours?
    The code and project structure look very good in my opinion.
    After selecting Economy or Deluxe, you should provide an indicator as to what was selected. Such as "Deluxe Carwash In Progress" above the LED's. You should always give the user confirmation.
    Hide the toolbar while running. 
    Richard

  • Car Wash Solution discussed in the webcast

    The Car wash solution on the sample exam page does not match with the solution discussed in the webcast. A few people have requested the solution discussed in the webcast to be posted. Please see attached.
    Thanks
    Zaki Chasmawala | Certification Development Group Manager | Training & Certification | National Instruments | [email protected]
    Attachments:
    Car Wash Solution.zip ‏111 KB

    Don't look too closely at the solution.  It was meant purely to show architectures and general concepts.  Furthermore, it was not a PERFECT solution.  It was a PASSING solution.  That example was actually somebody's submission for a CLD and they passed.  If there was a functionality missing, that would not be surprising.  A few points marked off, but still passing.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Maybe you are looking for

  • Multiple ipods(iphones) on 1 itunes account

    I setup an iTunes account for my daughter and her iPod 3 years ago - in my name/credit card etc - I now have purchased an iPhone and am able to use the same account, but I cannot download, or even buy for that matter anything she has purchased (says

  • HT4137 How can I update my iPhone 3G to the new iOS or latest version...

    How to upgrade my iPhone 3G to a new version or the latest version..

  • Updating site in another program :-)

    Hey all, If I create a web page for a friend using iWeb, would it be easy enough for him to edit it with updates using a free web WSYWIG tool or would it lose all of the iWeb formatting? If yes, what free WSYWIG tools would you recommend for PC? I kn

  • DVD Compression

    Toast now has the great "fit to dvd" checkbox while burning from Video TS files. My question is, how much is too much? I notice when you rip some Video DVDs, they actually contain 6-7 gigs. Are these files generally being compressed into 4.36 gigs? I

  • Configuration ID for Create requisition , E Recruitment

    Hi, I am currently working on configuration id's in WDA application for erecruitment. I have created an custom application component copying the standar component.Changes to the component like making fileds invisible are done in the custom applicatio