NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

file path

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.

 

 

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 1 of 7
(6,282 Views)

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.

 

 

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(6,261 Views)

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

Message 3 of 7
(6,245 Views)

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

 

 

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 4 of 7
(6,209 Views)

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

0 Kudos
Message 5 of 7
(6,177 Views)

Yes, only from the analyzer. But code works fine except this error message that bothers me.

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 6 of 7
(6,168 Views)

Can you post an example or screen shot of the location of the error?

0 Kudos
Message 7 of 7
(6,153 Views)