Kathir Posted May 10, 2011 Report Share Posted May 10, 2011 Hi All, I'm planning to take CLD next month and tried out a few examples from the sample questions available on the NI website. I'm trying to create a template which can be used for all timing related problems, and have come up with this solution. Can anybody go through this code and give your comments? I have attached the Question and code for the sprinkler controller example. awaiting comments, kathir 100927-01.pdf Sprinkler_For_Forum.zip Quote Link to comment
SteveChandler Posted May 10, 2011 Report Share Posted May 10, 2011 The main startup vi should be at the top level of the hierarchy. I personally hate auto-populating folders but that should definately not have any impact on your score. Some of your subvis do not have documentation properties. Make sure every one does including the main vi. That was the only point I lost on documentation. Some of your controls do not have tip-strips. A few backwards wires You should put labels on the shift register wires. One way to ensure you got all the documentation properties is to use view/hierarchy and mouse over the subvis. You can right click from the hierarchy view to open the vi properties. A better way to make sure is to immediately fill it the documentation when you create the vi. Same for tip-strips on controls. Quote Link to comment
Kathir Posted May 12, 2011 Author Report Share Posted May 12, 2011 Thanks for the reply. I will keep in mind the points you told, in the CLD exam. But can u comment on the architecture i chose for this sample test. I'm planing on using this as a template for all time related questions. Quote Link to comment
SteveChandler Posted May 13, 2011 Report Share Posted May 13, 2011 For the CLD you can use whatever reasonable architecture you are comfortable with as long as it is a state machine type of architecture. No stacked sequence structures with a dozen unlabeled sequence locals! I don't have access to LabVIEW at the moment but as I recall you have two loops and each has it's own event structure and you communicate between the two with user events. I think that should be fine but the architecture that is probably more preferable, or at least more common, is the producer/consumer. You have one loop with an event structure that sends messages to the second using a queue. That second loop sends messages back to the first loop using user events. If you want to get some attention here on Lava just use a class for something simple like timing and make the claim that your solution is object oriented Have you tried asking for feedback on the NI forums? 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.