09-05-2011 05:40 AM - edited 09-05-2011 05:41 AM
Hello!
I am trying to use "Write to measurement file" express VI to write TDMS data obtained from DAQmx in LV2011. Each run of the same write function creates new file.
It seems that last written file remains to be opened until program stops or next file written. It has 0 size and it is not possible to access it from other programs.
Is it possible to save file immediately and close it?
Solved! Go to Solution.
09-05-2011 06:43 AM
I think you have answered your own question. You just need to close the reference to the file right after the data is written. If you post your code that isolates the issue, we can suggest some ways.
09-05-2011 07:42 AM
There is no reference out for express VI... Only filename out. That is why it is not so clear at the moment hot to close reference.
09-05-2011 11:08 AM
Ok, zero file size was due to nothing actually written (demo mode, without hardware attached...). When I write some data, file size is not zero and doesn't change after.
But file timestamp is changing after next file in sequence is written. So I am using "file created" instead of "file modified" attribute and it is enough for me now.
09-08-2011 02:18 AM
It seems that anyway something is wrong with my express VI...
Everything is OK when runningV from labview environment. But building exe leads to the errors in this express VI. Additionally, I am unable to debug exe - debugging fails with fatal error after downloading all Vis... One problem was with non latin charcter set used in the path. Now there is another problem, which I have not defined still.
09-09-2011 11:18 AM
Hello Baturin,
Thank you for bringing this issue to the forums. How exactly are you creating your executable? Are you following a specific tutorial?
Here is a tutorial on how to create an exe. I have reproduced your issue on my side and I do not get an error.
Please make sure you are following these guidelines:
http://zone.ni.com/devzone/cda/tut/p/id/3303#toc1
You will be interested in the section, "Stand-Alone Applications."
Also, are you running this executable on a computer with LabVIEW already installed on it? If not, you have to install the correct Run Time Engines and Drivers. This is also described in the previous link under "Installers (Windows)."
Thank you,
Vimal Fernandez
09-09-2011 01:30 PM
It seems, that wiring "DAQmx task" (for AI task) to "Write to measurement file" express VI does not works in my case (only in exe).
The error is the same as file not found (error code 7), but file is created. Something gets wrong inside express VI. I am unable to debug exe, so I have just disconnected DAQmx task from express VI (really don't specially need it anyway).
For sure, the same LabVIEW version and drivers are installed on target and VI is working in it as well as at dev machine.
Debug error which I had encounter is already published in the forums elsewhere. It seems that the problem is in VI without block diagram inside hierarchy. Maybe with Express VI.
PS test app writing tdms files the same way is working like a charm (without DAQmx task wired).
So, thank you for yor advices, the problem seems to be solved. Maybe I will have a look in more details about the reason of such error, but can't do it now.