LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Are notifiers necessary in the QMH Structure?

Hi,

 

I don't have a specific question but I am looking for peoples opinion on something...

 

For the last year or so I have increasing been using the QMH structure in my applications (either direct from the template or building them myself) and I have found that I am using Notifier events less, if indeed at all.

 

Do you guys (and gals) think that if you have a well designed QMH that there is a need to use notifiers at all? For example in the Core 3 course the main project uses the QMH and Notifiers but I am struggling to see why the Notifiers are necessary, are they just adding more complexity to the application?

 

If one loop of the program is waiting for another loop to complete a task, instead of using "wait on notifier" in the first loop why not just have it sit in a safe state until the relevant message has been enqueued in the second loop? Isn't this the whole point of the QMH? Or am I missing some of the subtleties of the Notifier events?

 

Any opinion is welcome, I am just curious what other developers think.

 

Cheers,

 

Darren.

 

 

0 Kudos
Message 1 of 5
(2,787 Views)

Darren,

 

i think that the solution of the boiler in Core 3 uses Notifiers because of "show how to use that technology".

I concur, that it makes the solution unnecessarily complex and i would avoid to use Notifiers. I would go for named queues and define a "protocol" for each QMH.

Using Notifiers circumvent a requirement/clear definition of such a protocol as handshaking is put into the individual "state".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,769 Views)

I fully agree that the waiting for a notification from a consumer is kind of stupid.  What's the point of having the second loop then?  The point of having the second loop is so that you can do multiple things in parallel.  Waiting for the notification defeats that purpose (IMHO).

 

Now, I will use User Events for things like GUI Updates for for sending data back up to the producer.  Sometimes that is necessary.  Notifiers can be useful, but I don't use them much.  The whole lossy thing with notifiers gets in the way of using them in the applications I have ran into.


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
0 Kudos
Message 3 of 5
(2,746 Views)

I've started using User Events for most of my communication between loops. They behave like a queue in that there can be multiple events waiting to be processed, but also behave like a notifier in that every Event Structure that is listening recieves the message. The Event Inspector Window in 2013 makes debugging User Events much easier.

0 Kudos
Message 4 of 5
(2,727 Views)

The base QMH template does not use notifiers for loop communication. It has a User Event for the message handler to pass a 'Stop' message to the event handler, and it uses queues for everything else.

 

The Continuous Measurement and Logging sample project (which is based on the QMH) uses a notifier only for data display on the front panel. It could have used a queue instead, but I thought that was overkill for simple data display.

Message 5 of 5
(2,719 Views)