07-29-2015 08:10 AM - edited 07-29-2015 08:11 AM
I am using analog input data DAQ(Third party). I am getting input as 1024/sec samples (fixed). When I read samples and display it through graph. I am getting amplitude in y axis and samples in x asis. I need contionous acquisition. When I try to do that the samples are overwritten and again it is showing from 0-1023. I need contionous acquisition of data. When I try to log data The samples are stored from 0-1023 qand again overwritten from 0-1023. I need to store the data (amplitude continously).
Solved! Go to Solution.
07-29-2015 09:15 AM
it is very easy: just create a separate "slave" while loop below the DAQ loop. Set up a Queue to send the 1024 data points to this slave loop, where you can put it into your Graph, and save it into a TDMS file.
Have a look at the Producer/Consumer Design pattern (Data) which you can reach from the "File" --> "New..." menu.
07-29-2015
09:38 AM
- last edited on
05-06-2025
03:06 PM
by
Content Cleaner
07-30-2015 01:34 AM
The data is obtained inside the while loop. How I can use another while loop to obtain queue?.
07-30-2015 03:10 AM
Had you have a look at the link? The Queue operates as a "communication line" between the two parallel while loops. You ENQUEUE your 1024 data points at the DAQ while loop, which data package will be DEQUEUE-ed in your Data logging/Graph while loop.
Have a look at the following example where I simulate 1024 random numbers, and insert into the Queue. Of course, this is only for example, a proper Producer/consumer pattern should have much better error handling and a Typedefinied cluster so you can send commands not only data, I do not like to stop the consumer loop in this way.
Anyway, this should give you an idea how to separate your data acquisition from the logging and presenting task! You also have to program a data logging part in the consumer loop, I would advice to use TDMS file.
Try to program it yourself, and post your VI so we can help easier!
07-30-2015 03:29 AM
Since you are a total beginner in LabVIEW, I really suggest to start some learning. This forum is for help not for doing your job for you.
Learn how to program data logging, you will find very useful the Core 1 and 2 online learning material. So instead of starting new forum posts for every single parts you need for your program, you could spend time with learning:
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
07-30-2015 03:55 AM
Thank you for the help and I understood the producer/Consumer loop. I am beginner for both LabVIEW and this forum. So only I posted my doubts in separate posts and I didn't expect anyone to do this. I tried to understand the concept with the help of experts like you.
07-30-2015
04:02 AM
- last edited on
05-06-2025
03:06 PM
by
Content Cleaner
Ok, I just wanted to give you a constructive advice for the future 🙂 If you want to get help faster, it is important that you post your actual VI as it is or as a snippet (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI&l=en-US).
Good luck with your project, and if you get stuck, post your actual VI as attachment and explain the problematic part.
07-30-2015 04:23 AM
please I need urgent help woith labview codes for my experiment. I am new to labview and I have been putting effort to develop a code for Acoustic emission data acquisition at the rate of 2M samples per second. the latest code i created gives negative time readings or time jumps on the daved data after some time e.g 0.0000005 - 0.999999 can be positive and sequential time values on the saved file but the next reading can suddenly become -2.0000335 and keeps counting down. I use PIC 6110 for the acquisition. my ultimate goal is to acquire the data points (amplitude and time) and save them sequentially. I also tried to design the code so that it can just aqcuire certain number of samples e.g 60million samples, saves them sequentially without time jumps and stops. without having time jumps or negative time values. I also observed that I dont experiemce the time jumps wehen I use low sampling rates so I added a buffer but that has not completely soplved the problem. I have attached the codes for assistance, Thanks
07-30-2015 04:33 AM
Have your read the forum rules? Why do not you create a separate post with your question?