04-21-2010 03:48 AM
Dear,
I would like to use the Data Storage VIs to collect my data but I can't achieve my target.
I'm acquiring 1000 samples at 1kHz (N samples on demand) and I make the mean value of the samples. At the end of this proces I have a scalar value and the initial time at wich I have acquired the data. With this two I build a waveform and then I use the Write Data Storage Vi (TDMS) with "append" write mode to save my data.
When I read the Data Storage all the value have lost the time information. They start from 1.00.00,000 01/01/1904 and are equal spaced in time.
How can I keep the time information?
Thanks
04-21-2010 07:00 AM
Store and process the values in the consumer loop of a Queued State Machine architecture.
Everytime you read a value, throw the value, timestamp and any other information you require onto the Q, it will be held there until you De-Q it for processing.
This architecture is quite easy to debug and probably suits your needs better than trying to store data in FGVs.
James
04-21-2010 07:04 AM - edited 04-21-2010 07:06 AM
Sorry totaly misread what you were doing.
You need to create ensure that waverform that is saved has the correct values for X0 and dx when you save it. Use the build waveform function to acheive this.
edit:
the default value for X0 is timestamp 0 (1904), use get datetimestamp at the very start of the cycle to get the correct value.
James