Jump to content

CLD exam prep... example exam


Recommended Posts

Hi All,

Not sure of the best place to post this, so if a mod thinks it should be elsewhere then, could they move it and let me know?

Anyways, I'm thinking of taking the CLD exam at some point in the not too distant future. I just sat down and did the car wash example exam. I've attached my final code (its in labview 8.6.1). Could anyone spare a few minutes to go over it and make any suggestions of improvement (or just general comments, anything really!)?

I know there's a couple of things I wasn't 100% happy with - for example using the "disable" property node to prevent the user selecting another purchase option midway through a cycle seemed like a bit of a cheat to me! I also wanted the position switches to reset automatically - i.e. if you set one true, the others should all set to false. But I didn't have time to do anything different on these...

Thanks in advance for your help and comments!

Paul

Download File:post-14639-1238872409.zip

Link to comment

Ok, so I know people have jobs and lives... and I know its probably not good etiquette to bump my own thread... but could any of the 23 people who've downloaded my exam solution (or anyone else who sees this and feels so inclined!) make any constructive comments? As I said in my post above I wasn't entirely happy with the end product, but I did stop at 4 hours to make it realistic. I did notice that the solution on the NI site used the same disable technique to prevent a user selecting two cycles at once...

I also spotted (in my code) that I forgot to deal properly with errors - I have an error handling case within my state machine, but in the case of an error, it simply reports it and stops the main state machine loop - leaving the GUI event handling loop hanging on...

Anyway, if anyone has any comments on style or approach, please let me know!

Thanks

Paul

Link to comment

QUOTE (Ic3Knight @ Apr 10 2009, 11:10 AM)

Ok, so I know people have jobs and lives... and I know its probably not good etiquette to bump my own thread... but could any of the 23 people who've downloaded my exam solution (or anyone else who sees this and feels so inclined!) make any constructive comments? As I said in my post above I wasn't entirely happy with the end product, but I did stop at 4 hours to make it realistic. I did notice that the solution on the NI site used the same disable technique to prevent a user selecting two cycles at once...

I also spotted (in my code) that I forgot to deal properly with errors - I have an error handling case within my state machine, but in the case of an error, it simply reports it and stops the main state machine loop - leaving the GUI event handling loop hanging on...

Anyway, if anyone has any comments on style or approach, please let me know!

Thanks

Paul

Paul,

I don't have an active license at this machine so I haven't been able to look at your code but I'll give you a couple of tips from my *unsuccessful* CLD attempt. Without going into the specifics, my exam was much more involved and greater in complexity than any of the sample exams. However, my "unsuccessfulness" was mostly due to the fact that I haven't been coding regularly over the last year. I did very well in style (14/15) and missed a couple of documentation points, but getting everything implemented was a BEAST. I have full confidence that if I had taken the exam la year ago (when I was coding full-time) I wouldn't have had much trouble getting most of the basic functionality implemented and had a better approach to architecting the solution.

What I took from it is that I should have focused on smaller pieces (hard to explain without violating the NDA!) rather than trying to implement the entire architecture at once (the example problems are definitely far easier to fully implement) because it was overwhelming. Others may have input on this but I don't think you need 100% functionality if your style and documentation is well done. I was only a few points away from passing and wasn't close to meeting all the requirements. When the time was up, my architecture was solid but I simply couldn't get everything implemented and I was rushed trying to get the "pieces" functioning.

I'm curious if those who have taken the CLD were broadsided by the complexity after doing the practice exams. It seems like LV has evolved quite a bit since those practice exams were posted and they [practice exams] may not be quite as representative of what NI wants to see in a CLD as they once were.

Link to comment

QUOTE (Mark Yedinak @ Apr 10 2009, 06:58 PM)

8.5 version attached.

http://lavag.org/old_files/post-14639-1239438154.zip'>Download File:post-14639-1239438154.zip

Thanks in advance for your comments.

In reply to BenD, I have been doing a lot of coding lately, which is why I'm thinking about taking the exam. I am a little worried about the timescale side of things though... I should have plenty of time to keep coding and practicing though as I've just broken my ankle, so will be housebound for a bit and will have a chance to try out the other 2 sample papers!

Anyways, thanks in advance

Paul

Link to comment

