NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

calling pipeNight.ve from TestStand as String Value Test - no data returned!

Hi,

 

i was looking for a way to send commands to an application exe and discovered the pipeNight.ve in the following post.

http://forums.ni.com/t5/LabVIEW/How-to-pass-input-to-a-DOS-executable-that-is-running-in/td-p/176318...

 

This has worked fine from LabVIEW, after installing the oglib_pipe-1.0-1.ogp

The cmd line executable is opened and the return strings displayed in the data feild.

 

When i try to call this vi from a testStand sequence as a String Value Test - the executable doesn't seem to be called.

Has this something to do with the data format - ASCII String type in TestStand?

Do i have to convert it somehow?

 

I also noticed - that after calling the VI from TestStand. then trying to Run the VI standalone in LabVIEW - i get a "Speicher ist Voll" Failure notice - which seemed to be associated to the second OGPIPE_Close_Pipe function.

 

I would appreciate some help - getting this to work from TestStand.

Ideally i would like to open the cmd line - leave it open and be able to send a series of commands from as TestStands steps - before finally closing the execuatble session...

 

cheers

kech

0 Kudos
Message 1 of 6
(2,939 Views)

Are you specifying an absolute path or a relative path for the exe to launch? If you are using a relative path then it is relative to the current working directory which is likely different when run from TestStand, vs. run from labview.

 

-Doug

0 Kudos
Message 2 of 6
(2,916 Views)

Same result with Absolute path. The executable is not triggered...!?

0 Kudos
Message 3 of 6
(2,906 Views)


 

When i try to call this vi from a testStand sequence as a String Value Test - the executable doesn't seem to be called.

Has this something to do with the data format - ASCII String type in TestStand?

Do i have to convert it somehow?


 

cheers

kech


What exactly are you passing in or out of teststand as a string? Why do you think that might be an issue?

 

-Doug

0 Kudos
Message 4 of 6
(2,887 Views)

Hi Doug,

 

I have now used the complete Path for the exe as a Local Variable and it works. (?)

 

A follow up question - perhaps you can help without opening a new post.

For the String Value Test - how can define in the Limits that only a part of the returned/read string is matched.

i.e. the return message from my UUT will be for example "***Firmware v2.0.1"

Is there any custom property which checks the string for specific content - similar to Java's contains() method or VBA's InStr function.

 

cheers

kech

 

0 Kudos
Message 5 of 6
(2,882 Views)

If the local variable works for the full path the problem you are hitting is that you were probably unaware of the C-style string unescaping that teststand does in string literals in expressions. In an expression string literal the backslash character is an escape character so to have an actual backslash in the string you need to use two backslashes or use the @ symbol to denote a string literal which should not be unescaped. For example:

 

"C:\\mydir\\myfile.txt"

 

or

 

@"C:\mydir\myfile.txt"

 

For your follow up question I think the easiest thing to do is use a pass/fail step instead and set the Data Source expression to something like:

 

Find(Locals.mystring, "stringToSearchFor") >= 0 // -1 means not found

 

-Doug

0 Kudos
Message 6 of 6
(2,863 Views)