LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Multi Plot - Time Stamp Not Working

Solved!
Go to solution

I am making a program for data collection for use in our testing lab. We have been using the wave form chart, but if i tell it every reading is one minute apart, but they are actually a fraction of a second longer, than expected then the time on the chart starts to shift, causing complaints from the operators.

 

Im wanting to use the XY Graph so that each data point has a time stamp so that the time is always correct with the data samples, even if timing goes off a little bit.

 

Issue being that when i send the data to the XY graph even though i have sent in the time stamp for all the data points, it doesn't have the time stamp when it shows it in the Graph.

 

I know the data doesn't have the time stamp when graphed because, when i right click the graph and tell it to export to excel, it shows zeros for time and date. (See below)

Time - TC  1 Amplitude - TC  1 Time - TC  2 Amplitude - TC  2
00:00 PM MM/DD 0.511382 00:00 PM MM/DD 0.236939
00:00 PM MM/DD 0.965603 00:00 PM MM/DD 0.370267
00:00 PM MM/DD 0.494924 00:00 PM MM/DD 0.683093

 

 

XYGraphExampleVI

0 Kudos
Message 1 of 12
(4,073 Views)

Hi there,

 

I have a couple notes. I had to recreate your VI, since I'm using LV 2012, and it is graphing over time for me. Is your X-Axis format set to absolute time?

  • When you combine your data with the timestamp, you can also use "build array". I use "build array" and "index array" for 90% of my array tasks, which I think is a lot easier to see than inserting.
  • You don't need a for-loop around "to time stamp", it can handle arrays.
  • The in place element structure is not doing anything. You have to right-click the left border and add some nodes. But you would not do that where it currently is, because you are not outputting a modified version of your input array there.
0 Kudos
Message 2 of 12
(4,049 Views)

1- Yes it is set for absolute time.

 

2- The reason for using the For Loop to handle programmatic number of readings. My actual application will handle at least 20, and may use more as needed. so the number of readings needing to be built into arrays needs to be adaptable , build array, and index array only works if you hard code the number

 

3-Didn't know that. I'll try it.

 

4-The in place element structure was just to keep things organized, but true does nothing functionally.

 

0 Kudos
Message 3 of 12
(4,022 Views)

Could you post your VI for LV 2012 or lower?

0 Kudos
Message 4 of 12
(4,011 Views)

Attached is the VI saved as 2012 version, let me know if it works.

 

0 Kudos
Message 5 of 12
(3,991 Views)

Right-click the X-axis and select "Autoscale X".

0 Kudos
Message 6 of 12
(3,989 Views)

If you do that, you can see the data being plotted along the x-axis, but the x-axis doesn't correlate to any time. it just says 00:00 PM MM/DD at both ends of the x-axis. which doesn't help the operator who needs to know when the reading was taken.

0 Kudos
Message 7 of 12
(3,984 Views)
Solution
Accepted by topic author Tookys

I also see your multiplier is 60, you should set this back to 1.

Message 8 of 12
(3,979 Views)

In this thread I posted some code that uses Waveform Data types to be able to plot readings at the exact time they were taken.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 12
(3,976 Views)

That was the issue.

 

A little more back ground, this chart was originally a Waveform chart, I did the Right Click>Replace> XY Graph(Silver)

 

The waveform chart was needing the multiplier to accommodate the once per minute reading. But since I just replace it, the old settings stayed in place. And the XY graph doesn't need the multiplier since the readings are time stamped.

 

Thank you gregoryj.

0 Kudos
Message 10 of 12
(3,974 Views)