LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high speed data logging saving to disk


Hi

I have to create a program that logs data from two seperate boards, one aquiring high speed data (around 800kHz) upto 4 channels, one aquiring low speed data (around 10kHz) upto 16 channels. (For the created code I used NI-Daqmx simulated devices for PCI-6115 and a PCI-6052E)

So far I have modifided the example code "Multi-Device Synch-Analog Input-Cont Acquisition" to save data in binary form but the problem I am having is that I get the error code 200279 where the buffered data is overwrited before it gets saved. This happens even when the values are down to 600kHz, I have a constant value in the block diagram that can be changed to alter the ratio between sample rate and samples.

I can think of a couple ideas which may help but I am not sure, maybe have the data saved every 3 loops or so?

Any advice would be greatly apreciated.

ALSO!!! is there a way to convert this down from version 8.5 to 7.1???

Thanks

Charlie
0 Kudos
Message 1 of 6
(3,222 Views)
Hi Charlie,
 
You may find the following KB useful regarding buffer issues and the error you are getting:
 
Trial and error in using indicators may help you gain a set sample read so that the buffer isn't overwritten.
Other ways do exist I'm sure, and I'm looking into the best at the moment for you.
 
You can save back a set number of versions from 8.5 in File > Save for previous versions, this however doesn't go all the way back to 7.1, the only way to do this is to save the file back to version 8.0, and then open up 8.0 and save to 7.1 (This may require some change in code on your part though) - As I'm guessing you don't have this many versions installed on your machine I would be happy to convert this back to 7.1 for you and post it on the forum.
 
Thanks,
 
Applications Engineer
0 Kudos
Message 2 of 6
(3,191 Views)

thanks for the reply, I'll have a go at what you've said and see what happens, and you are correct in assuming that I do not have that many versions of labview on my computer so if you could convert that program it would be great.

 

Thanks

Charlie

0 Kudos
Message 3 of 6
(3,184 Views)

No Problems,

If you can also try using just 1 card and see if the buffer error still occurs, and also the hardware products you are using that would be great. I'm under the impression the hardare and interface will handle the speeds, so it may be worth looking at either using the producer/consumer loop and queues (if the CPU is being thrashed all the time) with a queue system or another solution I've considered is saving to RAM instead of disk to cut the latency, although I'm not sure how practical this will be for you

Regards,

 

Applications Engineer
0 Kudos
Message 4 of 6
(3,181 Views)
Hi

Well because I've only got LAbview 7.1 at the moment I've started a new program and I think I have it working, during testing this has been saving 4 channels at 1MHz and 16 channels at 10kHz for over 10mins which is more than what I need so I think this is correct. The only this that worries me is that the CPU is at 100% all the time and I don't know if these means I could be losing some of the readings or that if someone were to open another program while this is running it could crash. I know you mentioned a producer consumer loop but I could not find this on labview and don't really know what this is?

The way I got this to work is using the ratio of "scan rate" to "#of scans to write at a time" at 9 times, and the ratio of "#of scans to write at a time" to "buffer size" at 2 times. To be honest I got this at trial and error and it seems to be working, is there any chance you could explain this at all, or even come up with a better ratio?

At the moment I have not been able to test this on the actual hardware but hopefully it should work and not loose any readings, also is there any way to have a chart to show the readings during the test, it does not have to show all of them, maybe a select few, and does not have to be instantly on the screen, maybe using multithreading could help with this?

Thanks again

Charlie
0 Kudos
Message 5 of 6
(3,144 Views)

See here for example of Producer Consumer Design Pattern.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(3,141 Views)