LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trying to automatically copy file and rename with date and time

I am trying to monitor a file's size and when it gets too large I want to move it to a new location with a new name consisting of a time/date reference as well as the original name.  I then need to create a new file (empty) with the original name so the main vi can continue storing its data.  I can get much of this to work, however i end up with DMA access errors and the vi eventually must be aborted.  My file does end up relocated and the new one created at the expense of the application running.  I am just writing data, not using the spreadsheet express vi.  Does anyone have an example of how this can be done, or at least an idea of what may need to be done to clear up the errors? 
0 Kudos
Message 1 of 3
(2,696 Views)
Could you provide a bit more details about your "DMA access error". This sounds very odd.
 
Would you mind attaching a simplified version of your VI?
0 Kudos
Message 2 of 3
(2,688 Views)
Can you send us a screenshot of the DMA error you are getting? I'm not sure why you would get a DMA error while doing file I/O. However, here are some things to keep in mind when solving this problem.
1) Be sure that you are not writing to the file while you are performing the moving and renaming actions. i.e. they should not act in parallel
2) Be sure that you close the reference to the file before you move/copy/rename the file
 
I am attaching an simple example of how I would go about doing it. Hope it helps.
 
 
Jack J.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,674 Views)