LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to meet the best practices

Thank you very much for all the information and opinions!

 

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 11 of 18
(1,080 Views)

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.

 


GCentral
Message 12 of 18
(1,068 Views)

@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

 

0 Kudos
Message 13 of 18
(1,059 Views)

@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? 

0 Kudos
Message 14 of 18
(1,058 Views)

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.

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 15 of 18
(1,045 Views)

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 16 of 18
(1,039 Views)

@crossrulz wrote:

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).


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!

0 Kudos
Message 17 of 18
(1,024 Views)

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.  🙂  

---------------------
Patrick Allen: FunctionalityUnlimited.ca
Message 18 of 18
(977 Views)