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: 

Sample Exam Solutions for Review


@CsabaF wrote:

Hello there,

 

I spent some time on the boiler and car wash examples. The boiler was a total failure, it was messy, I ran out of time, I kept on making mistake after mistake... So, I will do it again today after work. Lesson learnt - don´t try a CLD sample exam when you are not relaxed and ready for the challenge. 🙂

 

The car wash is finished and waiting for you valuable comments. This time I decided to use a simple state machine and tried to follow your advices from my previous ATM and sprinkler solutions, such as creating error state, adding more comments and using (hopefully) better style.

I am not fully satisified with it, I think the statemachine´s logic is not the best and most effective. I have some other ideas and I will try to do it again later this week (probably with some kind of producer-consumer solution).

 

So, please use some of your valuable time and take a look on it. Thank you! 


I'm still amazed that you can complete this thing.  It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory.  The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean.  Tada!  Simple error handling is provided.  🙂

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.
Message 131 of 623
(4,440 Views)

Well you have a pausable timer-  too bad you didn't use some logic to drive the enum input to it in the Run Step caseSmiley Wink it would only need a FBN to hold last "InPossition? state and the current in position state to select Get Time, Pause, or Resume. That would have simplified your code by several states

 

And whats with the extra buffer alocation here?:

Capture.PNG 

Wire elapsed time right to the SR!-  I know, someone way way back wrote their LV2 Global that way and the practice has a life of its own.  Not a killer on a scalar DBL but try that with a large data set and you'll have the devil's own time finding where you made that mistake.  

 

Some food for thought:  How Could you let the user know that an error shutdown is occuring?  Users get upset with crashing software but really upset when it poofs out of existance without so much as a dialog to say it died.

 

Overall nice code.  Simple and effective.  About the only style hit I would mention is thase too small enum arrays.  the code is a lot mor readable with the enum text visable.


"Should be" isn't "Is" -Jay
Message 132 of 623
(4,434 Views)

@JÞB wrote:

Well you have a pausable timer-  too bad you didn't use some logic to drive the enum input to it in the Run Step caseSmiley Wink it would only need a FBN to hold last "InPossition? state and the current in position state to select Get Time, Pause, or Resume. That would have simplified your code by several states



Yep, I had the feeling that I overlooked something and made the whole thing too complicated. 🙂 Thanks for the comments, I will open my solution tomorrow again - it´s getting late here.

Best regards,

CsabaF
0 Kudos
Message 133 of 623
(4,431 Views)

@billko wrote:

I'm still amazed that you can complete this thing.  It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory.  The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean.  Tada!  Simple error handling is provided.  🙂


I was just on time, my kitchen timer started beeping a few minutes after I saved the whole thing. 🙂 

My biggest challenge is to create the find the best structure in the first 30 mins. I often make small mistakes there, and the results is a too complex structure, which is almost impossible to finish on time.

 Thanks for the feedback!

Best regards,

CsabaF
0 Kudos
Message 134 of 623
(4,430 Views)

I hae just finished the boiler example. My previous attempt was a total chaos, I ended up with a producer-consumer monster, which locked up the UI! 🙂 The funny thing is that after reading the specifications I said to myself "oh, easy, a simple state machine"... Don´t ask why I decided to use another structure. Most probably I was too tired for a 4 hour CLD session.

 

Anyway, today I tried it again, relaxed, calm and the result is much-much better.

I used a simple state machine and the whole thing was ready in 2 hours 45 minutes. Probably this was the easiest among the 4 sample tests. I am still a bit worried of my speed,  as far as I know the real CLD thing is way more complex than this.

Please take a look on this and tell me if you see any improvements compared to my previous attempts.

Thanks!

Best regards,

CsabaF
Download All
0 Kudos
Message 135 of 623
(4,429 Views)

@CsabaF wrote:

