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.
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.
12-20-2016 11:23 PM
Hiii,
I am using NI-cDAQ 9134 and module 9223 for data acquisition. I have developed a code which acquiring the data for 1 minute at 1M sampling rate using Write to measurement file. But since the file size is 1.34GB thus, we require to make a smaller file say of 15seconds or 30 seconds. I tried to develope that code also but since I have used producer consumer model , thereby on providing a delay to consumer the memory is getting full. Also, it is writing data of 1 second only. I have attached both the codes, kindly give some suggestions.
12-21-2016 12:30 AM - edited 12-21-2016 12:32 AM
There are lots of Producer-consumer DAQmx examples out, you should study some of them. I really recommend using a typdefinied cluster, so you do not need to use 2 Queues!
The main problem with your VIs is that, you do not understand the main concept how a Producer-consumer design works: you put timing in your Consumer loop. The consumer should only act when it Dequeues an element from the Queue, and do not slow it down!
Regarding to your question how to save your data, here are some hints:
The most simple solution even do not require a Producer-consumer design: just use the TDMS file format along with the "DAQmx Configure Logging VI": http://www.ni.com/white-paper/9574/en/
Edit: and do not have anything in your Producer, only the DAQmx Read and the Enqueue function, display data/work with data only in the Consumer loop.
12-21-2016 12:55 AM
Thank you sir for the help. Actually we need this much rate only since we have to acquire underwater acoustics. Also, we are using 3 channels to acquire data having 1M sampling rate per channel. We require only some points from 1 millions points which needs to be above some threshold value which we define. I also need to time stamp the data using low level apis only , which i am not able to get. I am just getting information of 3 seconds only. I used various techniques but didnt work anything. I am just a beginner in using Labview , it would be really helpful if i get to see some examples.
12-21-2016 01:16 AM
I already wrote you what to do:
Take the available LV tutorials if you are a beginner in LabVIEW: http://www.learnni.com/
12-28-2016 12:23 AM - edited 12-28-2016 12:27 AM
Hello sir,
Moving graphs to the consumer loop is creating trouble in logging file.
I have removed thye delay. But i am getting buffer overflow error. I am using write to measurement vi since I want to have time stamping channel apart from 3 channels information in one file only. I tried it using low level api for writing tdms file but it was not providing me the time stamping information in seperate channel.