LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD exam Question

Solved!
Go to solution

hi everyone, i have a little question about the CLD exam, I going to  take it next month and I read that almost all of the exams can be answered with a state machine, I personally feel very comfortable with this architecture, but I'm not very fast with others architectures like producer-consumer, so my question is: do you think that I have to study the others architectures? or can I just practice how be faster with the state machine? I want to use my study and practice time as efficient as possible

0 Kudos
Message 1 of 18
(5,549 Views)

There is a certification forum which will have a lot of information for you. You should also download the preparation kit which has a couple (maybe 4?) different prompts for you to practice. When you attempt these, try to attack them however you are most comfortable, but don't be afraid to adapt your architecture to the problem.

Message 2 of 18
(5,546 Views)
Solution
Accepted by AleVS

The biggest problem most of people face on this exam, is the clean code and ****DOCUMENTATION****. Even if you cannot finish all the project, as long as what you program is working and that you do not have a broken arrow, you should pass. So focus in clean code, documentation and every part that you do make sure it runs without issue.

Benoit

Message 3 of 18
(5,481 Views)

A State Machine won't solve the parallel execution problem, and AFAIK most CLD exams require parallel execution.

 

IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.

 

A Producer Consumer is more generally applicable. So is Actor Framework.

 

I usually avoid paradigms like this. If I need something to run in parallel, I make my class start something in parallel. But that might just be me...

 


@AleVS wrote:

do you think that I have to study the others architectures? or can I just practice how be faster with the state machine? I want to use my study and practice time as efficient as possible


I'd say studying other architectures will make you better. Understanding benefits of other architectures will make you appreciated them and the benefits of a state machine.

 

I'm sure you can study to pass the CLD, but I prefer to look at the CLD as a means, not a goal. What is the benefit of passing CLD as soon as possible? It won't make you a better programmer. Again, that might just be me...

Message 4 of 18
(5,476 Views)

wiebe@CARYA wrote:

IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.


Sorry, but I need to hammer wiebe on semantics for a second.  What you just described is more of a Queued Message Handler (QMH).  A QMH is based on Message communications (intermittent, different data types in different messages, may or may not be lossless, possibly 1 to N).  A Producer-Consumer is based on Streaming communications ("high speed", single data type, typically 1 to 1).

 

Spoiler
I know a large majority of us, myself included, are not CS people.  But we need to be more consistent on our terminology in order to avoid a lot of confusion in these discussions.

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
0 Kudos
Message 5 of 18
(5,464 Views)

@crossrulz wrote:

wiebe@CARYA wrote:

IMHO, State Machines don't play nice with Event Structures. And when you do make something to support Even Structures, you'd probably don't need a State Machine anymore, just a parallel loop executing commands in parallel. That's what a Producer Consumer pattern is.


Sorry, but I need to hammer wiebe on semantics for a second.  What you just described is more of a Queued Message Handler (QMH).  A QMH is based on Message communications (intermittent, different data types in different messages, may or may not be lossless, possibly 1 to N).  A Producer-Consumer is based on Streaming communications ("high speed", single data type, typically 1 to 1).

 

Spoiler
I know a large majority of us, myself included, are not CS people.  But we need to be more consistent on our terminology in order to avoid a lot of confusion in these discussions.

So the QMH is a (message streaming) PC Smiley Very Happy.

 

QMH is usually 1 to 1 (queue), single data type (enum or message class) and high speed.

 

Spoiler
I used to mix "tram" and "metro", and people would hammer me down on that. Then I would ask them what the differences are exactly, and often they don't really know. (There are a few differences.)

Seriously, I add what I need, until it does what it should do. You might be right. I don't pay much attention to that kind of "architecture" anymore.

0 Kudos
Message 6 of 18
(5,458 Views)

wiebe@CARYA wrote:

So the QMH is a (message streaming) PC Smiley Very Happy.

 

QMH is usually 1 to 1 (queue), single data type (enum or message class) and high speed.


My QMH is actually usually N to 1 using a queue.

 

You don't have data associated with your message?  Oh, message class, which means each message type will have its own set of data.  High speed is really just an added benefit of the queue, not really what you are trying to accomplish.

 

A Producer-Consumer is more like a stream of floats constantly being sent to another loop for analysis and/or logging.


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
0 Kudos
Message 7 of 18
(5,443 Views)

And I'll hammer weibe on the point that crossruzs missed. 

 

Yes, every CLD exam can be successfully implemented as a simple state machine.

 

You won't pass the recertification without understanding the other design patterns discussed in  LabVIEW Core II training. 


"Should be" isn't "Is" -Jay
Message 8 of 18
(5,433 Views)

@JÞB wrote:

 

Yes, every CLD exam can be successfully implemented as a simple state machine.


No state machine is ever simple (except trivial ones, but then you can avoid them completelly). Or at least they are a big pain to me. If everything is right the first time, it's ok, but usually, and especially during CLDs, it's not. Haven't use one in years. If I have to, I'll use a state pattern. And yes, I passed my CLD using one.

 

IIRC, there's usually something that needs to run in parallel? Of course you can make a SM, with a demon\actor-ish conrtuct, but then it wouldn't be simple anymore.

0 Kudos
Message 9 of 18
(5,415 Views)

thanks for the answer and yes, I already did the exam examples, actually, that's why I did this question because all of the solutions in the examples are state machines

0 Kudos
Message 10 of 18
(5,414 Views)