LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about producer consumer architecture on CLD prep material

The guidelines for the problem are attached (.pdf). After reviewing the solution(CLD 11 Producer consumer events solution.vi) I notice the solution creator used a "check time" state in the state machine and queue subvi routine to handle the states. I wanted to know why the author of this solution saw it necessary to use these steps to solve the problem. Attached is a solution I created (Step_Sequencer_with_Elapsed_Time_Express_VI_Timer_001.vi) Albeit my solution doesn't read in .csv data, it is virtually identical in function.

 

I was hoping someone could provide me a comparison of the strength and weaknesses of the two architectures. Thank you very much for your help!

Download All
0 Kudos
Message 1 of 3
(2,283 Views)

Hey galliuminecuador,

 

Could you clarify which two architectures you are trying to compare?

  • Producer/Consumer Events architecture (CLD 11 solution) versus a State Machine with a while loop (CLD 9 solution)
  • Producer/Consumer Events architecture (CLD 11 solution) versus a "State Machine with an event structure in the same while loop" (your solution)

Best regards,

Ryan B.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,204 Views)

Hey galliuminecuador,

 

Here are two articles that explain more about each of the first two architectures I mentioned. Some potential issues and solutions related to each architecture can be seen in the Important Notes section at the bottom of the articles. 

 

 

As the articles suggest, while State Machines can provide great decision-making algorithms and application planning, code redundancy and scalability of the project can become an issue for some programmers. Implementing an event structure in the Producer/Consumer architecture has the advantage of providing synchronization to the application, however handling data types in queues can still introduce some difficulty to programmers.

 

Ryan B.
Technical Support Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,173 Views)