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: 

EXE not writing to TDMS files

Hi folks,

 

I am using LabView 8.20 on a Windows XP machine.  The application generates TDMS data files and all works fine in the development environment.  When I compile the TDMS files are not written to correctly.  The files are created (I can see them appear in the folder at the appropriate time) but no data is written to them. 

 

The app uses absolute paths to the files, so the issue with stripping the extra layer off the EXE path does not apply. 

I have USI installed.

 

Any ideas how I can look deeper into this, or if this is a know bug that has been solved? 

 

Thanks,

Ian

0 Kudos
Message 1 of 15
(3,633 Views)

Hi Ian, 

 

Is that convenient for you to post a VI to reproduce this problem here? So that we can do some investigation on your problem. Thanks.

 

Yongqing Ye

NI R&D

0 Kudos
Message 2 of 15
(3,613 Views)

I spent a while trying to find the point of the problem, and I am closer now. A TDMS file is created from a valid path, and a refnum generated.  The numeric value of this refnum is 1 in both the development system and EXE.  The attached screen section shows where this happens, and the refnum being passed into another VI, Set File Info.  This VI is posted.

TDMS Save Pic 1.png

 

The test details are handled correctly, but the TDMS Write block generates error 1, Invalid input parameter.  This error only occurs in the EXE, not the development system. 

 

Any ideas?

 

Thanks,

Ian

0 Kudos
Message 3 of 15
(3,598 Views)

I remember in EXE, the file path is different in some cases, but I couldn't remember all the details, sorry.

 

I would recommend you check the file path  in both VI and exe to see whether they are the same.

0 Kudos
Message 4 of 15
(3,588 Views)

 

I have some similar problem, but I have problems in the both execution modes, exe and in developmen mode, i send the basical example of code, and the tdms file result, at start, work properly, but in some moment the tdms writer rutine "is out" and don´t work, but after some time, in some times short time(some seconds), at other times very long time (hours), the rutine himself restart to work, !!!!incredible!!!!!

 

 

 

 

can you help me???? 

Download All
0 Kudos
Message 5 of 15
(3,571 Views)

Hi Joju,

 

I took a look at your attached VI. What I'm curious is why you used 2 while loops. I don't think it's a good idea of using the 2 while loops there especially without close and reopen the file. TDMS Standard API nodes has a global lock (mutex) on each other, in another word, the node will block each other, maybe that can somehow explain why you saw the rutines stop or restart to work.

0 Kudos
Message 6 of 15
(3,549 Views)

If you are using a VI's path as your starting point, you will have to strip an extra layer in an EXE.

 

executable path.png

 

 

0 Kudos
Message 7 of 15
(3,543 Views)

Hi Yongqing Ye;

 

I agree with you, but this Vi, it's only a test Vi, don't matter this double loop, without the second loop the problem it's the same, the writer vi's don't work at some moments, for some soconds or minutes and after this it's rework rightly, without errors, I don't know. have you some idea?????? 

0 Kudos
Message 8 of 15
(3,538 Views)

Hi Joju,

 

I don't have a specific idea for this behavior. Do you have any problem for this or it's just your observation? I guess that can be because the nodes block each other, but not very sure, and I couldn't reproduce what you saw by running your attached VI.

0 Kudos
Message 9 of 15
(3,536 Views)

I have a severe problem, with a big aplication, this vi's is only a simplification of the problem, if you run this vi, you can reproduce the issue, I found a unique method to work rightly, that is: TDMS version 1.0, buffering size 0, and defracmentation of TDMS at the end of generation, but I'm not sure of realy stability of this option.

0 Kudos
Message 10 of 15
(3,533 Views)