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.
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.
11-04-2019 11:42 AM
Hi All,
This is my first post here, so I'd like to say hello to all of you.
I am preparing for CLD and I am on CLD success package exercise #11.
I have a question though. I'm slightly confused. The PDF with description says that I should use producer/consumer. However looking at the solution it looks like queued message handler. Is the solution wrong or my understanding of what producer/consumer is? My initial thought was to move the data around in the queues, but apparently only messages (enums) are shifted in the queues.
Also I am confused that the number of states are hard coded, I can easily imagine more or less number of states in the CSV file.
Is this solution represents best practice in Labview?
It is sort of open ended question on CLD exercise # 11
Thank you in advance
Solved! Go to Solution.
11-05-2019 06:49 AM
@piterx wrote:
I have a question though. I'm slightly confused. The PDF with description says that I should use producer/consumer. However looking at the solution it looks like queued message handler. Is the solution wrong or my understanding of what producer/consumer is?
I have not looked at the question or the solution. But I have had many fights here about semantics, including this one. A Producer/Consumer is about streaming data from one loop to another. A Queued Message Handler is about telling another loop, via a message, to do something every once in a while. Similar in structure, but worlds apart in function. Unfortunately, you will see a lot of documentation mixing these two and the Queued State Machine.
Other threads worth going through:
Difference between Master/Slave vs Producer/Consumer?
Difference between QSM and QMH?
11-05-2019 07:50 AM
Dear crossrulz,
Thank you for your reply it is really helpful. Quickly looking at the threads you mentioned I think the solution may even be queued state machine. I attached the solution. Now I know that I should take this success package with a pinch of salt.
Thanks
11-05-2019 08:03 AM
@piterx wrote:
Quickly looking at the threads you mentioned I think the solution may even be queued state machine.
It is a bastardization between a QSM and QMH. As I stated in one of those threads, you really should not have enqueuing state in both inside and outside of the consumer loop. It has caused all kinds of weird race conditions. It would be more appropriate to have another queue for the state machine to receive messages. From what I see in this, I would actually move the Event Structure into the QSM, eliminating a loop.
But what is this lesson supposed to be teaching? Hopefully it shows that one thing well.
11-05-2019 08:28 AM
I attached the description of the exercise, however it only mentions that I should be using producer/consumer and nothing more about the software architecture. This exercise #11 is a variation on previous exercises (#9 and #10) where the architecture was not specified at all, (Offtopic: In that cases I ended up doing it with FGV. It turned out that they used simple state machine for those)
For this exercise (#11) I started developing producer/consumer to shift the data around between two loops (not entirely clear to me wy should I use two loops, but to learn P/C). I got stuck and looked at solution and discovered it's completely not I was expecting.
Anyway a bit more work for me to understand those patterns and more importantly which one is the best for given application.
10-10-2022 02:53 AM
Hi,
Can you please attach te SUB VI of CLD11.
Thanks,
Gopinath R