LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using notifier to trigger waveform generator

Solved!
Go to solution

Hello,

 

I am trying to create a VI that generate a finite waveform when the START button is pressed.

 

To do this I modified the example "Voltage Finite Output" to my need, and has successfully made the VI: when I press the START button, the signal is generated.

But when I created notifier with event structure to trigger the generator, I need to press the START button twice to trigger the generator.

 

So my questions are:

  1. Why does it happen? How can I fix it?
  2. Is there any benefit using notifier and event structure in my case? I read that notifier is usually used for the interface (like this), and event structure is better because the while-loop does not read the status of the button all the time. But my consumer loop is still working all the time, is not it?

Attached are the snippet of the VI, without notifier (V Finite Output.png) and with notifier ( (V Finite Output (Notifier).png))

 

Thank you very much  

 

-Jane

Download All
0 Kudos
Message 1 of 3
(1,898 Views)
Solution
Accepted by topic author JCArifin

Did you try to debug your VI using the Highlight Execution? The "Wave" input should be placed inside case structure so its value it's read after pressing the Start button. Your consumer loop will not run continuously, it will iterate once for every notification received. If you send multiple notifications while your consumer loop is processing, they will be lost. Wait on Notification will return once only the last notification. A queue would work better in this case.

Lucian
CLA
0 Kudos
Message 2 of 3
(1,859 Views)

Hi CLA,

 

Thank you for your suggestion. Yes I think it happened because the notification got lost. If I wait for longer time (while observing the highlighted execution), it works fine.

 

-Jane

0 Kudos
Message 3 of 3
(1,810 Views)