Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get absolute time on waveform graph

I am trying to plot the numbers coming out of a random generator (will use some PID controller at a later stage) with respect to the current time on a waveform graph. I have tried everything but I am unable to get the current real time on X-axis. The x-axis is showing 5:30 AM 1st Jan 1904 instead of the current date & time. I have selected "Absolute time" and "system date/time format" in the waveform graph properties, but it seems to be of no use. I have also tried it with XY graph, but facing the same issue. My aim is to simply plot the data values with respect to the current date & time. Pls someone help me out. Smiley Sad

0 Kudos
Message 1 of 13
(558 Views)

I tried recreating your image #1 and it works fine for me. I see the date time stamps as 2018 on the X once I switch it to Absolute time. What are you running this on? Windows?

 

Can you try posting VIs or snippets instead of pictures of code?

0 Kudos
Message 2 of 13
(538 Views)

Pls find the attached VI (trygraph6), which is still not working properly for me. It is showing 01/01/1904. I am working on Windows 10 environment. I am sorry but my issue may sound silly. I got some other VI also (trygraph4) which is showing the current date and time but I am unable to store the waveform data in a proper format. My aim is to plot the data coming out of a random generator wrt time, store it in a spreadsheet file and then again retrieve the waveform (data points) from the stored file. Can you plz help me out. Smiley Sad Thanks

0 Kudos
Message 3 of 13
(532 Views)

@rajesh111 wrote:

Pls find the attached VI (trygraph6), which is still not working properly for me. It is showing 01/01/1904.


The graph will not update until you press the Stop button.  Maybe that is your issue?


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 13
(529 Views)

FYI, this is an RT forum so you might bet a better response in the general (non-RT) forum.

TryGraph6.vi works fine for me once you hit the stop button. Is that not what you're getting?

graph with timestamp.PNG

TryGraph4 is also working pretty well except you're appending in two places.

  1. The shift register
  2. You're writing a "true" to Export Waveforms append input.

I think if you stick to one or the other, it should be OK.

0 Kudos
Message 5 of 13
(524 Views)

Things are working somewhat fine now. I have modified the VI as per the need, but it is not able to retrieve the waveform. I am first storing the waveform elements using "Export waveform to a spreadsheet file" and then trying to retrieve the waveform from the saved file using "Read waveform from file". So ideally 'waveform graph' and 'waveform graph 2' should be identical. Can you plz tell me where am I doing the mistake?

0 Kudos
Message 6 of 13
(515 Views)

In your VI you're writing to a text file but your "read" is expecting a binary file.

If you need a "human readable" and a "machine readable", your best bet might be to output to two files like the example here:

C:\Program Files (x86)\National Instruments\LabVIEW 2017\examples\Waveform\Waveform - Write Waveforms to File.vi

 

0 Kudos
Message 7 of 13
(510 Views)

Thanks. I have made the necessary corrections in my VI. Here I am writing to a text file and reading from a binary file. Things are working fine but when I run the VI, a pop up keeps on asking me "Replace existing file?" and I have to again n again press replace button. How to get rid of that and get the waveform written and read in a continuous manner?

0 Kudos
Message 8 of 13
(487 Views)
Highlighted

I have a Waveform Chart in Labview. I know that I can change its range using the "Plot History Length" property. The problem is that I don't add the points to the plot regularly, so I can't compute the number of point I want to be displayed prepaidgiftbalance. Is there a way to inform Labview that I want only the points from last, let's say, 20 minutes to be displayed?

0 Kudos
Message 9 of 13
(484 Views)

@Isabelle445 wrote:

I have a Waveform Chart in Labview. I know that I can change its range using the "Plot History Length" property. The problem is that I don't add the points to the plot regularly, so I can't compute the number of point I want to be displayed prepaidgiftbalance. Is there a way to inform Labview that I want only the points from last, let's say, 20 minutes to be displayed?


Use an XY graph and maintain your own data arrays.  The X array will need to be timestamps the the Y be your actual data.  When a new sample comes in, see if the oldest sample is too old and remove it if it is.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 10 of 13
(479 Views)