03-16-2011 11:20 AM
Hello,
i'm using a VI in TestStand, I had trouble when writing a path to a local variable :"D:\Dev LabVIEW\Banc generique\Dev\Formation shared variables\Bibliothèque variables partagées.lvlib" testStand needs \\ instead of \.
So I changed my path into a string type (I later convert it into my VI), the VI runs fine in TestSTand but I have an error message unless I write it as "D:\\Dev LabVIEW\Banc generique\\Dev\\Formation shared variables\\Bibliothèque variables partagées.lvlib".
How can I configure TestStand in order to make it "right" in the analysis results section ???
Best regards
Rodéric L.
03-17-2011 02:16 AM
The problem is as you say when you pass a string that is used as a pathname from TestStand to LabVIEW you have to use '\\' instead of '\'.
What compounds the problem is that if the pathname is returned from LabVIEW to TestStand it will only contain a single backslash '\'.
Therefore you just have to decide whether to start off with double backslash or repace the single to double before passing it to teststand.
03-17-2011 10:42 AM
Double backslashes are only needed for string literals in expressions. (i.e. when you specify an argument with quotes and the string itself directly in the specify module panel). If you are passing a teststand string variable to the module you can just store the string directly without the double backslashes.
The only reason the double backslashes are need in string literals is that the backslash character in string literals is an escape character, for example "\n" means a carriage return character, not a backslash and an "n" character. Doubling the backslash makes the first backslash escape the second one.
Again, this applies only to string literals in expressions. Just regular string values are not evaluated like expressions are so no escaping or unescaping is done.
Hope this helps clarify things,
-Doug
03-22-2011 02:53 AM
Hi,
Of course I tried to pass a string, but it seems like TestStand (2010) sees it is a file path, and prompts an error message.
Regards
03-30-2011 01:59 PM - edited 03-30-2011 01:59 PM
Please clarify, where are you using this path? Maybe a screenshot or example sequence would help explain. Also, what error message are you getting and from where? Only from the analyzer?
Thanks for any additional info.
-Doug
03-30-2011 05:24 PM
Yes, only from the analyzer. But code works fine except this error message that bothers me.
03-31-2011 09:11 AM
Can you post an example or screen shot of the location of the error?