11-05-2019 08:11 AM
Thank you very much for all the information and opinions!
11-05-2019 09:01 AM
I'll echo crossrulz (and others) regarding the benefits of a simple state machine.
When I took the CLD, I was using Actor Framework day in/day out, but practicing for the exams with the available sample exams it was clear (to me, maybe others see it differently) that the examples are asking for a state machine.
I tried a few times on the practices with QMH-type designs, but I think the State Machine is just more effective for the requirements (at least as they were a few years ago).
I don't remember closely exactly the design I used (and I'm not sure if I could say even if I did - maybe discussing in too much detail is the same as discussing the exam?) but I'm pretty sure it was just a simple state machine with an enum and then some data in a shift register.
11-05-2019 09:32 AM
@crossrulz wrote:
wiebe@CARYA wrote:IIRC, there is actually a requirement that you must use a type defined enum used in a state machine? And "instant disqualification" if you don't. Just like when you remove the staples (which is the silliest thing ever, IMHO).
Nope. You can use whatever design pattern you want. What matters is that you meet the requirements and show good style and documentation. But the CLD exams tend to be a perfect fit for a simple State Machine.
Then NI should change the example exams. It's in there:
Section I: General Requirements (page 2)
The application should do the following:
+ ...
+ Use a state machine that either uses a type-defined enumerated control, queue, or Event structure for state management
11-05-2019 09:33 AM
@cbutcher wrote:
a simple state machine with an enum and then some data in a shift register.
That is actually a requirement, at least in the examples..
I'm not happy about it. It's a means (silly rule) to an end (forcing some structure). When you're well seasoned in OO, it's ridiculous that you have to change your style. (I almost says 'lower your standard', as that is how it feels. Of course from my PoV.) If you don't have structure, you won't pass anyway, so why force solutions with a silly rule?
11-05-2019 10:08 AM
wiebe@CARYA wrote:
@cbutcher wrote:
a simple state machine with an enum and then some data in a shift register.
That is actually a requirement, at least in the examples..
I'm not happy about it. It's a means (silly rule) to an end (forcing some structure). When you're well seasoned in OO, it's ridiculous that you have to change your style. (I almost says 'lower your standard', as that is how it feels. Of course from my PoV.) If you don't have structure, you won't pass anyway, so why force solutions with a silly rule?
It's been six years since I've taken the CLD, but I don't remember that requirement at the real test level. It's a very silly requirement.
11-05-2019 10:13 AM
wiebe@CARYA wrote:
+ Use a state machine that either uses a type-defined enumerated control, queue, or Event structure for state management
I was in another thread this morning where it was clear NI was confusing several architectures in their documentation (Queued State Machine, Queued Message Handler, and Producer/Consumer). I would attribute this to the same ignorance. The important thing is you have to maintain the state of the system and control it based on the requirements. At least, that is based on what I know for how they grade the exam (it has been a few years since I talked to NI about it).
11-05-2019 10:40 AM
@crossrulz wrote:
wiebe@CARYA wrote:
+ Use a state machine that either uses a type-defined enumerated control, queue, or Event structure for state managementI was in another thread this morning where it was clear NI was confusing several architectures in their documentation (Queued State Machine, Queued Message Handler, and Producer/Consumer). I would attribute this to the same ignorance. The important thing is you have to maintain the state of the system and control it based on the requirements. At least, that is based on what I know for how they grade the exam (it has been a few years since I talked to NI about it).
A case of Hanlon's razor seems plausible...
How is it even possible to use an event structure for state management? Sure, if you put it in a loop \w shift registers, but than it's hardly the ES that keeps state.
Perhaps make a control for each state, and than use value signaling to switch? Sounds like a really terrible state machine!
11-07-2019 02:37 PM
An important difference between the CLD and the CLA is that the CLD has the expectation of a functioning application. You are only awarded points for the features that actually work.
It's important to keep things simple if you want have it complete in only 4 hours.
Also, don't forget to completely exit LabVIEW and then re-open and run your project before turning it in. 🙂