NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP not working in TestStand, but same commands work in LV

Solved!
Go to solution

I'm working in TestStand 2020 with LabVIEW 2020.  I have a test program that is using UDP to communicate with a unit being tested.  I have steps in a sequence file that Open the UDP Session and it saves the UDP Session ID to a number variable.  Then I try to set the buffer size using the variable and it throws an error from LabVIEW.  I get Error Code 1.  It says "An Input Parameter is invalid.  For example if the input is a path the path might contain a character not allowed by the OS such as ? or @. Command requires GPIB Controller to be controller-in-charge." This is very odd because I'm not using GPIB at all in the test setup.

 

I've tried skipping the set buffer size VI and go straight to just sending messages to the UUT and I get the same error message returned regardless of the UDP VI I'm using.  Open UDP Session works great, no error,  I pass in my port number and it gives me a valid UDP Session ID.  I've traced that session ID through all the VI's that get called after open session, and it remains constant in each VI that is called from the sequence.

 

I've created a VI that uses Open session, then set buffer size, then communicates with the UUT and it works just fine.  I can also call this VI from the sequence in TestStand and it operates normally.  However if I try to call another UDP VI after that, I get that same error again.  It's only happening in TestStand.   It's like the connection is opened when called, but it is closed when the VI passes back to TestStand.  The kicker is that I can run a sequence from another test program that will open, communicate, and close through UDP with no issues - on the same test PC.  I've gone through each step with as much detail as I can and replicated it step for step, even copying the VI's from the working sequence directory into my directory, and it still doesn't work on my sequence.  I can't for the life of me figure out why this is happening.  Any help at all would be much appreciated.  I'm almost certain there is a setting somewhere that I'm missing, but the best I can tell everything is identical to the working sequence.  

0 Kudos
Message 1 of 4
(1,012 Views)

Hi

 

Have you tried debugging into the LV code from TestStand and find at which place the eror is coming.That should give some clue.

 

Ravi

0 Kudos
Message 2 of 4
(967 Views)

Yes.  The error comes from any UDP call that is not the Open UDP call.

When I build a VI that includes the UDP Open call as the first step, the VI operates normally.  When I try to pass out the UDP Session Reference from the VI with the UDP Open call back to Test Stand I will get errors for every other step that tries to access UDP functions.  It seems as though LabVIEW is closing the UDP session every time the VI finishes running and passes control back to TestStand.

0 Kudos
Message 3 of 4
(929 Views)
Solution
Accepted by UnkleQuacker

I figured it out.  

In TestStand go to the Configure menu and select Adapters.

In the Adapters window, select LabVIEW then click on Configure to bring up the LabVIEW Adapter Configuration window.

Select the Advanced tab and make sure that "Reserve Loaded VIs for Execution" box is selected.

 

 

This makes sure the UDP session doesn't close when control is passed back to TestStand from LabVIEW. The UDP session should be stored in TestStand as a variable with type Number using the default format for the variable.

Message 4 of 4
(905 Views)