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.

Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

Useful Architecture for CLA

I remember there are 3 useful architectures when I prepared the CLD: state machine, queue based event handler, and producer-consumer.

 

What are those for CLA then? I hope to get familiar with them and choose the most comfortable one in my practices and exams. Has anyone ever summarized it?

 

Thanks,

 

Chuan

0 Kudos
Message 1 of 9
(6,692 Views)

The CLA is at a much higher level, so you will likely need several architectures.

 

From what I remember of the exam, the bigest issue was multimodule communications.  Then each module was basically a state machine with a message handler.  I found Action Engines and Queues to be very valuable.


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
Message 2 of 9
(6,685 Views)

Hi,

 

Please correct me if I am wrong.

 

I found there are different opinions about how AE and FGV can be differentiated. I would think that they are the same to keep it simple.

 

Using FGVs and Queues have already been covered in CLD, they are used in timer and the main architecture.

 

It seems that state machine architecture is used very often from your reply. Then how could I understand your statement that you will likely need several architectures?

 

Thx,

 

Chuan

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

You will need to design multiple modules for a large program.  Some modules may be better off as a state machine.  Others, producer/consumer or master/slave.  It is up to you to figure out what architecture is best for each module.

 

You will find that almost all of the things taught in Core I & II can be used.  Hopefully by the CLA level, you have come up with some combinations of the basics to accomplish the goal.  For instance, I like to hold my queue references in Action Engines.  They don't teach you that in Core I & II.  I find it very helpful, especially for messaging setups that was needed for my CLA exam.


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
Message 4 of 9
(6,642 Views)

Thanks,

0 Kudos
Message 5 of 9
(6,636 Views)

You can check out some VIs I submitted to OpenG.  Nothing has happened with them yet though.

http://lavag.org/topic/16171-new-messaging-vis/


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
Message 6 of 9
(6,625 Views)

Great templates, Crossrulz, I got two questions:

 

(1) I guess you have several modules sharing the same queue reference in the main program, AE (Queue Manager) is used in each module with data stored, for example a cluster, so the data can be communicated among different modules. Am I right on this?

 

(2) What is the reason to use feedback node rather than shift register for passing the queue reference in Queue Manager?

 

Thanks,

 

Chuan

 

 

0 Kudos
Message 7 of 9
(6,604 Views)

1) Each module needs a way to get messages.  So each module has its own Queue Action Engine.  Each module initializes and closes their own AE.  Modules could then send the commands to each other using the appropriate AE.  For instance, A and B could send commands to C using C's action engine.  C just has to be waiting for data coming down the queue.

 

2) Mostly preference.  Supposedly, it has reduced overhead to use the feedback node versus the while loop with shift registers.  The last time I did a benchmark, it really didn't matter.


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
Message 8 of 9
(6,591 Views)

Thanks, crossrulz. I went through the solution of ATM example and had a few thoughts:

 

(1) I coded the ATM CLD example using queue based message handler architecture. I found what the solution does is to split different functions (error handling, data file reading/writing, button control, display, etc) into different modules and each module still uses the same queue based message handler architecture, also almost every functionality is realized using queue. If the program is supposed to be given to several CLDs, would it be more complicated in terms of amount of LabVIEW code? If we can realize the functionality in one main architecture, why should we split it into modules?

 

(2) I saw that each module uses 'obtain queue. vi' to create queue reference independently, and uses queue AE to get queue reference whenever enqueue and dequeue so messages can be sent between modules. How does the program ensure the same queue reference is used? Is it possible to have more than one queue in a program?

 

(3) The comments in main program say the UI is launched dynamically when the program is run. However, the buttons and displays are in the front panels of some modules, I don't see any mechanism to make them launch dynamically.

0 Kudos
Message 9 of 9
(6,575 Views)