LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Queue and Notifier , how it use in LAbview Programming

I agree with crossrulz' suggestion to start with an Action Engine.  There's a couple things to be aware of though:

 

- you may need to implement "macro-level" communications in your action engine though to help prevent parallel access conflicts.  For example, you may need a single Action to encapsulate a sequence of a serial Write followed by a serial Read (for a query response Action).  If process A called a discrete Write Action followed by calling a discrete Read Action, it's very possible that process B could have snuck in with its own discrete call to a Read Action.  Then process B gets the reply that process A wanted and process A may timeout and throw an error.

 

- note also that when you *do* encapsulate a Write->Read sequence into a single Action, you'll be blocking other processes from accessing your Action Engine for a longer time.

 

There are other approaches for mediating access to a shared resource, but I can't think of any as simple to understand and implement as an Action Engine.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 11 of 16
(1,969 Views)

Kevin,

 

Spoiler
Check your PM. Its time!

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 16
(1,964 Views)

@PalanivelThiruvenkadam wrote:

Just Adding Points in my VIEW

 

Notifier Follows a broadcasting Mechanism where N Number of listeners Receive the value until the new value is written, where Queue Does not follow broadcasting mechanism as the Queued Value is De Queued once, then the value wont be available for other listeners.

 

One better option is create a FGV and hold the COM PORT Ref in the FGV and can be used wherever needed.


As much as I hate to respond to threads brought back from the dead....

 

So does this mean that if I wanted to be able to run and pause "Loop A" from "Loop B"

Loop A would have a Listener

Loop B would have a Notifier

 

So Loop B would send a "run" Notifier to Loop A ONCE and Loop A would continue to operate until Loop B sent it a "pause" notifier? 

 

Same for pausing Loop A, Loop B only needs to send one "pause" notifier to Loop A and Loop A would remain paused until it receives a "run" notifier?

 

Are there any good examples of doing this with Notifiers? The examples that come with LabVIEW are really worthless.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 13 of 16
(1,950 Views)

Ok,

So Action Engine it is. I will give that a shot. The other alternative is TestStand to share resources but I really really hate that piece of software......nothing but problems....my opinion of course.

 

Thanks all.

Message 14 of 16
(1,923 Views)

With my little knowledge I can tell an example scenerio-

Back at uni,


@vaibhav24121988 wrote:

Thanx to all ....Smart and helpfull info...



one of my class mate built a robot control system with visual recognition. The robot would run in default speed of 40mph when it sees the speed sign of 30mph it would slow down and keep this speed until it sees the 40mph sign again.

At above scenerio a notifier would serve the perpose but the queue would change the speed back to 40mph as soon as the 30 mph sign is removed from view.

0 Kudos
Message 15 of 16
(1,873 Views)

GOOD Can you provide disadvantage about notifier and queue?

0 Kudos
Message 16 of 16
(1,416 Views)