LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous measurement and logging project template - a good example of QMH and M/S Design Templates?

Hello,

 

I’ve been getting into the Queued Message Handler Design Pattern. At the same time, I’ve been trying to figure out where/how I can use the Master/Slave Design Pattern. While researching both of these, an NI article recommended taking a look at continuous measurement and logging project template as an example of both of these. So, I closed my program, opened the template, then my brain melted, and now I’m here….

 

Q: Is the  continuous measurement and logging project template an example of good LabVIEW code? You don’t have to go in detail. I just want to make sure it is before I spend the considerable amount of time I’ll need to analyze it, and I don’t want to pick up bad habits by emulating it. (Don’t want to repeat the errors caused by using the serial port examples.)

 

- Is it really okay to have that many cases in a case structure? That looks like it would be hard to debug.

 

Thank you,

garthenar

 

 

Related Resources I’ve been using

https://labviewwiki.org/wiki/Design_pattern

https://www.ni.com/en-us/support/documentation/supplemental/06/rules-to-wire-by----part-i.html

https://www.ni.com/en-us/support/documentation/supplemental/06/rules-to-wire-by----part-ii.html

https://labviewwiki.org/wiki/Master/Slave

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1r9CAA&l=en-US

https://forums.ni.com/t5/Example-Code/Master-Slave-Architecture-Using-Notifiers-With-Two-Slave-Loops...

https://lavag.org/topic/15080-masterslave-vs-producerconsumer-templates/

https://www.youtube.com/watch?v=2k3ZDwJolbA&list=PLmF-6jvwRvVNFzBjzh4bQDjFbv6lShcth

https://www.ni.com/en-us/support/documentation/supplemental/21/using-a-queued-message-handler-in-lab...

https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/caveatsrecmndtnsevnts/

 


___________________________________________________________________________________________________________________________________________________
Upgraded from intern to undergrad automation engineer. Attempting to explain to my employer why I need official training…. since I’m the groups only automation engineer.

I tried. I really did.
0 Kudos
Message 1 of 4
(2,231 Views)

Personally, I hate the continuous measurement and logging project template. I think it is overly confusing, and I still don't completely understand it.

 

May a suggest the JKI State Machine as a template or reference. It is similar to a QSM, except the queue is a string shift register that contains your commands. Multiple State Machines can be linked by User Events. It takes a little bit to get used to, but it has built tools that are useful. You can get it through VIPM.

 

mcduff

Message 2 of 4
(2,222 Views)

Hey, i'm fairly new to Labview but i've been using the continuous measurement and logging project (see attached file) as the basis for my program.

 

I find it good, the structure is really well done as every action is well separated but programming this can be a bit confusing. The loops runs in parrallel but you need to be very aware of what goes on in every loop at the same time. I have a lot of cases in my message handling loop, maybe it's a problem but each case is precisely denominated and does a single and simple action. There's many, but they're tiny. Divide and rule as we say. 

 

Just my newbie take on this

Message 3 of 4
(2,185 Views)

@mcduff wrote:

Personally, I hate the continuous measurement and logging project template. I think it is overly confusing, and I still don't completely understand it.

 

May a suggest the JKI State Machine as a template or reference. It is similar to a QSM, except the queue is a string shift register that contains your commands. Multiple State Machines can be linked by User Events. It takes a little bit to get used to, but it has built tools that are useful. You can get it through VIPM.

 

mcduff


Hey Mcduff,

 

I'll definitely add the JKI state machine to my list as another intermediate design pattern to learn, along with the others from the wiki (https://labviewwiki.org/wiki/Design_pattern). I'm trying to widen my experience with LabVIEW and add more tools to my toolbox so to speak. I have a big interest in being able to write decoupled, cohesive code. Would you say the JKI design pattern is good for.... Never mind, I think the picture from their site (below) answers the question I was going to ask.

garthenar_0-1627665771460.png

 

Thanks again,

garthenar

 


___________________________________________________________________________________________________________________________________________________
Upgraded from intern to undergrad automation engineer. Attempting to explain to my employer why I need official training…. since I’m the groups only automation engineer.

I tried. I really did.
0 Kudos
Message 4 of 4
(2,156 Views)