10-28-2013 10:01 AM
Hi,
i was looking for a way to send commands to an application exe and discovered the pipeNight.ve in the following post.
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
10-29-2013 10:06 AM
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
10-30-2013 03:13 AM
Same result with Absolute path. The executable is not triggered...!?
10-30-2013 09:38 AM
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
10-30-2013 11:22 AM
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
11-01-2013 09:33 AM
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