LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Data Logging

Solved!
Go to solution

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). samples prob.jpg 

0 Kudos
Message 1 of 12
(5,999 Views)

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.

Message 2 of 12
(5,966 Views)

Producer/Consumer


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 12
(5,942 Views)

The data is obtained inside the while loop. How I can use another while loop to obtain queue?. 

0 Kudos
Message 4 of 12
(5,889 Views)
Solution
Accepted by topic author karthikeyanPrakash

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!

 

ProducerConsumerData 1_BD.png

 

 

 

 

Message 5 of 12
(5,868 Views)

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

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

 

 

0 Kudos
Message 6 of 12
(5,861 Views)

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. 

0 Kudos
Message 7 of 12
(5,845 Views)

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.

0 Kudos
Message 8 of 12
(5,832 Views)

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  

0 Kudos
Message 9 of 12
(5,817 Views)

Have your read the forum rules? Why do not you create a separate post with your question?

0 Kudos
Message 10 of 12
(5,795 Views)