Discussion:
saving 1D array of double waveform
(too old to reply)
mbhatti2000
2006-04-04 17:40:09 UTC
Permalink
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.
mbhatti2000
2006-04-05 09:40:09 UTC
Permalink
Dear Andrew,
I am sending some screen shots. Maybe they might clear things.
Thank you very much.
Take care.


send.jpg:
Loading Image...


send1.jpg:
Loading Image...
Nishant
2006-04-05 12:10:08 UTC
Permalink
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
mbhatti2000
2006-04-05 13:40:08 UTC
Permalink
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.
Nishant
2006-04-06 04:10:12 UTC
Permalink
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


Chart with Timestamp.vi:
http://forums.ni.com/attachments/ni/170/178016/1/Chart with Timestamp.vi
mbhatti2000
2006-04-06 14:10:15 UTC
Permalink
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
mbhatti2000
2006-04-06 14:40:09 UTC
Permalink
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.


moon.jpg:
Loading Image...


moon1.jpg:
Loading Image...
Nishant
2006-04-07 04:10:08 UTC
Permalink
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


file write3_Time.vi:
http://forums.ni.com/attachments/ni/170/178263/1/file write3_Time.vi


Fileread_with plotting.vi:
http://forums.ni.com/attachments/ni/170/178263/2/Fileread_with plotting.vi
mbhatti2000
2006-04-07 17:40:08 UTC
Permalink
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.


nishant.jpg:
Loading Image...


nishant1.jpg:
Loading Image...
Nishant
2006-04-10 13:40:28 UTC
Permalink
Hiii,
         Mr. Bhatti, i got your problem.... , so i am requesting you to send a file in which you have store the data, from wrtie to spreadsheet file, so that i can modify the vi for the read, it is required to be formatted at the inouts which are coming at the string formation, so that it reads the perfect string which is stored in the data, please send me the file.
Thanks,
Nishant
mbhatti2000
2006-04-10 14:40:11 UTC
Permalink
Dear Nishant,

Do you want me to send the data using the write to spreadsheet file vi
or the file write3_time.vi which you sent me? i am recording the
waveforms using the file write3_time.vi  and sending the files.

I am sending the files in which I recorded the four waveforms. I can
use the "convert from dynamic data" expressVI to convert the dynamic
data in three types and then save the data. I am attaching three files
also listing the 3 types in which the data was saved. The first file
was saved as 1D array of scalars-automatic and so on, it is written on
the file. Hope that this is what u wanted !
I tried to attach the file without any extension but they do not upload so I am making the extension as .txt



Thanks a lot once again.

Take care,

Munir Afzal Bhatti.


1D array of scalars -4 channels.txt:
http://forums.ni.com/attachments/ni/170/178653/1/1D array of scalars -4 channels.txt


data saved as 1D array of scalars automatic.txt:
http://forums.ni.com/attachments/ni/170/178653/2/data saved as 1D array of scalars automatic.txt


1D array of scalars-single channel.txt:
http://forums.ni.com/attachments/ni/170/178653/3/1D array of scalars-single channel.txt
Nishant
2006-04-11 04:10:07 UTC
Permalink
Hiii,
              Actually these stored data are not in perfrct method, so can you please send me ur vis, so that i can modify them to store? and please use the excel files to store the data (however it doesnt matter but still its a good practice rather than txt file), i will modify ur vi to store the data in perfect method and whenever you post vi or any other files please send it in the zip file, so that file size can be decreased cos i have the limitations to downaload the files. plese send me files with all the drivers included inside so that it shouldnt be the question of not opening vi, which delays ur project, cos i have suffer this ways in my project, which costs me more days for completing the project.
Thanks,
Nishant
mbhatti2000
2006-04-11 08:40:07 UTC
Permalink
Dear Nishant,
I am sending the vi's that I am using, but i am using a remote real
time system, and data is being sent via shared variables, will these be
gut for u? The details of my  system are: PXI-6259 M-series
Multipurpose DAQ card, PXI-1031 chassis and PXI-8184 controller.

I did not understand about the driver part but I think I am sending everything, hope there is no problem in opening the file.
Thanx a lot.
Sincerely,
Munir Afzal Bhatti


robocop.zip:
http://forums.ni.com/attachments/ni/170/178817/1/robocop.zip
mbhatti2000
2006-04-12 14:10:08 UTC
Permalink
Dear Nishant,
I am also sending two files that I recorded in Excel format. Maybe they help too.
Take care.
Sincerely,
Munir Afzal Bhatti.


test2.zip:
http://forums.ni.com/attachments/ni/170/179139/1/test2.zip
Nishant
2006-04-13 11:10:07 UTC
Permalink
Hiii, Mr. Bhatti
                   Sorry to replying you late, but i was somewat busy in my work actually. I think the data coming into the file is not properly formatted while writing the data, and i am sorry to say but i dont have the LabVIEW 8th version, because i forcefully told you to send it, but you can do one thing, can save in 7.0 or 7.1 version, while doing save as, there is an option of "save with options" on the file menu, in that there is an option to save with the previous method, so there you can save this vi with 7.1 version or 7.0 version, so that you can send me that version which is cocmfortable for me to change, i will format that file for sure to write the correct data.
                               I habent analyse your data properly so that i can tell you, what is the basic problem in writing the data, but once i ll analyse i will mail you.
          One another thing i like to say is, as in the last post you send me the data.xls.csv file, which is not a proper method to write, there should either be .xls extension or should be .csv extension. one is the excel file and another is comma seperated value file, and the comma seperated will be tab delimited file in which we will sotre the data, it will show as an .xls but htat is actually be the csv file.
Thanks,
Nishant
Nishant
2006-04-14 11:10:08 UTC
Permalink
Hiii,
 
             Mr. Bhatti what happened i am looking forward for your vi, if you have got the solution! tell me, because i will be the happy man! if you have find so!
 
Thanks,
Nishant
mbhatti2000
2006-04-16 19:10:08 UTC
Permalink
Dear Nishant,
Thank you very much for your co-operation. I am extremely sorry for the
late reply. There has been a slight change in the program that I was
making. I am now using the  1D array of 64-bit,~15 bit precision.
I am now saving the file as a .dat and .bin. I can read these files
with the read binary file.vi. I am unable to convert my VI's from 8.0
to 7.1 because the save for previous version seems to be disabled. I
want to ask you the
following questions:
I am recording  4  analog  channels  on 
the  .dat  or  .bin  fle.  Is  it
possible to separate the four channels and see then separately on the
oscilloscope. or create 4 separate files for each channel, after
recording? Thanks once again for the nice tips in the previous mails.


Thank you very much.
Sincerely ,
Munir Afzal Bhatti.


munir.zip:
http://forums.ni.com/attachments/ni/170/179712/1/munir.zip

Continue reading on narkive:
Loading...