12-09-2018 11:33 PM
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. 😞
12-10-2018 01:18 PM
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?
12-11-2018 06:45 AM
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. 😞 Thanks
12-11-2018 08:12 AM
@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?
12-11-2018 03:33 PM
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?
TryGraph4 is also working pretty well except you're appending in two places.
I think if you stick to one or the other, it should be OK.
12-13-2018 07:00 AM
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?
12-13-2018 12:34 PM
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
12-18-2018 04:28 AM
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?
12-18-2018 06:09 AM
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?
12-18-2018 07:21 AM
@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.