07-13-2022 10:08 AM
Hi Matt
Reviewing code is outside my role, but I can say with confidence your comments of what you can do to do better sound spot-on. The shift from the CLD exam (doing code) to the CLA (planning code) can be challenging. I appreciate you mentioning specific strategies that can help CLA candidates make that shift.
Good luck on your prep and exam.
07-25-2022 12:35 PM
Hey Fancy Folk,
Finished up the Carwash practice test and was wondering if someone could check this one out. I'm feeling much more confident with the attempt, took my 3.5 hours to do and the final .5 hours would have gone through adding documentation to all the subVIs and verifying that I put down all the [Covers:xxx] tags.
Main improvements to dev time was basically creating a class upfront with the action engine queue, creating all the type deffs associated with the basic class, and laying out the basic init/UI/dequeue structure. Once I created that, I copy and pasted it and used that as a template and whenever I needed to make a new class, all the upfront work was done.
The problem I'm having now is that I can't really come up with a good way to truly pass information back and forth between the classes. I am a fan of the DQMH template so I tried something like a request/broadcast, but I was trying to only use the AE queue ref to pass data between the classes instead of generating a user event. Instead of the class generating a user event and the other class listening to is, I had to pass info from class A to class B via creating an API from class B with the desired data and dropping that into class A. It's messy and weird, but it worked.... The problem that I am having is that I would need to create additional VIs to pass the user events around which I can see taking a while.
I think in my next attempt (elevator) I am going to include an init section for the user events and have 1 user event with a type deff "state" and variant "ADTL Data" so I can easily add to it. I would assume proper design is to create a typedeff per user event, but I think I can skirt by for the sake of speed with this method.
Anyways, if you get around to judging the code, let me know what you think and where I can use improvements.
Matt
12-22-2022 08:21 PM
Hay
I have build a new timer with pause and resume functionality, can anyone review it?
12-23-2022 02:35 AM
The automatic analyzer tools will pick those up and you automatically loose a lot of points for style. Icons wouldn't pass my style guide, but I personally don't use VI Documentation a lot.
If you put the shift registers in a class's private data, and each function in a VI you'll get 1) simpler VIs, 2) a timer you can use multiple times, 3) a 'by wire" timer. But don't try this out for the first time on your exam, do what you're comfortable with. I promise a good grasp of OO is worth your while though 😊.
Keep in mind that at the CLD you ideally would have to make this VI in max 10 min., preferably <5 min.
12-23-2022 03:40 AM
Thanks for the reply,, i just left out the documentation, i was more focusing on functionality, did you check the functionality? is this the functionality required for most of the exams?
12-23-2022 07:21 AM
I didn't test functionality, because I'm sure it does what it's programmed to do. If that is what is desired, I don't know; there's no specification.
The code is lean and clean, so I doubt there's much wrong with it.
Yes, it's very likely you need some sort of a timer. You might not need the pause functionality, but it's good to know how to do that.
A timer like this goes a long way, although you can only use it for 1 timer. If you make it reentrant you can use it more then once, but it stops working as a functional global... That's why I prefer to program "by wire", but YMMV.
12-23-2022 08:39 AM
12-23-2022 11:45 AM
@Altira wrote:
Thanks for the info, I had one more doubt,I have been doing projects in state machine using string arraysIs there any mandatory that we should use enum for state machine?Im not confident with enum, but pretty confident with array of strings
There used to be a "instant disqualification" rule for not using an enum state machine. All example exams have this warning:
Use a state machine that either uses a type-defined enumerated control, queue, or Event structure for state management
Not sure what the status on that is. I don't like to be forced towards an implementation (I wouldn't use a state machine at all). I've been ranting about this to everyone and their dog, but never got the idea they where even considering to change it.
I'd try to get to know type def'd enums a bit better.
Simply make an enum, make it a type def, and you never have to type a string in a case again, risking typos.
The only really bad thing with comparing enums in a case structure is when LabIVEW automatically 'groups' them, turning "One", "Two", "Three" into "One".."Three". This is a problem, because you want your code to break when you insert "Two and a half"... However, with strings you wouldn't get that either.
12-23-2022 06:21 PM
HI Thanks for the reply, i dif post a query to NI regarding strings and their answer was ...
"Thank you for contacting us and sorry for the delay in replying. Good luck with your preparations. Enums are not required for case structures, but they're probably best practice. "
another doubt i had is , when testing vi through vi analyzer, i get these common errors
Does these errors have anything to do with points in CLD exam?
12-23-2022 10:38 PM
Hi
I have updated my VI, can you please have a look on to it?
im taking a remote test, so where should i save my sub vis? is there any specific folder structure to follow?
does spelling mistake loose points?