LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How is acquired chart data saved and retrieved in an XML file?

Is there an example vi that shows how chart data is saved in an XML file? I need to save five scales that represent different data simultaneously taken with absolute time and date stamps. I want to use XML because it's easy to import to other software. But I also need the ability to display the data in the future using the LabVIEW application. There is a WRITE DATA TO XML FILE.VI example, but it does not store time stamp data. In other words, how is time and date data archived with acquired data in the XML format? Attached is my vi, which will be part of a much larger system. I'm using v7.1 with Win 2000. Thanks,
0 Kudos
Message 1 of 4
(2,742 Views)
Hi dj143,

Timestamp data is stored in XML files the same way as any other data in LabVIEW. What you may be encountering is that there is no timestamp given in your application, and so you will not see that in your xml file. Timestamps exist on waveform data types, not necessarily merged signals of random numeric values, as programmed in your application. If you build a waveform instead, there you will see that you have the ability to store a timestamp for the t0 component of the waveform. If you save that to an XML file, you should see the tag within the tag. Once you read the data back from your xml file, you should then see the timestamp reappear, given that if you are using a waveform graph or chart you have the Ignore Timesta
mp option disabled.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(2,742 Views)
When I first started this project, I assumed that time stamping was part of the acquired data. I then stepped out for a long weekend. Since then I prepared the program to index the time stamping data as part of an array, which is then stored in an XML file. It works well. However, I�m having much trouble displaying the saved data. Please see the attached vi. I have three questions:

1) How is a graph set up to display multiple plots when there is a separate input for the X-axis? In other words, how is a specific plot associated with an array input?
2) How do I get rid of the gap between the X-axis legend and the bottom of the displayed chart? It�s wasted space.
3) How is the cursor name displayed in the chart?

In short, I need to display
the data shown on the Acquired Data array in an overlay format with cursor control. Cursor control is needed to indicate Y and X-axis data for each of the five plots.

This application is for a ship that tows a large barge at sea. They want to monitor and log tow line data such as tension, payout (line length), depth and distance (catenary).

Thanks,
0 Kudos
Message 3 of 4
(2,742 Views)
XY Graphs are capable of multiple plots. Unfortunately, using the XY Graph Express VI only allows you to use one plot. If you go to your front panel, right click and go to Controls >> All Controls >> Graph >> XY Graph, you will pull up the non-Express VI version of XY Graph. If you then pull up the Context Help for this VI, you will see that you can create multiple plots by building an array of waveforms (which answers your first question because each waveform has its own corresponding dt value which is also your x in a normal graph). Also, if you use the non-Express XY Graph, I believe the gap will disappear. Also, the cursor names should appear with the XY Graph when you left click on the cursor icon in the cursor legend and select Show Nam
e. If this does not happen with your non-Express XY Graph, it is possible that it may be a color conflict (i.e, background and text color may be the same).

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(2,742 Views)