I hae just finished the boiler example. My previous attempt was a total chaos, I ended up with a producer-consumer monster, which locked up the UI! 🙂 The funny thing is that after reading the specifications I said to myself "oh, easy, a simple state machine"... Don´t ask why I decided to use another structure. Most probably I was too tired for a 4 hour CLD session.

 

Anyway, today I tried it again, relaxed, calm and the result is much-much better.

I used a simple state machine and the whole thing was ready in 2 hours 45 minutes. Probably this was the easiest among the 4 sample tests. I am still a bit worried of my speed,  as far as I know the real CLD thing is way more complex than this.

Please take a look on this and tell me if you see any improvements compared to my previous attempts.

Thanks!


Actually I found the real test to be a lot easier.  (I failed the test because of a brain cramp.  Still waiting on the results of the 2nd, which I'm pretty sure I passed - no brain cramp.)

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 136 of 623
(4,423 Views)

@CsabaF wrote:

@billko wrote:

I'm still amazed that you can complete this thing.  It's much cleaner, but I still think that if you have five minutes you can get a couple of more style points to assure yourself of victory.  The big thing remains error handling, although with the state machine that you used, all you have to do is OR the error out with your exit loop boolean.  Tada!  Simple error handling is provided.  🙂


I was just on time, my kitchen timer started beeping a few minutes after I saved the whole thing. 🙂 

My biggest challenge is to create the find the best structure in the first 30 mins. I often make small mistakes there, and the results is a too complex structure, which is almost impossible to finish on time.

 Thanks for the feedback!


Practicepracticepracticepracticepractice...  🙂

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 137 of 623
(4,422 Views)

@billko wrote:

Practicepracticepracticepracticepractice...  🙂


So... I went to the local NI office and did the test on last week. The task was not complicated, but the time limit was though, just as on the sample tests. I missed a lot from the functionality list and I think my solution was too complex. I tried to document everything to gain a few extra points, but in the last 30 mins I made a flustered attempt to get more items from functionality specs and I ruined my style - and probably my points...

Lesson learned, practice, practice, practice and keep calm.. 🙂 I might have a small chance to pass on the test, but most probably I will have to visit them again.

Best regards,

CsabaF
0 Kudos
Message 138 of 623
(4,385 Views)

@CsabaF wrote:

@billko wrote:

Practicepracticepracticepracticepractice...  🙂


So... I went to the local NI office and did the test on last week. The task was not complicated, but the time limit was though, just as on the sample tests. I missed a lot from the functionality list and I think my solution was too complex. I tried to document everything to gain a few extra points, but in the last 30 mins I made a flustered attempt to get more items from functionality specs and I ruined my style - and probably my points...

Lesson learned, practice, practice, practice and keep calm.. 🙂 I might have a small chance to pass on the test, but most probably I will have to visit them again.


So you're following in the footstep of so many before you.  I had a brain cramp that made me fail the first time around.  But the second time around, I squeaked by.  I figured my strong point was style - exactly the opposite of your strength - so I concentrated on getting all the style points I could get.  I figured to shoot for a functionality of 5 because I expected not to get every single point in style and/or documentation.  I got 5 functionality points - and passed by one point.

 

Good Luck!!!  🙂

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.
Message 139 of 623
(4,377 Views)

@billko wrote:

So you're following in the footstep of so many before you.  I had a brain cramp that made me fail the first time around.  But the second time around, I squeaked by.  I figured my strong point was style - exactly the opposite of your strength - so I concentrated on getting all the style points I could get.  I figured to shoot for a functionality of 5 because I expected not to get every single point in style and/or documentation.  I got 5 functionality points - and passed by one point.

 

Good Luck!!!  🙂



It took a while, but I got the results today - fail. I got max points for documentation, 13 of 15 for style but I really messed up the functionality (as I mentioned earlier). 2 points more and I pass, ehh, next time. 🙂 Thanks for the help, all of you, I will start preparing myself for the next test today. 🙂

Best regards,

CsabaF
0 Kudos
Message 140 of 623
(4,305 Views)