10-30-2018 10:44 PM
Hi,
Basically, I am trying to develop an application to write & read multiple waveforms continuously,
But due to continuous writing, tdms file size is increasing, thus leading to memory full issue & also increases the application memory usage.
Is there a better way to implement this application?
Thank you.
Solved! Go to Solution.
10-31-2018 05:05 AM
Hi,
The better way is to use a QMH model, Producer Consumer
I've made an example of its use,
see the attached pic.
10-31-2018 10:44 AM
Look at the example in the example finder "Concurrent access to TDMS File".
In your read make sure your are reading chunks of the data instead of the whole file, if you keep trying to read the whole file every time, then yes, eventually you will run out of memory.
mcduff
11-04-2018 09:11 PM
Hi mcduff,
Thank you for the suggestion of use of reading data in chunks,
While reading the file in chunks, I am able to read the file only once, thus unable to update waveforms in Read VI, Please may I know a better solution for continuous read operations.
11-05-2018 01:20 PM
Cannot help much without seeing the VI.
mcduff
11-06-2018 03:29 AM
Hello mcduff,
As you suggested, I have tried to read only required number of points, thus avoided the memory crash issue,
But I also want to continuously update the charts in the read VI, for example if any pulse width changes are made write VI, it should be reflected in read VI.
As of now charts in read VI is being updated only once, find the same in the attachment.
Please help me to tackle this issue.
Thank you.
11-06-2018 07:58 AM
Hi ACAT02,
You want to write data and at the same moment read from the same tdms file or just when you have pulse width variation,
as i suggested you can use a QMH model where you can add another consumer loop to display your graph or even use a DVR (Data Value Reference) in your Read VI, and have a sufficient ressources to do so,
also in your writing VI do you really need to display the Charts?
11-06-2018 10:24 AM
If you continuously to write your file, and try to read it ALL, you will eventually run out of memory.
In your read vi, VI_2, you are reading the same points over and over again. You need to account for the offset, see below. You should decimate your data, your plots are about 200 pixels wide and you want to plot 10000 points on those 200 pixels, that is 50 points per pixel!
mcduff
11-06-2018 10:15 PM
Thank you mcduff for the suggestions, it has solved major part of my application.
Thank you simo22 for your suggestions, I will try to work on it.
Is there a way to put a limit on tdms file size, and on reaching max file size, Is it possible to delete old data & store new data?
11-07-2018 02:59 AM
@ACAT02 wrote:
Thank you mcduff for the suggestions, it has solved major part of my application.
Thank you simo22 for your suggestions, I will try to work on it.
Is there a way to put a limit on tdms file size, and on reaching max file size, Is it possible to delete old data & store new data?
What you usually do is creating a new file every day or hour or similar. But you can check for data amount instead, and if reached, Close the TDMS file and open a new one.
/Y