01-08-2021 03:40 AM
Hello everyone,
I am new in labview. I am using NI Crio 9039 and labview 18. I want to perform filtering on Analog data. Can anyone let me know how to save data, both voltage and time stamp from analog channel in array. When i am trying, i am able to save only voltage and not time.
Please help me in understanding.
Thanks
01-08-2021 07:17 AM
The problem is almost definitely in the code you didn't post.
-Kevin P
01-09-2021 06:05 AM
Please find the VI, I am trying to design.
I tried 2 ways, one through for loop and flat sequence to give delay of 10 ms.
Other through timed loop. I could see only analog voltage values in arrays but not time stamping.
01-09-2021 11:44 AM - edited 01-09-2021 11:46 AM
In your second and third loops, you'll never see any data in those array indicators.
All your loops have a false wired to the stop terminal. That means they'll run forever until you abort your VI. The second loop will continually build the array in memory at the auto-indexing tunnel until you run out of memory. The third loop will just maintain the last value in memory as a scalar, but never do anything with it either.
Your first loop will build a waveform of data, but it gets coerced to a single scalar value when you wire it to the analog output.
I would recommend you learn more about LabVIEW from here. How to Learn LV
You said in the first message you want to take data from the analog input and build it in an array. Put a shift register on your loop and a build array so it concatenates the new value you read to the end of the array. Of course if you never clear out the array, you'll eventually run out of memory since your while loop never stops.
01-10-2021 10:25 PM
Dear ravens,
Thank you for the reply. I got it.
I used for loop with which I could analog input in array but my concerned is how to store it with respect to time as I want to perform some signal conditioning on captured data.
In array I am able to see only analog voltage value.
01-10-2021 10:58 PM - edited 01-10-2021 10:59 PM
This is how you build a 2-D array of inside the loop that combines the timestamp with the analog input voltage that you read.
For course this creates an ever growing array that you will have to do something with before it exceeds your free memory.
01-12-2021 06:54 AM
Dear raven,
I am still not getting expected result.
I want to store analog data with time stamp but I am getting same value.
I am not getting where i am getting wrong. As I mentioned, I want to store analog values with time.
I have attached the screenshot of result and VI as well.
01-12-2021 07:16 AM
Hi Monica,
@Monica10975 wrote:
I am still not getting expected result.
I want to store analog data with time stamp but I am getting same value.
Why do you think so? In the screenshot the voltage values vary over time!
What about using a different numeric format to see the timestamp value with more digits? Something like "%.3f" would be fine…
01-12-2021 08:08 AM
Ohh...Yes..I got it. I am getting results now. Thanks a lot😀