LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenG Message Queues: What are they good for?

Hopfully it's OK to talk about OpenG code here.  I just installed the full OpenG compliment via VIPM and I noticed a pallet for Message Queues.  I've used your standard LabVIEW queue to synchronize data between loops, usually sending an enum to control a state-machine, so I was curious what these Message Queues buy me that the standard Queues do not? I notice that the "Insert Msg Queue Element" VI has a boolean option called "Generate Response Notifier" which seems new and interesting.  I don't have any experience in using notifiers either so maybe this is where I aught to look to first?  I tried looking on the OpenG wiki for usage cases but I couldn't find any.  I'd just hate having a really great tool that I could use under my fingertips and not know how to properly use them.  Thanks

0 Kudos
Message 1 of 4
(3,390 Views)

The LV message queues are only able to transport a message from the sender to the receiver. This is good if you do not need to know when the message will be processed by the receiver. This is the same a making an asynchronous call to a function.

The OpenG message queues give you the possibility to send a message and wait for the receiver until he is processing the message. This will act like a synchronous call to a function.

What is a use case for it?

Think of message handling module. This module will receive through its command queue different commands. Some of them are asynchronous like "Log this message" and others are synchronous like "Show this message to the user and wait until he closes the dialog". In the first case you would set "Generate response notifier" to false and in the second to true.

Notifiers are just like queues but holding only one element which is always the last one inserted.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 4
(3,361 Views)

adding what little I can guess...

 

Here you will find a design pattern that was posted by Jim Kring before OpenG was founded.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 4
(3,335 Views)

SiegeX wrote:
Hopfully it's OK to talk about OpenG code here.  I just installed the full OpenG compliment via VIPM and I noticed a pallet for Message Queues.  I've used your standard LabVIEW queue to synchronize data between loops, usually sending an enum to control a state-machine, so I was curious what these Message Queues buy me that the standard Queues do not? I notice that the "Insert Msg Queue Element" VI has a boolean option called "Generate Response Notifier" which seems new and interesting.  I don't have any experience in using notifiers either so maybe this is where I aught to look to first?  I tried looking on the OpenG wiki for usage cases but I couldn't find any.  I'd just hate having a really great tool that I could use under my fingertips and not know how to properly use them.  Thanks

 

Hi,

 

This is to notify you that I've posted a response to your message, here (on the OpenG forums).  I've included an example with screenshots.

 

Thanks,

 

-Jim

Message 4 of 4
(3,309 Views)