LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving 1D array of double waveform

Dear All, I am trying to save a 1D waveform DBL in text format and disply it back afterwards. I have tried "Save to spread sheet. vi" but the "read from spread sheet.vi" shows data that is distorted.
I am using PXI-6259 card
PXI-8084 controller and PXI-6259 chassis.

Can any one give me some suggestions. I used the write measurement file Express VI but  it uses too much processor time on my host computer and the loop slows down considerably and data aquisition is affected.

Thank you  very much.
Sincerely,
Munir Afzal Bhatti.
0 Kudos
Message 1 of 19
(4,226 Views)
What do you mean by distorted?
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 19
(4,214 Views)
Dear Andrew,
I am sending some screen shots. Maybe they might clear things.
Thank you very much.
Take care.
Download All
0 Kudos
Message 3 of 19
(4,207 Views)

Hiii, Mr. Bhatti

           I think you should use the simple "Write file.vi" instead of write spreadsheet to file.vi",because this will store your data in perfect dimensions in the file as it is coming from ur cards, and actually i couldnt get the poin that which kind of distortion you are getting here, cos lines are simple as we can see..., but is it not according to the data? another thing are you showing stored data? cos ur graph is not showing the original date and time, and it is showing the 1903 and ... time, which is the default time in the LabVIEW, which can affect ur data if they are stored with the time stamp(as per the figure it isn't, but it could be...), so please give some explaination about this, and may be i can solve ur problem, because i have done the same thing, to storing the data and showing the historical data with date and time.

Thanks,

Nishant

Message 4 of 19
(4,198 Views)
Dear Nishant,

yes I am showing stored data, how can I change this to original data and time ?
And no I am not using time stamps right now...but it would be good with time stamps ....


I try the write to file and let u know thank you.

Sincerely,
Munir Afzal Bhatti.

0 Kudos
Message 5 of 19
(4,193 Views)

Hiii,

Below is the procedure to take original date and time on the graph.

By default, waveform charts and graphs display the absolute time at time 0 as 7:00:00 PM, 12/31/1903 on a Windows based system. Property nodes can be used to get the correct absolute time to display on the x-axis of the waveform chart.

First, right click the chart on the front panel and select X Scale >> Formatting. Then set the format to Absolute Time.

Create a property node for the waveform chart by right-clicking on the chart on the block diagram and selecting Create >> Property Node. Expand the property node to display two properties. Select the Format property and the Offset property. The Format property is located under X-Scale >> Format and Precision >> Format, and the Offset property can be found under X-Scale >> Offset and Multiplier >> Offset. Right click on the property node and select Change All to Write.

For the Format property, the context help shows that there are multiple inputs to this property. Wire in a value of 7 to set the format to Time and Date.For the Offset property, first wire the output of the Get Data/Time in Seconds VI to the input of the To Double Precision Float VI. Then wire the output of the To Double Precision Float VI to the Offset property.

In addition, if you know the number of data points plotted to the chart per second, you can set the Multiplier property located under X-Scale >> Offset and Multiplier >> Multiplier. If there are x data points generated per second, wire in a value of 1/x to the Multiplier property. A simple example program "Chart with Timestamp" that demonstrates how to do that is attached.

Thanks,

Nishant

Message 6 of 19
(4,190 Views)
Dear Nishant,
Thanks a lot for the really detailed answer, I want to ask you a few questions first, as I am new to LabVIEW they might sound stupid.
When we save the waveforms, will it be stored with the present data and time? because as I acquire the waveforms from the PXI, my oscilloscope shows the present date and time....
when i I use this get date and time funtion during the read operation, the oscilloscope will still show the present day and time the data is being read and not the date and time it was recorded...but first I want to save the waveforms.....
I am sending a screen shot of the recording of the data, the waveforms are being saved but How can I see the waveforms on an oscilloscope?

Thank you sincerely,
Munir Afzal Bhatti
0 Kudos
Message 7 of 19
(4,177 Views)
Dear Nishant,
Thanks a lot for the detailed answer, I would like to ask you a few questions that might be stupid as I have started just a few months before.
I am sending a screen shot of the aquisition and saving of the waveforms. The waveforms are being saved but how do I see them again on the oscilloscope. I made a program for reading also, and a sending a screen shot of it , but it is not working, maybe you can give me some more suggestions....

One question about the time and date, when I see the waveforms on the aquisition program the present time and date are displayed, if I use this funtion in the reading of the recorded data program, will it show the present time and date or the time and date at which the data was recorded?

Thank you very much.
Sincerely,
Munir Afzal Bhatti.
Download All
0 Kudos
Message 8 of 19
(4,175 Views)

Hiii,

   you first have to write the data with the timestamp if you want to read it with the time stamp, and for how to write the data with the time stamp, i have attached the vi which can solve your problem, and i have also attach anothe vi, which will show you, how to read the data with the timestamp stored in the file. i have use the CSV file for storing my data, u can use any of the tab tyoe files for this.

Thanks,

Nishant

Download All
Message 9 of 19
(4,164 Views)
Dear Nishant,
Thannx again for the wonderful reply. I tried the file write3 time.vi it is working very well. It is also saving the data. I have attached a screen shot of the program in which I have put this vi. I am having trouble reading the file which I save.

I have one question, I am saving the file in binary but I can see the file in notepad the number and the date? this is normally seen in ASCII format right?
The signal from the shared variable is 1D array if waveform DBL. I have changed it to 1D array of scalars automatic because it does not go in the array to spreadsheet funtion.  When I try to read it , it gives an error, as shown in the screen shot.
Can you please give me some suggestion. Thank you very much.
Sincerely,
Munir Afzal Bhatti.


Download All
0 Kudos
Message 10 of 19
(4,148 Views)