LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD exam, sprinkler controller

Hello,

i am taking the cld exam in a few weeks.

I have attached below a zip with my solution of the sprinkler controller.

 

I would greatful, if I would get some feedbacks. 

 

Please let me know, if I could improve my code.

 

Thanx in advance for your help

0 Kudos
Message 1 of 7
(1,433 Views)

Hi D,

 

I am not an expert but below are some issues that stood out to me:

 

1) Use default if un-wired termianls in cases

2) Missing error wires connections

3) Improper error handling

4) Spelling errors

 

I could be wrong but I do not think that you need to have a producer consumer loop for this system, unless it is asked for. To me, it is just adding complexity. This can all fit inside one while loop with a state machine architecture that has proper error handling.

 

Edit: Also I would specify if the timing is 1 second, 1 minute, 1 hours etc. In error case, are you asked to close the program or raise an alarm for user attention?

0 Kudos
Message 2 of 7
(1,420 Views)

Hi X,

thanks for your reply.

 

1) Done

2) Done

3) Done

4) I think this is not relevant to pass the exam. I didnt put really attention on that 😉

 

I decided to always use the consumer Producer loop template. So I dont lose time to decide which template could be the best.

Do you think I lose points if a different template would be more apropriate?

Its not specified what the application should do if an error occurs.

 

I attached the new Version.

 

Please let me know if you have more improvments.

 

 

0 Kudos
Message 3 of 7
(1,364 Views)

Hi D,

 

There are some use default if un-wired terminals in event case.

 

Another point that I can add would be to reduce wire bends make subVIs  of parts of code to keep everything in a straight line. I generally like to use tabs and clusters to keep all control indicator the references at one place and modify them all in a subVI as needed. (not sure if time will allow you to do that)

Xonmyth743_0-1663766667955.png

 

Check out @'s solutions, they are always nice a well organized. Post card solutions.

 


I decided to always use the consumer Producer loop template. So I dont lose time to decide which template could be the best.

Do you think I lose points if a different template would be more apropriate?


I cannot answer that as I do not know if it will make you lose points or not.

 

Its not specified what the application should do if an error occurs.


Okay, in that case use your best judgement. I think in a real world scenario, an alarm should be raised if some error occurs in a scenario that does not cause human harm instead of killing entire application.

0 Kudos
Message 4 of 7
(1,332 Views)

@XM43 wrote:

Hi D,

 

There are some use default if un-wired terminals in event case.

 

Another point that I can add would be to reduce wire bends make subVIs  of parts of code to keep everything in a straight line. I generally like to use tabs and clusters to keep all control indicator the references at one place and modify them all in a subVI as needed. (not sure if time will allow you to do that)

Xonmyth743_0-1663766667955.png

 

Check out @'s solutions, they are always nice a well organized. Post card solutions.

 


I decided to always use the consumer Producer loop template. So I dont lose time to decide which template could be the best.

Do you think I lose points if a different template would be more apropriate?


I cannot answer that as I do not know if it will make you lose points or not.

 

Its not specified what the application should do if an error occurs.


Okay, in that case use your best judgement. I think in a real world scenario, an alarm should be raised if some error occurs in a scenario that does not cause human harm instead of killing entire application.


Regarding what template or design pattern to use: Use whatever you feel comfortable using, as long as it is recognizable.  For example, I felt most comfortable using consumer/producer so that's what I used.  But I've seen solutions using just one loop which looked fine to me.

Regarding error handling: Just demonstrate that you are doing something should be good enough.  A graceful exit should be fine.

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 5 of 7
(1,326 Views)

can you give me a link to those altenbach solutions?

0 Kudos
Message 6 of 7
(1,318 Views)

Thanks for your help.

0 Kudos
Message 7 of 7
(1,317 Views)