LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write To Measurement VI save in multiple files

Hallo,
I use a Write to Measurement File VI ín a loop to save my experimental data, and activate it with a button. During execution, after deactivation when I press the button again, the data will be saved in the existing file. I'd like to know how to save data into different files after even activation.
 
Since I run this vi file, my computer frequently comes to crash. Is it normal for use of DAQmx?
 
redarmy
0 Kudos
Message 1 of 7
(3,828 Views)

Below is the Write to LabVIEW Measurement file properties screen. This should automatically pop-up when you drop the function on the block diagram but you can always select it by right clicking on the function. If you wanted multiple files, you should have selected the Save to series of files option.

And no, it is not normal for the program to keep crashing. What version of DAQmx and LabVIEW are you using? What is the OS and how much mrmory does the pc have. There are numerous ways to incorrectly use memory. It would help to see what you have written.

 

Message Edited by Dennis Knutson on 06-29-2007 09:54 AM

Message 2 of 7
(3,825 Views)
Thank you for your reply.

I've tried Save to series of files. With that setting, the target directory is full lvm files.

On my computer I have
NI-DAQmx Version 8.5 for Windows 2000/Vista x64/Vista x86/XP
LabVIEW Professional Development System Version: 8.2
Windows XP
512 MB




0 Kudos
Message 3 of 7
(3,811 Views)
I don't quite understand what you are saying. In your original question, you said you wanted to save to different files. Explain in more detail exactly what you want to do.
0 Kudos
Message 4 of 7
(3,804 Views)
Ok, let me put the story in this way:

During execution, I press the button once, then deactivate it, there is a lvm file in the desired directory. If I delete the file, and press the button again, then deactivate it, there will be NO lvm file in the aforementioned directory. As a result, I have to stop the vi and restart for a new run.

I'm looking for an approach to save the data files in the desired directory with different names corresponding to each activation of Write to Measurement File.

BTW, I'd like to generate a square wave with adjustable duty cycle, i.e. the ratio of the high period to the total period of a square wave. Where could I find such examples?
0 Kudos
Message 5 of 7
(3,799 Views)
Okay, I understand now. One way is to pass in a file name that gets modified each time you call the Write to LabVIEW Measurement File. For example, inside the case statement you have, append the current date/time to the base file name. Another would be to append a number. Increment the number and store it in a shift register.
Message 6 of 7
(3,790 Views)

I am going to reopen this issue.

 

I want to save data in XML format, I want to save this data every minute in differents files with different names. To obtain it , I configure the Write to Measurement File.vi, I select "Save to series of files", and then configure the settings. Finally, I click OK.

 

After this, if I open the Configure Write to Measurement File again, the option "Save to series of files" is not selected, I do not understand it.

 

To solve this problem I have tried to add the hour to all the files, like this, and save the data without "Save to series of files":

write.JPG

But, when I add the hour to the filename, the program does not create any file (there are not errors). This problem does not exist if I do not add the hour to the filename.

 

Thanks for your comments.

 

Regards.

 

 

 

 

0 Kudos
Message 7 of 7
(3,393 Views)