02-20-2017 03:18 AM
Thank you ! I wasnt paying attention to that
I am currently working on the Sprinkler Sample and experiencing difficulty in something
If I go to the rain state when the rain button changes (using producer consumer architecture) I check if it is true, I keep enqueueing the same state, If not i enqueue the intialize state to test it.
But the problem is after I execute the "Initialize" the program keep coming back to the rain state as if it is continuously enqueued.
I am imagining the FIFO buffer as continuously enqueueing the rain state and the final state should be the intialize, since it is enqueued last.
are there anything about the enqueue element function I am missing?
02-20-2017 06:25 AM
Hello Again I have completed the Sprinkler example in 3h:30
but I was experience some problems with it regarding architecture
I need some hints in order to better handle controls (buttons, knobs, sliders with continous value change in a queued message handling scheme)
As for the water pressure level (if I would like to add that control to an event structure which checks and updates its value I will have troubles going back to the previous run operations I was at.
The attached design have some errors, but I try to make it as a CLD exam in time, stress and development debugging.
It would be great to get some hints on how to use the 4 hours the most and better prepare the variables and block panel
I was going to : always use the architecture I am comfortable at (message queue)
always keep an enum of the current state and update it seperatly if needed for operations
and always bundle controls, indicators and references in a single cluster and use that in all states
Thank you
02-24-2017 04:30 PM
Hey all, my first attempt for the CLA. Can you check my 2016 ATM solution using Actor Framework?
As expected totally ran out of time for over coding and under designing. Was a good 2-2.5 hours in before the needed state machine struck...
I can see how you should basically create all modules at the start, then the simple UIs, then create messages for each state that will be needed, then add some state variables to them (I have like none). Then it is just a matter of adding notes to those guys, and figuring out how to implement some of the timing requirements.
I also found the need to create a message in the parent and then in the simulation class to REALLY slow me down. But the requirements are generally UI based, so it made sense to note the child simulation class. Is there an issue, with putting all the requirements in the base API, then just making all the requirements there and make them must overrides?
I was just looking at the AF car wash example and I am curious. No messages are really created and instead the MSG VIs are dropped liberally. Is that ok? What a HUGE time savings.
Any advice would be great, I do plan on using the AF in my test next week.
Thanks,
Evan
03-01-2017 05:06 PM
Here is a CLA elevator with the AF in 2016.
I actually finished about 30 early by really not creating any messages etc. I am still curious how people do their error handler. I am not sure the overall architecture would have worked by mixing a class based state machine into the AF, but in some ways it seemed elegant... but also not really flushed out.
I am still confused on how tags work.. can they be on the FP and the BD? Also, with the AF and then the physical and simulated classes I wonder where the tag needs to be. Ie, the sender of the message or the message itself? both? Then can it just be in the base class and don't wast time overriding the various overrides? So really I have an actor core override in the simulated class and basically no others?
Any feedback would be great.
03-03-2017 03:22 PM
Here's my first go at the ATM CLD sample exam. This is my first go on any of the sample exams, any comments are appreciated. This is what I accomplished in the fixed 4 hours.
03-04-2017 10:56 PM
CLA - Car Wash Simulator - LV 2012
Hi there,
I'm looking for some feedback on my first CLA attempt. I did not finish in the 4 hour timeframe. The code got less detailed the more I worked. I think my strategy for next time would be to get more across with comments and less with actual code.
Thank you,
gregoryj
03-05-2017 07:08 AM
I can not answer on your questions, b/c I'm not working with AF, honestly; but overall I'd propose you to follow advices for CLA preparation on this forum, and on lava.org - and not use OOP, and moreover AF on real CLA exam. I doesn't worth it. On exam you'll receive more complicated task, so you will need more time to: implement architecture, implement modules (or prepare modules), cover all the requirements, create and use API, and document everything.
There are discussed cases, when people selected OOP or AF approach, and simply failed b/c it took more time to implement one module, then in case of simplier architectures.
But, this is your choice - if you're able to cover all the tasks within 4 hours with AF, then it's really cool.
So, it's up to you 😃
03-06-2017 12:21 AM - edited 03-06-2017 12:22 AM
Hello,
for the ATM code (CLD)
well the program seems to be working correctly however you can further improve it o avoid losing points especially in style & error handling.
-minimize the use of local variables and property nodes whenever possible.
-use an FGV architecture to open/read/close a file and check the file availability instead of doing that in the main VI
-connect all errors In and Out for different nodes and functions
-use shift registers to pass errors from an iteration to another.
-avoid coercion dots (on index array input)
-group constant at the right of the loop for continuous access or include them in a global variable.
-the event structure already have a timeout terminal that you can set for 10000 ms (10secs) to detect inactivity
-if for some reason the consumer loop stops the event handling loop (producer) does not trigger a stop you can fix that with a dynamically generated stop event
-you did not make the message cluster as a type def
-do not leave (use default if unwired on terminals) it can cause errors on bigger codes
I hope that was helpful, best of luck
03-06-2017 03:48 PM
Thanks for the feedback! I have a few questions about your comments.
How would you suggest avoiding property nodes are local variables any more than I did? Since the 'User Input' and 'Card Simulator' are controls, the only way to clear them or change their value is through locals or property nodes, and I used locals rather than the 'value' property. The property nodes I have used are required in order to change the enabled state of some controls per the specification.
Should I really add a specific data conversion on the index array input just to avoid the coersion dot? I could have simply used numeric constants, but I thought a type def with the message types was better since it enforces only valid message selections.
It's impossible for the consumer loop to stop independently of the producer loop. The producer loop is what stops the consumer (or both are stopped at program startup if the ATM accounts file is missing)
I started doing the timing as you suggested, but maybe I had an error in my program because it didn't seem like the event timeout was resetting whenever there was another event.
I've seen comments both ways regarding'use default if unwired'. i.e. don't use it because it causes issue in larger programs (which I totally understand), and do use it because you have the same constant value floating in many cases. Another option is to have one instance of the default value which is always wired through from the left. Is there a preferred method for the sake of certification? i.e. will using default if unwired lose me points? Again, I understand the risk in a larger program, but since the certification is, by definition, not a large program, this seems like a good place to use it.
@ghattas.ak wrote:
Hello,
for the ATM code (CLD)
well the program seems to be working correctly however you can further improve it o avoid losing points especially in style & error handling.
-minimize the use of local variables and property nodes whenever possible.
-use an FGV architecture to open/read/close a file and check the file availability instead of doing that in the main VI
-connect all errors In and Out for different nodes and functions
-use shift registers to pass errors from an iteration to another.
-avoid coercion dots (on index array input)
-group constant at the right of the loop for continuous access or include them in a global variable.
-the event structure already have a timeout terminal that you can set for 10000 ms (10secs) to detect inactivity
-if for some reason the consumer loop stops the event handling loop (producer) does not trigger a stop you can fix that with a dynamically generated stop event
-you did not make the message cluster as a type def
-do not leave (use default if unwired on terminals) it can cause errors on bigger codes
I hope that was helpful, best of luck
03-06-2017 03:53 PM
Here's my attempt at the CLD sprinkler exam. Again, any comments are appreciated!