OK, here are a few of my thoughts regarding your application. First, overall you did a good job. There are a few areas though where I think you might get dinged. First, be very, very anal about your wires. Avoid any and all unnecessary bends. You have a few spots where you good straighten out your wires. For instance, the error case in your consumer loop where the Error state ENUM wire is not straight. I would also avoid leaving your block diagrams maximized when you save them. Size them to the appropriate size and leave them that way. I think you will want more documentation inside your code to explain what is happening, especially on constants. Your purchase selection is not very open to extension, you would be better of using a more generally selection so that it can grow easily. As it stands now you will have some major rework if you added additional wash types. I would also remove the unused timeout event case on your event structure. Avoid using property nodes to write values to controls. This one seems to be a big no-no in the exams. Avoid using "Use default if unwired" for your case structures. Make sure you customize all icons, including your main vi.

A few things that I don't think they would comment on or ding you for but I thought I would mention anyway. Use good names for your controls and cluster elements. Main_states doesn't really describe what that element is. I like names to be very clear about the element and IMO I believe Current State better reflects what the element is. I am also extremely anal about my diagrams and go as far as aligned objects between different cases in a case structure. I realize this is extremely picky but it does make the code appear more polished.

Anyway, those are my basic thoughts. Good luck on you exam when you take it.

Link to comment

Thanks for the feedback Mark,

I'll take a look back over my code with what you've said in mind.

I'm going to try to do the other to example exams over the next few weeks, to give myself some more timed practice. Perhaps I'll post them in this thread when they're done...

Anyways, thanks again for taking the time to help out, its much appreciated!

Cheers

Paul

Link to comment

QUOTE (Ic3Knight @ Apr 12 2009, 07:49 AM)

Thanks for the feedback Mark,

I'll take a look back over my code with what you've said in mind.

I'm going to try to do the other to example exams over the next few weeks, to give myself some more timed practice. Perhaps I'll post them in this thread when they're done...

Anyways, thanks again for taking the time to help out, its much appreciated!

Cheers

Paul

I thought I should definitely take a look at your sample code since when I posted my sample exam not long ago I got some very valuable help from members of this forum (and I subsequently managed to pass my CLD!). So here's what I see

1) As Mark Y said, the CLD guide says don't use property nodes to update controls - I have a million arguments why this makes no difference in the situation where you used it - the performance penalty is completely irrelevant when you just use them to initialize controls, but section 4.a.4 of the CLD guide says don't and the NI guys get to grade the exam, not me.

2) Once again, as Mark Y said, don't use default tunnel values (Section 4.c.7) - wire the values explicitly

3) In the program logic, nothing initializes the "Simulation_Switches_FGlob.vi" so if you stop the VI and then restart it w/o it leaving memory these values don't get updated and the FP control says the Car is Out of Position but the carwash runs anyway - but See # 1 above - if you had used a Value (Signaling) property node here to update the Simulation Switches, it would have forced execution of the Simulation Switches Value Changed event and updated the functional global to macth the FP control. I would consider this a valid use of a property node, but I don't know how the exam graders would see it. The safe way would be to call the "Simulation_Switches_FGlob.vi" in line at startup like you call the TIMER_FGlob.vi.

3) Error Control - In the Cycle Control.vi, for example, the VI runs the same on error in "True" or "False" (and updates the Functional Globals, since they run the same on error in true or false). I think it is considered better to wrap a VI like this in an overall error case and don't evaluate or update the VIs inside on error - that would conform to the LabVIEW style guide.

4) Lastly, when I opened the project, I had to re-link the VIs all manually - this shouldn't be necessary on a project like this except that it was looking in \user.lib in my LabVIEW source folder - if you saved the project to user.lib in your LabVIEW source folder, I would suggest not doing this. If not, then I don't know why I had the linking problem.

But, after all these criticisms, I thought the code was well written, documented well enough, and easy to follow. It uses a queued event driven UI handler to feed a queued state machine, so all of this is good. The timer function is logical and de-coupled (nothing ever blocks and the UI is always responsive).

Lastly, I'll comment on What BenD said - I did find the exam I took to be rather lengthy. The logic wasn't really any more complicated than the CW example, but there was a lot of it! So, the take away is that you need to be able to do the state machine/queued state machine/event driven UI handler in your sleep so you can concentrate on the specifics of the implementation at hand. But if you did this CW example in the alloted 4 hours, I think you're in pretty good shape.

Good Luck,

Mark

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.