NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Information From LabVIEW to TestStand Using a TestStand Notifier and the SetEx Method

Solved!
Go to solution

Hello all,

I'm attempting to use the dataPropObj parameter of the SetEx method to send information from LabVIEW to TestStand while setting of the notifier. The notifier works perfectly by itself when I wire the default constant empty variant to the dataPropObj input of the INotification invoke method node, however anything else that gets wired in causes some kind of problem. I've tried wiring a string (which according to the SetEx description, should work), as well as a string converted into a variant. Whether or not the string is empty, neither works. TestStand hangs at the step which is waiting on this notification. Again, the notification works fine when I only wire an empty variant constant to the dataPropObj input.

All of this is to work as part of a bigger VI, but I've extracted just this functionality out to its own sequence and vi, so there shouldn't be any other interfering factors that I can think of. If it makes a difference, the VI is called asynchonourly during the Cleanup group of the MainSequence. I do this by calling a subsequence as a new thread.

 

Any help is appreciated.

 

Thanks

0 Kudos
Message 1 of 3
(2,998 Views)
Solution
Accepted by topic author smrgregoire

You need to use Engine.NewPropertyObject() to create the variable you pass for the dataPropObj parameter. For example, if you want to pass a string you need to do the equivalent of:

 

PropertyObject myPropObj = Engine.NewPropertyObject(PropValType_String, false, "", 0);

myPropObj.SetValString("", 0, MyStringValue);

 

Hope this helps,

-Doug

Message 2 of 3
(2,992 Views)

This worked exactly as you described. Thanks!

0 Kudos
Message 3 of 3
(2,978 Views)