03-31-2020 05:49 AM
Hi all,
I have a project where I am measuring pressure and temperature on an aluminium press tool using National Instruments kit. The code I have is not very complicated at all but I am having some problems.
I need to record all the data during a trial to a single file for processing afterwards but I cannot get it working. When I try and add in a Write to measurement file VI, I always get a buffer error - this is only for one not both (pressure and temperature). I think this is to do with the data sample rate or something but I can't for the life of me figure it out. I also need to do it for both data inputs too.
I think I need a data queuing system? But I'm not sure.
If anyone can advise on why I'm getting the buffer error and/or how to record all the data to an excel/text file that would help me out massively.
I have a feeling there is going to be a pretty simple fix for these problems but I need someone more savvy with LabVIEW to explain it. I have only done one training course on LabVIEW so still learning.
I have attached my VI and a screenshot of the error I get.
Cheers, Greg
03-31-2020 06:08 AM
The standard solution would be to add a 3rd loop with a queue that is a data write loop. The producer queues up data and the 3rd loop writes it. You'll push the problem forward as the writer probably can't keep up, but as long as you have memory for the queue it'll chug along and write until the queue is empty.
/Y
03-31-2020 08:47 AM - edited 03-31-2020 08:50 AM
Hi Greg,
@ghope10 wrote:
I think this is to do with the data sample rate or something but I can't for the life of me figure it out.
You are reading pressure sensors at 20S/s with 2 samples per iteration, this makes your loop spin at 10Hz: usually this is ok for saving data to file without getting buffer overrun errors!
Maybe you are trying to save to a network mapped drive or by creating real Excel files with that other ExpressVI, which you didn't include in your VI: both will slow down the DAQ loop…
@ghope10 wrote:
I have a feeling there is going to be a pretty simple fix for these problems but I need …
You need to take more training courses: they are offered for free for the next month!
And you should stay away from ExpressVIs: DAQmx is very easy and explained with lots of example VIs in the example finder!
What's the point of using those Relay ExpressVIs to stop plotting data in those charts? A case structure would be much simpler…
Why do you need two charts for two pressure sensors? Both can plot on one chart…
You don't need additional numeric indicators for the pressure values: the charts have their own digital display…
04-03-2020 03:44 AM
Thanks for the quick replies guys. I'll look into these fixes and get back to you if I have any problems. 👍