LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Whar are Notifiers,Queues and Semaphores?

Hi Friends,
 
I'm preparing for CLAD exam.
Next month i would be writing the exam..
So, can anybody clearly explain what's the difference btw Notifiers, Queues and Semaphores?
It would be appreciable if explained with an example????
 
Awaiting for ur reply...
 
Cheers,
Suneel.V
 
 
0 Kudos
Message 1 of 10
(6,769 Views)

Hi Suneel,

please see the shipped examples for more help. Smiley Happy

- Gerneral Notifier Example.vi
- Queue Basics.vi
- Semaphore with SubVis.vi

Hope it helps.
Mike

Message 2 of 10
(6,758 Views)
Also from the KB (ain't searching great?):

What is a semaphore?

What is a Queue?

What Is a Rendezvous?

What Is a Notifier?


To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
Message 3 of 10
(6,733 Views)

Sorry,

I've gone thru the link and also the example's but still i feel something hard to understand...

Can anybody help me to understand them in a easy manner....

 

0 Kudos
Message 4 of 10
(6,702 Views)
The shipping example Mike references are about as basic as it comes.  If your having trouble understanding these examples, you may want to delay your CLAD exam a bit longer.  That said, you probably won't see anything about semaphores, notifiers, and rendezvous on the CLAD.  Queues and Notifiers are more likely.   Can't hurt to undrstand them all thoughSmiley Wink
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 5 of 10
(6,693 Views)

Steve,

Those functions are not only for my CLAD but also for my program development.

I want to implement one of these functions in my VI, since i need to do some parallel operations simultaneously with a single button press.

My requirement is something like this.

  1. On a button press i've to start a timer and also at the backend do some operations
  2. Stop the timer on another press and show the value to the users.
  3. Back end i should use this Meter calibrate.VI

Thanks for ur prompt response.

0 Kudos
Message 6 of 10
(6,685 Views)
Hi suneel,
                 Heard of event driven programming.In most of the software application there will be a constant check for execption violation.Notifiers ques and semaphores are the structures responsible for event processing can be suspended until an event is waiting.

For your objective u can use 2 parallel while loops.There is no neccisity to use event driven programming until and unless you have the top priority as your memory resource and time optimization.


Hope it helps
Message 7 of 10
(6,676 Views)
Hi suneel,
                 Heard of event driven programming?In most of the software application there will be a constant check for execption violation.Notifiers ques and semaphores are the structures responsible for event processing can be suspended until an event is waiting.

For your objective u can use 2 parallel while loops.There is no neccisity to use event driven programming until and unless you have the top priority as your memory resource and time optimization.


Hope it helps
Message 8 of 10
(6,675 Views)

@muks wrote:
Notifiers ques and semaphores are the structures responsible for event processing can be suspended until an event is waiting.

An event structure actually does that. Notifiers and semaphores are not responsible for "event processing".


@muks wrote:
There is no neccisity to use event driven programming until and unless you have the top priority as your memory resource and time optimization.

I disagree completely! The user is talking about reponding to an event: a button is pressed. And besides, I fail to see what "top priority as your memory resource and time optimization" has anything to do with determining whether to write an event-drive program.

To suneelkv: I would have to agree that you may be trying to take the CLAD a bit prematurely. What you're asking about are fairly basic programming operations. You've said you want to do some operations in the "backend", but only said that you want to use "this Meter calibrate VI". What exactly is this? This is the first time that this has been mentioned. What other "backend" processes are you talking about?

You should spend some time looking at the LabVIEW examples that show you how to use the event structure. Also of use is looking into the producer-consumer architecture.

Message 9 of 10
(6,638 Views)
Sorry i hadnt briefed abt my project.
 
Let me tell u in brief abt my project.
We are using NI Vision for our project.
 
  1. WIth Camera we would be capturing a Speedometer (CLuster in automotive terms), a linear one from 0 to 220 Kmph.
  2. In lab view a basic example in Vision is MeterExample.VI, which will calculate the speed (please see the attached for ur reference)
  3. Now my req. is when it is calculating the speed of the pointer, i need to calculate the time it took to move from 0kmph to say some x kmph( 0-220)
  4. So i thought of a button pressed timer (see the attached)
  5. But the problem is both should happen simulataneously....

Actually my project have lot of VI's so i couldnt add anything here

So please let me know whether i've to go for these Semaphores and Notifers or not.

Cheers,

Suneel.V

 

Download All
0 Kudos
Message 10 of 10
(6,625 Views)