LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy way of creating file names

I have a re-entrant subvi that I am using for over 100 times. I have to log the data from this subvi to files. But dont understand how to create file names at once. Is there any way to do this?

0 Kudos
Message 1 of 5
(3,007 Views)

What do you mean by "at once"? Is there a pattern to the file names?

 

Typically you would use FOR loops and iterate over the parts, either generated based in [i] or from autoindexing.

 

Can you show us a typical list of file names you want to generate?

0 Kudos
Message 2 of 5
(2,998 Views)

Hi Altenbach,

I have a 1-D array of data of multiple channels which has names. Yes there is a pattern to the file names. Each label should be appended a P and V so that I get two file names for peak and valley.

For example if I have a name/label of Sgt-21 by appending P and V I would get Sgt-21_P.txt and Sgt-21_V.txt which would be the peak and valley file name.

 

 

0 Kudos
Message 3 of 5
(2,989 Views)

kanye,

 

You can use the concatenate string VI to build file names with P or V at the end.  As altenbach said typically one would create these files in a for loop and use the iteration to generate file names.  Please let us know if this helps, or if you are still unable to get your files named correctly.

 

Regards,

 

Sam K

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 4 of 5
(2,938 Views)

Try something like this, modify as needed....

 

Message 5 of 5
(2,927 Views)