LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Notifiers not working, when use consecutive create notifier vis without delay

Solved!
Go to solution

Hello,

 

I am trying to use notifier for synchronization within my code. My project requires sender program to send a command to multiple receiver programs. The sender program has to wait for response from all the receiver programs to proceed. I am using user event to send the command from sender program to the receiver programs. And receiver program has to set the notifier after it receives the command. Sender program will wait on notifier. 

 

If I don't have any delay between subseqent notifier create vis, my wait on notifier always results in timeout for some of the receiver programs. But when I include a small delay between subsequent create notifier vis, then wait on notifier receives all the notification without timeout.

 

For me it looks like a LabVIEW issue, but I wanted to hear from others, that is there anything wrong in the implementation?.

 

I have attached a small sample program for reference. Open up the sender program, configure no of receivers and run the program. Click the send and receive button to send user events and wait on notifiers.

 

Thanks in advance,

Nanda

Nanda
0 Kudos
Message 1 of 13
(3,635 Views)

It seems to work just fine for me in LV 2014.

0 Kudos
Message 2 of 13
(3,621 Views)

I can repeat this issue in LV 2013 SP1 32 bit and 64 bit versions in multiple computers. We may not see this issue when the no of receivers is 2. But when we give no of receivers 5 or 10 and delay to false, we can see the issue.

Nanda
0 Kudos
Message 3 of 13
(3,619 Views)

Capture.PNG

Lets look at that highlighted wire.  What is it a reference to?  The Clone you just launched or the reenterant original

 

The FP Open method is a bit archaic for launching clones look at using a Asynchronous Call By Ref and use the old "Fire 'n' Forget

Capture.PNG

 

And, Name your events so they are different!


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 13
(3,606 Views)

Jeff,

 

Thanks for your post. I am not sure if using start aynchronuos call vi may solve the issue. I can clearly see the user events captured in the receiver vis and notifier reference is valid. So the problem may not be in the way that we call the reenterrant vi.

Nanda
0 Kudos
Message 5 of 13
(3,596 Views)

Crosspost

 

I think I figured it out over there. You are waiting on each notifier one at a time in the for loop, so you wait 1 second before waiting on the second notifier, and it might be set before you are looking at it...but now that I think about it it should still be set shouldn't it?  Because of the Ignore Previous is false.

0 Kudos
Message 6 of 13
(3,588 Views)

Yup, ignore previous is set to false. It is supposed to work I guess. Now if we enable a delay using boolean in the front panel, it starts working. 

Nanda
0 Kudos
Message 7 of 13
(3,581 Views)

@Nanda1985 wrote:

Yup, ignore previous is set to false. It is supposed to work I guess. Now if we enable a delay using boolean in the front panel, it starts working. 


 

It also starts working if you turn on for loop parallelism, at least it did in my quick testing.

0 Kudos
Message 8 of 13
(3,576 Views)

No for loop parallelism didn't worked for me either. I am using number of receivers as 10.

 

 

Nanda
0 Kudos
Message 9 of 13
(3,570 Views)
Solution
Accepted by topic author Nanda1985

Something like this would be more riggorous:

Capture.PNG

 

As you have your code their is a 10 second delay if you abort the first spawned vi.  Add a little Info in the notifier to determine Which reciever died


"Should be" isn't "Is" -Jay
Message 10 of 13
(3,561 Views)