Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

timer with separated input settings

Solved!
Go to solution

thanks!

0 Kudos
Message 11 of 25
(4,879 Views)

Probably another shout-out to my beloved Grandma is in order.

 

Think about your states and design them accordingly

 

Now for the real twist:  Of course I used a P-C (Events) pattern on my CLD-  It seamed appropriate at the time and I managed to pass.

 

Review CORE II module 6?? if you have access to the online training  There is one module (I THINK 6 off the top of my head) that addresses selecting the right design pattern.

 

(If its not 6- you'll know from the online training unless you have no access- at which point the question becomes moot so its not worth the right-clicks to verify)


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 25
(4,872 Views)

@JÞB wrote:

 

Now for the real twist:  Of course I used a P-C (Events) pattern on my CLD-  It seamed appropriate at the time and I managed to pass.


I used more of a Master-Slave with Events and passed with no issues.  A year later I looked back and said "I made that too complicated.  It could all be done in a single loop."

 

And LabVIEW Core 2 Lesson 2 is on Design Patterns.


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 13 of 25
(4,865 Views)

I used more of a Master-Slave with Events and passed with no issues. 

So you mean you used Notifiers, you sent Notifications from the Event loop, and you had a state machine in the slave loop? I guess you had also a timeout case in the slave, like an Idle state...?

 

A year later I looked back and said "I made that too complicated.  It could all be done in a single loop.

You mean using a simple state machine without Event structure?

 

Thanks for all the useful hints and info, I keep going on and digest through the prep materials and after the example exams...

Best Regards,

 

 

0 Kudos
Message 14 of 25
(4,862 Views)

@Blokk wrote:

I used more of a Master-Slave with Events and passed with no issues. 

So you mean you used Notifiers, you sent Notifications from the Event loop, and you had a state machine in the slave loop? I guess you had also a timeout case in the slave, like an Idle state...?

 

A year later I looked back and said "I made that too complicated.  It could all be done in a single loop.

You mean using a simple state machine without Event structure?


Actually, my idle state was just looking at the notifier.  Looking back, I should have just put my event structure in that state instead of using a notifier.  It would have been 1 less loop and 1 less communication scheme that I would have to develop.


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 15 of 25
(4,852 Views)

@crossrulz wrote:

@Blokk wrote:

I used more of a Master-Slave with Events and passed with no issues. 

So you mean you used Notifiers, you sent Notifications from the Event loop, and you had a state machine in the slave loop? I guess you had also a timeout case in the slave, like an Idle state...?

 

A year later I looked back and said "I made that too complicated.  It could all be done in a single loop.

You mean using a simple state machine without Event structure?


Actually, my idle state was just looking at the notifier.  Looking back, I should have just put my event structure in that state instead of using a notifier.  It would have been 1 less loop and 1 less communication scheme that I would have to develop.


IDK,  That abstraction loop can come in handy when the scope creep comes along!  Managing scope creep is not a CLD testable subjet.  

 

Just try to be familliar with more than one pattern.  Or you might just implement a "Screw-hammer" in real life-  your CERT is not "Real- life"


"Should be" isn't "Is" -Jay
0 Kudos
Message 16 of 25
(4,845 Views)

@Blokk wrote:

@crossrulz wrote:

I fully believe the simple state machine will do 99% of the CLD exams out there.  At least all of the ones I have seen could be simply done with a state machine.  One of the keys to keeping it all in a single loop is to make sure you have an "Idle" state.  That Idle state should have your event structure with a timeout.  Then make sure you are going to the Idle state every so often in your state sequences to make sure you are responding to the user.



Thanks for the hint!

To have an Event structure inside one case of a case structure (inside a while loop which "holds" the shift register, so the states, etc) just makes me feeling uncomfortable, but I guess this is the way how to get fast through the CLD 🙂

I understand that, if we can be sure about that every other case executes in less than 100 msec, than we are safe...Hopefully the user cannot click on two different command button on the GUI in 100 msec, in this case this structure would blow...would not it?


 

I suggest you check out the project templates that ship with LabVIEW. From the Getting started window click on "Create Project", then on the left select the category "Templates" and double click on the Simple State Machine. Click Next and follow the wizard. 

 

The project created will have a Main.vi with a state machine that ha the event structure insdie the "Wait for Event" state that is similar to the Idle case Crossrulz is mentioning. 

 

The project also includes a documentation folder with a nice html file that describes how this design pattern is to be used and you will chuckle when you see the ATM as one of the "Use Cases". 

 

If this template does not meet your needs or you are more comfortable with two loops as opposed to one loop, then check the Queued Message Handler Template, it also comes with detailed documentation.

 

Good luck,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Message 17 of 25
(4,839 Views)

nice to see you over here Fab!  Drop by as often as you wish!


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 25
(4,830 Views)

From the Getting started window click on "Create Project", then on the left select the category "Templates" and double click on the Simple State Machine. Click Next and follow the wizard. 

 

Thanks! I was not aware of this example, I thought there is only one template for state machine, via the "New..." menu option.

Regards,

0 Kudos
Message 19 of 25
(4,825 Views)

@JÞB wrote:

nice to see you over here Fab!  Drop by as often as you wish!


 

Will do! 

 

🙂 

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 20 of 25
(4,805 Views)