From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLA Framework Advice

Solved!
Go to solution

Hello!

 

Having been a CLD for a couple of years now I was thinking about taking my CLA this year. Looking at the solutions and the forums people seem pretty split between an OOP Actor Framework approach, or a multi QMH approach. As I can hardly get my head round all of AF normally I decided I'd go with the QMH approach. 

 

I've attached a copy of my basic framework and named the modules like I would for the ATM example (used the ATM solution for my inspiration). I wanted to see if anyone saw any glaring errors or problems with the framework I've attached. I want to get good and quick at throwing that down then build the GUIs and APIs based on what problem I get in the exam. 

 

Any time spent looking through the framework is greatly appreciated

 

Thanks

 

Dan 

Daniel Harryman MEng
CLA, CPI
0 Kudos
Message 1 of 9
(4,334 Views)
Solution
Accepted by topic author DanHarryman

I took a quick look through what you have but you might want to also try posting this to the certification forums to get some additional insight

 

http://forums.ni.com/t5/Certification/bd-p/Certification

 

I know this is just a generic framework but in the actual CLA exam you need to add more documentation about how your framework is supposed to work. A multi QMH approach may seem common to you but your developers may find it just as hard to understand as you do AF. One thing that you probably just forgot to do was wire the queue input in each module's initialization routine, you run the set FGV but don't have anything to set it to.

 

I think you should also make sure that the error wires go through shift registers in your message handler loops. You monitor for errors in a way that makes sense but you will never actually run into any errors that didn't come straight from initialization.

 

Something that I noticed  you did, which caused me some problems my first attempt, was use the same QMH module for the database communication. Somebody may have some other advice, but I had a lot of problems implementing the request-response behavior you want without causing potential deadlocks everywhere.I found that because the only methods I needed were Open, Read, Write, and Close it was much easier to just use an FGV.  I'm sure there's a better approach but I couldn't think of it.

Matt J | National Instruments | CLA
Message 2 of 9
(4,302 Views)

Hi Matt, 

 

Thanks for going through my code! Really appreciate you taking the time to do so.

 

You're right that I did forget to wire up my queue in my initialization. Guess that's why I should be extra careful when duplicating from a single library! Also the comments is a good point, I didn't put any in because I was just coding this up quickly, but I guess I should practise that now, also could save myself a fair bit of time doing that in the first library so it copies over to the others. 

 

I think with regards to the errors they we're all going to be fired back to the error module once I had an API for it, and started coding the other APIs up. I'll also look if there's a better way to do the database stuff, by making a quick example program and having a play about. 

 

Thanks again for taking the time out, and sorry for posting on the wrong forum 😛 

 

Daniel Harryman MEng
CLA, CPI
0 Kudos
Message 3 of 9
(4,281 Views)
Solution
Accepted by topic author DanHarryman

Just got my result from my CLA exam last month. I used almost exactly the same framework than the one you provided and got 91%. Of course, there are the details of the specific problem that you still need to implement.

 

I think that the exam problem is relatively easy for anyone who has a good knowledge of patterns and good experience with LabVIEW. The difficulty for the exam is time management. Do not get bug down in details. Make sure that you hit all requirements. And I would strongly suggest at least one real-time practice.

 

Good luck

 

Marc Dubois
Message 4 of 9
(4,250 Views)

Hi Marc

 

Contratulations on passing your CLA and thanks for the feedback. I think I'll have a real time go at the elevator example in a couple of weeks once I've done some more prep. Thiking of booking the exam for July, but I'll see how I get on. 

 

Thanks again!

 

Daniel Harryman MEng
CLA, CPI
0 Kudos
Message 5 of 9
(4,209 Views)

Hello Everyone,

 

This is my first attempt for CLA exam.Please review and let me your comments.

 

Thanks for your support in advance.

Durai S

 

 

0 Kudos
Message 6 of 9
(3,412 Views)

I was unable to execute your code until I changed your launcher. The simulation was disabled. Once running, no UI appeared and I was unable to cleanly exit the application. I do not see how you abort is functioning. I was not able to find any place that would actually generate the event. I don't know why you actually generate an event in the beginning of all of your modules when you go to register the events. It doesn't make sense to actually generate an event there.

 

I don't like generic names for items in the typedefs. The keypad is not too bad but your first one should be named Key 1 to be consistent. The other keys I would name something that represented what they were actually for. Same goes for your transactions. The code is not very readable when you have events for Xaction1, Xaction2, etc.

 

All of your VIs should be documented. Many are not. Also, should should avoid using the default icons. Your typedefs use the default LabVIEW icon.

 

I am not sure why you have a timeout in your Poll states for your event structure in many of the modules. Those will be triggered by an event. There is no need to have a timeout, especially running with a 5 ms timeout. If at all possible I would avoid polling and use events or queues to trigger actions. I'm also not fond of the queues timing out every 5 ms. That is a lot of wasted CPU cycles doing nothing. Your modules would be better off having a more traditional Producer/Consumer architecture so you could avoid polling all together.

 

I don't see any way place you actually check for errors and actually post them to your error module. The error handling definitely needs improvement.

 

I would make use of the bookmarks feature in your comments. It would make it much easier to navigate the code.

 

I'm not sure where you initialize your ATM messages. That seems to be missing.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 9
(3,380 Views)

Thanks for your comments.

 

I have made another attempt for ATM controller. Please review it and let me know your comments.

 

Thanks

Durai S

0 Kudos
Message 8 of 9
(3,296 Views)

Hello All,

 

Anybody had a chance see my CLA ATM attempt? 

 

Awaiting for the feedback.

 

Thanks

Durai S

0 Kudos
Message 9 of 9
(3,264 Views)