From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

specify a relative path with "write to measurement file"

How can I specify a relative path with the express VI "write to measurement file"?

 

It seems that it only accepts absolute paths as input.

 

Thank you

0 Kudos
Message 1 of 11
(4,525 Views)

Relative to what?

 

In short, you have to take your relative path and use Build Path in order to create the absolute path.  Here's an example using a relative path from the current VI's path.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(4,523 Views)

Sorry, relative to the folder where my labVIEW project is saved into

 

Thanks for the reply

0 Kudos
Message 3 of 11
(4,516 Views)

That's actually easier


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 11
(4,509 Views)

Hi, I have a similar question - how to specify a base path with "write to measurement file"? I want to set a base path for "write to measurement file", and let "write to measurement file" itself to define the series of files name. Is it possible? Thanks~

0 Kudos
Message 5 of 11
(4,141 Views)

Why don't you add a timestamp or something that means something to you at the end of the file? 

0 Kudos
Message 6 of 11
(4,135 Views)

That's exactly what I am trying to do. My thought is: firstly give it a base path, which is chosen by a higher level operator, then give it a relative path, which is chosen by a lower level operator, and then the series file name is defined by time stamp. And is it possible to define the base path by wiring it to "filename", and define the relative path and file names in the dialog box? Thanks~ Now what I did is to build the path first (combine base path and relative path/file names together), then wire it to the "filename". 

0 Kudos
Message 7 of 11
(4,106 Views)

If you already know how to build up your path then I do not see the issue. Express VIs would have to do the same thing inside if there were a "relative path" option, but it sounds like there isn't. If it is just taking up too much space on your block diagram, you can always put it in a SubVI yourself. Was that your main concern?

Message 8 of 11
(4,099 Views)

Yes, I agree with you - there is no relative option here, so I have to build the paths first. My concern is simple, I am just curious about how to write a relative path directly into the "write to measurement file". Anyway, thanks a lot for taking time answering. 

0 Kudos
Message 9 of 11
(4,067 Views)

Write to Measurement doesn't look for a relative nor an absolute path.  It looks for a path.  You simply wire a path in. 

 

You can choose to use an absolute or relative path to do this.  Have you tried using the relative path snippet posted just before your reply?  If that works for you (and it should), all you need to do is replace the "relative path" piece with with string you build.  You can make this string however you please.  Timestamps are a good choice.

 

Where exactly are you stuck?

0 Kudos
Message 10 of 11
(4,062 Views)