LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display offline data statically into the Graph?

Dear All,
 
             We want to see the offline analysis of the data which are stored into the excel file with the resolution of 5 ms and all the datas are stored with the time stamp (date and time).
 
             Suppose that there are 65000 datas into the excel file and we want to see the data into the static screen, by static screen i mean that, all the 65000 datas must be into the one span of the graph at a time.
 
              It means that left hand side of the x-axis(Time) should not increase and right hand side data should be increase with the time stamp, and all the datas must not exceed either the left side of the graph or right side of the graph.
 
             When we were analysing it, we were not able to make the limitation on this analysis period, and that is what we requires, can anybody tell me what could be the way we can stop the incerement of left hand side of the data(Time) and with increasing the right hand side's data we can see all the datas?
 
Thanks in Advance,
Nishant

Message Edited by Nishant on 10-11-2006 06:46 AM

0 Kudos
Message 1 of 16
(3,645 Views)

Nishant

If your data is Time & Date, Data format then you could use an XY graph.

Just to see what the data looks like could you post an example file containing your data?

thanks

David

0 Kudos
Message 2 of 16
(3,638 Views)
Dear David,

            Let me first thank you for the last solution, it has work perfect for me... thanks very much.

            Though i will give you that excel file by tomorrow but let me explain the problem.

            I have first column of date, sec colum of time, and from 3 to 34 are the colums of Analog data and from 35 to 50 are the columns of the digital data, so the total datas are of 50 columns and its a 2-D array.

          As you told i have plot it onto the XY-Graph itself and i am also able to plot the data but the main thing is that i am not able to plot it statically, which mean that the left hand side of X-axis should contain the date and time of the first data from the excel file  and that data should not change and at the other side (right hand side) of data should be updated with the next records which are coming from the file and the graph should plot all the datas, which are in the single file at a one time.

             I hope that you ll be able to understand this long and confusing statement, but this is the thing which we want please help me if you can help me.

Thanks,
Nishant
0 Kudos
Message 3 of 16
(3,621 Views)
You need to better explain why you can't do a static plot. If you read each column of data and format it correctly, wiring the results to an XY Graph should be something static. Are you reading the data one line at a time or all at once. It should be read all at once and formatted once if you want it graphed only once. The attached picture shows the Read From Spreadsheet to get all of the data. Column 0 is the timestamp and columns 1 through 3 are the Y arrays. You'll probably need to do a little manipulation of the time data in order to format it correctly or read tehm in as strings and then convert to a timestamp. It's much simpler if you have the Excel file saved as comma or tab separated data. Then you don't have to screw around with ActiveX.
0 Kudos
Message 4 of 16
(3,617 Views)

Hiiii, Dennis

           One thing is you are right that i am reading data one line at a time, so that i should read all the data at a time and format it but first thing is i dont know how to format those datas to plot it once in the XY graph.

              Another issuse, i might have more than 50,000 data to be read in a single column which could be the difficult one to read at once, and to format it could be the problamatic, and i am anyways plotting those datas onto the XY graph.

             I have already sorted out the problem of converting time stamp string into the numeric so that is not the problem, the most difficult issues are the two, which i have explained you, if you can provide me solution, then it could be the great thing for me.

Thanks,

Nishant

0 Kudos
Message 5 of 16
(3,601 Views)
Dear Dennis,

                         As offline, is it also possible to see the data online statically, By online statical i mean that the Left hand side of the X-axis should be the start time and then right hand side of the X-axis should update as per the current time and datas should also update, so that User can see all the dats from starting to the current time and if required then we also can vanish those dats from the graph (if data exceeds Pixels limit).

              I want this because my customer requires this, for showing the online trend i am using Waveform chart. Please suggest me something.

Thanks,
Nishant
0 Kudos
Message 6 of 16
(3,594 Views)

I don't think of a chart updating one point at a time as being very static.Smiley Wink You haven't posted your code or the data so I'm not sure exactly how to answer you. With a waveform chart, you can update one point at a time and display time on the x axis if you read in the first two time stamps and calculate the dt and t0. Then this can be wired to a property node of the chart. This would be similar to the shipping example called Real-time Chart. The assumption would be that you have a constant sample rate. If not, then you would have to use an XY Graph. There is also a shipping example called XY Chart that shows how you can make an XY Graph behave like a chart with updating one point at a time. Personally, I think viewing data of-line is better with a graph, though the load time to read in the entire file might be a bit lengthy. Once it's loaded though, you can use the zoom tools to view smaller sections of data.

If you use a chart, data will automatically disappear when you exceed the chart history length. Once the data has been discarded, you would have to start a read again to get it.

0 Kudos
Message 7 of 16
(3,586 Views)
Dear Dennis,

          My code is actually to heavy to send, so most probably i ll try to send some snaps of code (cos i m not in my office right now), but as you told, will it be possible to show all the offline datas into the Graph? it could be the 60,000 round about, by using max Chart hist. length available in the Chart, will all the datas could be plotted onto the graph? I think the cursors are not available in the graph, which is also required in my application, that is the one reason because of which i cannot preffer graph, and as i told you whole process i already have done with XY graph, only back foot is that I am reading only one line at a time, where as application requires, whole the data at a time, and as i think the Online static trending should be available.

               As you told i will see the examples tomorrow in the office, but i still want that if you can make an example of simple data which can take the datas from the Excel and plot it statically, it would be a favor to me.

Thanks,
Nishant
0 Kudos
Message 8 of 16
(3,571 Views)
You are mistaken. A chart does not have cursors. A waveform graph or xy graph does. I don't have an example as I seldom use Excel and certainly wouldn't try it with that many rows (you are pretty close to the max that Excel can handle). I have imported that many records from a database into LabVIEW and as long as you are careful about memory management, you should be able to do it. There's been what seems like a million questions on using Excel with LabVIEW, I know a lot of the answers come with example code, and many deal with reading in a range of cells into a 2D array. Do a search of the LabVIEW and I'm sure you will come up with something. The example I posted shows how you can import an entire Excel file if it is saved as a comma or tab separated text file.
0 Kudos
Message 9 of 16
(3,565 Views)
Hmmm.....
 
         You are right about the excel that i am nearly close to 65535 lines, but currently even i am not sure that whether I am going to use excel or not cos, what our customer require is that there must be only one file for any no of datas, so right now i am also searching for the database, but there is another issue, but still i think i will get something from the examples, that is for sure, and i think you forgot to attach the example vi, as you ve written in the post.
 
              Let me ask you one thing is, as you are saying that it is possible to read all the datas from the excel file at once, is it possible to read sequence of excel files? meaning, once the 60,000 datas of one file, completes, it should start from 1st row of next file and to read all the datas of that file and then next again, and so on...?
 
          "There's been what seems like a million questions on using Excel with LabVIEW" i dont know much about the example codes, but yes you are right about using Excel with LabVIEW, many of the people are finding difficulties in doing simple data storage in the Excel, so to store the data in the other database must be the difficult one, and as i have taken the example of SQL from you, i will also go through it ,if it can give me a good database to store data with.
 
          Please forgive me if i m asking u to much questions, but i am still new to this world and seniors are the one who can help juniors.
 
Thanks,
 
Nishant
0 Kudos
Message 10 of 16
(3,548 Views)