03-12-2020 07:18 AM
Hi,
i build a small datalogger. It works now fine.
But i have a strange effect at tdms datalogging. It always stops at around 3h. Sometimes with error 6, sometimes not.
Samplerate is 100 and samples 100,too. So should be 100Hz.
03-12-2020 07:29 AM - edited 03-12-2020 07:32 AM
What version of OS (32/64?)
File size after stopping?
And what file system?
You may have reached the file size limit in your environment.
upd:
Also show your source code if it is really small. Maybe there is some kind of mistake
03-12-2020 08:07 AM
I´m using windows 10 64bit professionell. Filesystem is NTFS?
Labview is 2016 32bit.
Filesize of tdms is ~15mb after ~3h
03-12-2020 08:19 AM - edited 03-12-2020 08:21 AM
Hi Hulk,
@Hulk1978 wrote:
But i have a strange effect at tdms datalogging. It always stops at around 3h. Sometimes with error 6, sometimes not.
You are constantly opening the TDMS file, but you are never closing the file!
Open the file once on "start logging" and close it once at "Stop logging", but use the file reference in between!
Btw. is there a reason to have a space at the end of the filename of "create path " VI?
03-12-2020 01:00 PM
Hi Gerd again,
You are seeing all, the space was not wanted.
---
Open the file once on "start logging" and close it once at "Stop logging", but use the file reference in between!
I´m sorry but i didn´t understand
03-12-2020 03:11 PM
Hi Hulk,
@Hulk1978 wrote:
Open the file once on "start logging" and close it once at "Stop logging", but use the file reference in between!I´m sorry but i didn´t understand
Right now you open a new file ref with each iteration, but NEVER close all those references. Both is bad: no need to open so many references, and each reference you open should be closed too.
Simple solution: open the file once when you start to log data, and close the file once you stop the logging!
03-12-2020 04:50 PM
Note that you could use a shift register in the second loop, but since it's a reference it shouldn't matter for this case.
03-12-2020 09:53 PM
As a quick further note on references and shift registers:
03-19-2020 06:36 AM
Hi guys,
i tested the version with permanent open and close the tdms file. That´s not possible. System performance is going down.
The second solution is not possible because i need to open the file inside of while loop. I´m sending the path from the event struct.
Any other solutions?
03-19-2020 06:50 AM
@Hulk1978 wrote:
i tested the version with permanent open and close the tdms file. That´s not possible. System performance is going down.
The second solution is not possible because i need to open the file inside of while loop. I´m sending the path from the event struct.
Any other solutions?
Naturally, it is crazy to open and close the file at every step.
It is very possible to open the file “before” the cycle, for this you need to learn two simple mechanisms: a state machine and a shift register.
Here are three cases in ONE loop. You do not need to do three separate cycles, I showed them only to understand what is happening in hidden cases.