NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand New Thread VS LabVIEW "Call & Forget" Asynchronous call

Solved!
Go to solution

Hi everyone,

 

Here is an example taken from the ni.com website showing how to use LabVIEW to post a TestStand Notifier.  I have modified the example to fit the situation I needed to use it for.  I have an example which works fine (When I use a TestStand new thread to launch the Notifier VI) and an example which does not work (When I use a LabVIEW "Call & Forget" Asynchronous call to launch the Notifier VI).

 

I would like to understand why it doesn't work in the second situation. The reason why I would prefer the 2nd situation which currently doesn't work is that I try to eliminate all multi-threads from an obsolete sequence written by someone else a few years ago so that I can troublesoot it and update the code to make it work with today's new reality.

 

Also, for my personal knowledge.  I don't understand why the second strategy doesn't work.  The Testsand notifier reference is the same and hadled the same way.  I have included my example files with the 2 situations in seperate sequences files.

 

Thanks in advance to the person who will be able to enlight me.

Nien 

0 Kudos
Message 1 of 6
(4,775 Views)

Hello Nien,

 

Which example did you modify?  And what did you change?

 

Thanks,

Jonathan R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,737 Views)

The original example is called "Using TestStand Notifiers within LabVIEW" and is found here :

 

http://www.ni.com/example/30111/en/

 

The main modification is the use of the "Call & Forget" asynchronous call in my example that doesn't work.

0 Kudos
Message 3 of 6
(4,724 Views)

Hello Nien,

 

This isn't a TestStand issue.  I suggest you take this to the LabVIEW forum.  Looking over your code your Notifer and Forget.vi is dependent on the notifier.vi.  So it's not necessarily anything wrong with the sequence steps but actually within your LabVIEW code itself.  One suggestion is to insert a simple error handler.vi in your Call Notifier and Forget.vi.  You have error wires connected to the functions itself, which is good practice but you don't have anything to inform you if an error occurs or not.  I would suggest you to run try to debug your LabVIEW code, such as using highlight execution, while you're running your code so you know where exactly the error is happening.  

 

Thanks,

 

Jonathan R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(4,713 Views)

Thank you Jonathan for your input,

 

I did probe both .VIs for error prior to write my post.  I have put a probe on every error wire within both .VIs and I could not find an error generated by LabVIEW

 

I was thinking that maybe I needed more reference info like the Sequence context or maybe I should not close my Notifier Reference inside Labview but Inside TestStand but it does not help.  I will certainly try to post in the Labview forum.

0 Kudos
Message 5 of 6
(4,700 Views)
Solution
Accepted by topic author Nienscecco

Hi again,

 

It's true that I do not get any errors within the error wires "bus" when trying to set the Notifier from LabVIEW but now I have noticed what is wrong. In my example which doesn't work, the TestStand Notifier Reference is a valid reference inside the "Call Notifier & Forget.vi" but it has become an invalid Refnum once inside the "Notifier.vi"

 

You are right that it is not a matter for the TestStand forum.  It's only LabVIEW related. If I run the "Call Notifier And Forget" VI only using LabVIEW, I see that any reference (such as a Queue reference) has become an invalid Refnum once inside the "Notifier.vi".  It seems it is not possible to carry a valid Refnum trhough a "Start Asynchronous Call" Node.

 

I will try to get some input in the labview forum.  Sorry for being totally off topic here

 

Nien

0 Kudos
Message 6 of 6
(4,675 Views)