NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand's Labview interface runs with no errors yet fails tests that use serial communication VI's.

I am using Teststand 2013's provided FullUI Labview interface to try and run single pass tests on Teststand sequences. The User Interface runs with no errors, and it appears as if it is preforming the sequence, but the tests that use the NI Modbus VI library fail. Those VI's are using station global variables as communication settings, and when I break the sequence, the station globals tab has the correct values for the variables. These sequences all work as intended when run from Teststand's Sequence Editor, it's only when I try and use one of the User Interfaces that they fail.

 

System: Windows 7 64-bit, Teststand 2013 f1 (32-bit), Labview 2014 14.0f1 (32-bit)

0 Kudos
Message 1 of 10
(5,536 Views)

Can you give more details?  When you say fail does that mean the report says it failed?  Or does the report say Error?  If it errors what is the error message?

 

If it fails which step failed and how did it not meet the limits?

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 10
(5,519 Views)

Sure, I'll try and elaborate on the issue more.  The report says Failed.  The tests that are failing are numeric limit tests which take their inputs from serial communication Modbus VI's.  The VI's are supposed to communicate with an external device using Modbus protocols and return the values of Modbus registers. Instead they are always returning a value of 0, as if they never communicated with the device. Furthermore, I can visually confirm that no communication is occuring, as there are LED's on the usb to RS485 converter that normally flash when the device is communicating. No error messages occur besides a start-up message about the Teststand Service not starting up promptly. Again, the part that confuses me is that I am able to run these sequences on Teststand's Sequence Editor with no issues, it's only when I attempt to use the User Interface that they fail.

 

Thank you for your help, and please let me know if there is anything else that would help in diagnosising this issue.

Conrad T

0 Kudos
Message 3 of 10
(5,498 Views)
What does I/O Trace show? Can you attach an image of this start up message?
0 Kudos
Message 4 of 10
(5,496 Views)

Are the OI and Seq Editor on a different machine?  If so then it almost feels like you are missing a driver or something in MAX isn't set up right.  My guess is that it could be erroring down in one of your VIs but somehow that isn't being passed back up to TestStand and it is just getting suppressed somehow.

 

Did you use the TestStand deployment utility to deploy the automation?  Did you change any of the adapter settings (for instance from LV development to LV runtime)?

 

If they are on the same machine then I would expect no change from the Seq Editor to the UI.   Both just facilitate the engine to execute your code.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 10
(5,491 Views)

This is all run on the same machine. I have not used the Teststand's deployment utility, or changed any of the adapters.

 

I hadn't run it with the I/O trace running, I am still low on the learning curve of both Teststand and Labview. A quick attempt with the I/O trace recording shows some possible clues to follow. However, thanks to your suggestion jigg I realized that the VI's have a Display Errors Control that had been defaulted to False. After changing a small subsequence to have the Display Errors to true, I found that errors were indeed occuring that were not propagating to Teststand. The error occuring is as follows: Error -1073807346 (Hex 0xBFFF000E) The given session or object reference is invalid (The error message is attached below) This led me to probe the serial port in the Modbus VI, where I found that the VI was not receiving a valid input. So somehow the User Interface is not able to translate the serial alias defined in the StationGlobals into a usable Labview object.'

 

Thanks,

Conrad T

0 Kudos
Message 6 of 10
(5,474 Views)

Do you have both the Seq Editor and UI open at the same time?  And did you run the Seq Editor just before the UI? 

 

This error usually occurs because you are trying to access a VISA resource that is already open or you are not passing a good VISA resource to the VI.  One thing you can try is pause right before the step that is doing this and check your variables to see if the VISA resource is valid.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 10
(5,464 Views)

I've run the UI with both the Seq Editor open and closed. The Seq Editor is usually not run right before the UI.

 

I've paused the sequence in the UI and checked the variables to confirm they are still valid, and they are. The Serial Port alias is still "COM10" which it should be. I have also tried creating a LabViewIOControl Container that contains the alias name and session id instead of just passing in a string. In addition, I have the VI open and set to highlight execution as well as have the Serial Port input probed. The value that the serial port recieves when the UI calls the VI is not a valid one. Instead of taking the alias and converting it to the type the VI needs, it has a value of "unnamed port" or something to that effect.

 

After a few days messing around with the sequences in teststand, I finally appear to have found a way to make the UI work.  I created a LabVIEWIOControl StationGlobal variable that has the settings I need and replaced that in the VI calls. This appears to fix the issue where the UI wouldn't convert the string alias into an actual SerialPort variable for labview to use. I will continue to look into it, as now my issue with this fix is I would have to edit each step in every sequence that uses this VI. I am looking into using ActiveX cpde to accomplish this automatically.

 

Thanks,

Conrad T

0 Kudos
Message 8 of 10
(5,425 Views)
The UI should have nothing to do with what is pass to the VI. It should not be converting anything to anything. All of this is should be strictly done by the sequence itself. Why don't to post an example sequence to show what you are doing?
0 Kudos
Message 9 of 10
(5,414 Views)

Here is a sequence with just one action showing what kinds of calls/steps are being made and how. Of course you will not be able to actually communicate with a similar device to ours, but if you define StationGlobal variables as found in the parameters of the VI call made, you should be able to replicate the conditions that are occuring at my workstation. Running this sequence in the sequence editor works as expected, but running from the  Full Featured UI causes the SerialPort control in the Labview VI to receive an unnamed task variable.

 

The NI Modbus Library included (I believe also found here http://www.ni.com/example/29756/en/ ) will need to be placed in the vi.lib folder to use the Modbus VI.

0 Kudos
Message 10 of 10
(5,363 Views)