10-09-2008 09:49 AM
Hi,
I'm having headache displaying my data with proper time-stamping. There are so many methods to save data. here I've decided to save it as a text delimited file format as lvm. a segment of my vi screen shot is attached. I want to use this way instead of other methods is the flexibilty it offers. I will be able to add on more data to store as I develop the vi. (So I'm storing data from DAQ assistant and my calculated values.) I attached a the screenshot of the file I read too.
I would like to use another vi to open this file and plot it to a graph/chart to display as a trending of the data acquired. Can someone pls advise mi on what is a better way for mi to do it?
Thanks alot!
Poh
Solved! Go to Solution.
10-10-2008 10:42 AM
Hi CP Poh,
Can you attach the *lvm file?
Sincerely,
Krisna Wisnu
10-10-2008 08:54 PM
Hi Krisna Wisnu,
Here's the *lvm file. This file having the 1st element is the timestamp in seconds converted to DBL which I convert back to timestamp and fed into the "build waveform" t0, the individual channels as the Y and dt = 0.1. (Sorry I can't access the lab over the weekend, couldn't have the screen shot). The waveforms will be channeled to build array, and output to a chart. (where the chart length I defined to be very long (default 1024) Juz to ensure I can get more data displayed)
In this manner I can get the timestamped waveform for short duration. When I tried to load this attached *lvm file, the system hang. Error: Not enough memory to complete operation. This is just a 10min data! haiz... (But that attempt I made was to disply the 10 channels of data out of so many logged data.)
If there is better alternative, to writing it, pls let me know.
Thanks!
Poh
10-20-2008 11:32 PM
Hi CP Poh,
I am sorry for the late reply as I have been pre occupied with other task.
May I know whether you have solved the problems that you were having or not?
If yes, kindly share with us. If not, I would like to ask few questions.
Eventhough it is only 10 minutes, if in 1 second you acquire 1000 samples, in 10 minutes you will have 600,000 data in 1 channels. Meanwhile you have 10 channels, which as expected, your PC will ran out of memory. Can you post the code to write and read? so that I can see which part is causing the problem?
Looking forward for your reply.
Sincerely,
Krisna Wisnu
11-02-2008 03:26 AM
Hi Krisna,
Sorry for the late reply, I was rushing to complete my project, wasn't able to reply.
Yes, I managed to solve it. Anyway I used such high rate in the DAQ assistant is to allow continous mode acqusition & use a software filter instead of hardware filter. however writing to file in this way - writing string into .lvm, max is 10 samples/sec. unless I use tdm (I'll then log everything).
I wasn't able to display proper time-stamping was due to the fact that I didn't add in the start-time timestamp that's required in displaying of timestamp in waveform. I'll not be able to go down to my lab, & my machine do not have LabVIEW, so what I can do is to extract portions of my report to share.
For the portion that I used to display graph (can be seen from the attachment), I deleted the 1st column, which is the timestamp (for spreadsheet viewing), but extracted the 1st element - the converted to DBL timestamp when I start logging in the DAQ vi (written together with the header).
This extracted (could be seen as a bunch of numbers in the lvm file) and and converted back to timestamp type and wired to build waveform block, providing the start-time of the waveform.
Next, I replace the use of chart with graph, as graph is suitable for plotting data acquired, and chart is better for run-time display of data. now it seemed to work fine for me, except for loading time may take a while for larger files.
Thanks for your participation in this thread!
Cheers!
Poh