LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send notifications without ever waiting on them

Solved!
Go to solution

In my application I use notifiers to feed changes of state to a production line controller. Now I started adding offline functionality to the programm where the entire PLC end is not present (or not supposed to be listening) and therefore doesn't need to get any notifications. To distinguish between on- / offline I introduced a simple boolean that is available by wire almost anywhere in the program.

 

Now I could of course insert a case structure to the notifier SubVI to keep it from sending notifications in case the program runs offline. However - would there be a down-side to sending the notifications and never receiving them, i.e. pulling them off the single element queue - I have put such a case structure in the receiving end already, so no notification generated would ever be read in "offline" case? I expect there might be a small build-up of references or something ruining my performance or stability on the long run...

 

The difference for me here is simply to draw a whole lot of wires (anywhere where the notifier SubVI is used) as opposed to keeping this part as it is and ignoring the on-/offline state completely on the sending end.

 

Thanks for suggestions and opinions.

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

If you have a module that is just sending the data to the PLC, let that module alone worry about whether or not you are performing on/offline.  I would recommend always reading the notification and then do nothing with it if you are operating offline.


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 2 of 5
(2,639 Views)

Thanks crossrulz, I get your point. Since I already "offlined" the PLC comm routine so that it terminates and never calls on the PLC in case of offline use (which I admit is an absolutely arguable approach) I will not follow your suggestion. I understand your approach and agree that it would have been a quite modular one to leave as much as it is and only tweak a remote ending of the code.

 

Perhaps I should have skipped painting the application scenario but just ask the plain question that's in my mind. So here we go again:

Is there or will there be a problem with sending notifications without ever reading any of them?

Thanks.

0 Kudos
Message 3 of 5
(2,627 Views)
Solution
Accepted by topic author comrade

@comrade wrote:

Is there or will there be a problem with sending notifications without ever reading any of them?


If you are using a Notifier, no.  If you are using a Queue, yes.

 

A Notifier only keeps the latest value, so there is no data being added.

For a queue, each time you enqueue something, it just gets added to memory.  So make sure you are dequeueing the data.


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
Message 4 of 5
(2,621 Views)

Thanks for the straight answer. So I'll be ok while using notifiers. Of course it obviously wouldn't work like that with queues.

Smiley Happy

0 Kudos
Message 5 of 5
(2,604 Views)