LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait On Notification not working

Hello all,

 

  I am having trouble getting a "Wait On Notification" to actually receive the notification I am sending it. I have used this same send/wait notifier methodology on two previous projects with no issues. I am starting a new project right now and I am having an issue.

 

  As can be seen from the image I attached, both the "send" and "wait" have the same notifier reference. Also, the sender's reference indicates there is in fact 1 "wait" waiting. Also, when I kill the notifier reference in the sender VI, the waiting VI errors out just as would be expected when the reference becomes invalid.

 

  Does anyone have any insight into what I might be doing wrong?

 

Thank you,

Corey

 

EDIT: To try and narrow down my problem I got rid of the VI register (used in the same way a FGV would be used) that I used to store and retreive the notifier reference. I now create the notifier reference in the main VI that I call both the "send" and "wait" VI's from. I send the reference directly into each VI's cooresponding input terminal.

 

WaitOnNotifier.JPG


Corey Rotunno

0 Kudos
Message 1 of 7
(3,397 Views)

If you've got code with a problem, you need to let us examine all of the code, not pictures of selected little pieces that don't seem to show the problem.  Attach the actual VI, and if the code is split among several VIs, compress the folder that contains all of them and attach the resulting .ZIP file.

 

Bob Schor

0 Kudos
Message 2 of 7
(3,375 Views)

I will have to try and reproduce the issue with new VI's....I cant share my VI's as they are right now. I can however add the following information I have learned since my first post:

 

It seems to be an issue related to the fact that my "send" VI is being called asynchronously from the main VI. When I send a notification from a different VI that I manually run from the project window, it works fine.

 

Thanks for the response though, I will follow up soon with a simplified set of VI's,

Corey 


Corey Rotunno

0 Kudos
Message 3 of 7
(3,364 Views)

I'm "thinking out loud" here ...  In order to get a Notification to pass in to the Asynchronous Call, you need to Obtain Notifier first (to set the Notifier Type).  If, somehow, you jiggered things so that the Notifier had not been Obtained before firing the Start Asynchronous, I can believe it doesn't work.

 

I've certainly passed Queue References into Start Asynchronous Calls, don't see why I couldn't pass Notifiers ...  Hmm, you haven't done something "silly" like Release Notifier early, have you?

 

Bob Schor

0 Kudos
Message 4 of 7
(3,355 Views)

I create the notifier before the asynchronous call is made, and no I didn't destroy it prematurely. Interestingly though, if I do kill it the asynchronous VI errors out just like it should.

 

 I just created a new project using the exact same architecture and everything works just fine. I am calling the "sender" VI asynchronously just like I did in the previous project. I don't get it. I can post the simple project, but I am not sure it would help being that it works just fine. I am starting to think my project could somehow be flawed? Like maybe I messed up the scope of the notifier reference behind the scenes? 

 

Its weird though, because the asynchronous VI acknowledges that there is somebody waiting on the notification but the VI that the notifier reference was created in just wont respond to it, it does however error out when you destroy it. Hmmm. Ill keep working and see if I cant get you a reproduction of my problem without just sending my whole project as is.


Corey Rotunno

0 Kudos
Message 5 of 7
(3,350 Views)

I have an update, if anyone is curious:

 

After being unable to re-create the issue in a more simplified VI, I slowly started from scratch a new VI. Little by little I re-created to original VI, waiting for it to break at every step along the way. Interestingly, the new VI I built works perfectly. I am certain the code itself is identical to the original VI; it is really a pretty simple VI so I'm sure I'm not just missing some subtle difference. Also backing this up is the fact that the identical copy of the VI still works in an older project.

 

I have a feeling something weird is going on with the scope of the notifier reference in relation to my project. The original VI was created in a different project then copied and added to my new project. I am currently trying to break it again by building a new new project. I have an open service request for this. If I find out definitively what is going on I will update this thread.

 

Thank you Bob for the help,

Corey


Corey Rotunno

0 Kudos
Message 6 of 7
(3,307 Views)

I know the feeling!  A month ago, I got a "We apologize for the inconvenience" crash when I ran an executable that ran perfectly fine in Development Mode.  It was doing simple A/D stuff, sampling 3 channels from a USB-6009 at 1 KHz.  When I sampled continuously, it worked fine.  When I went to code that sampled 400 points at a time (finite samples), Blooey!

 

I had a slightly older version of the code that ran fine in both modes.  When I tried to reproduce the failure, I couldn't!  While the failure was present, it was "definite", and I could even "demo" it to an NI engineer.  But after about a day, doing nothing with LabVIEW itself, only trying to recreate the crash conditions, I "failed to reproduce the failure".

 

Sigh.

 

Bob Schor

0 Kudos
Message 7 of 7
(3,286 Views)