LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate waveform graph real time

Highlighted

Hello,

 

I am using the DAQ 6501 to convert readings from the encoder on my motor and convert them into RPMs in labview. I need to be able to display this data real time so as to compare it to a hard coded velocity profile that is selected by the user. Attached is my VI file. I have already tested the block diagram in the time loop with my equipment. The only thing that doesn't seem to work is the graph. I need to display a graph of RPM vs Time as the program is running. I am not too sure as to how to go about fixing this since I am new to Labview. I have tried placing the waveform graph VI in and outside my loop but I am unable to get it to display a proper graph. Any ideas as to how to fix this? 

 

Thanks,

 

Skins

0 Kudos
Message 1 of 11
(15,185 Views)
Highlighted

Wf. graph will display only the values you will wire into it. If you need to keep a track of data in time, try to use the Waveform chart and customize the history length.

 

chart example.png

Message 2 of 11
(15,174 Views)
Highlighted

You are using DAQ assistant so are you getting data from that?. If you are getting data from that means there is no problem with the graph you can use it.

 


@Bublina wrote:

Wf. graph will display only the values you will wire into it. If you need to keep a track of data in time, try to use the Waveform chart and customize the history length.

 

 


Actaully chart will not hold the time information it will just display the data depending on the number of data points and holds a buffer so that the historical data can viewed upto a certain period of time. For timing you have to do settings in its property.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 11
(15,169 Views)
Highlighted

I am not familiar with express data types and express VIs, I am sorry if my post confused you. Talking time i meant some buffer. Anyway, express chart works with time too.

 

I tried to use some express signal generating VI and the difference is the one I suggested.

 

The sample in the fundamental post was correct and it was supposed to display some data at least. Definitely if you observed some movement in other indicators.

0 Kudos
Message 4 of 11
(15,161 Views)
Highlighted

There is nothing to apologise I was just trying to make the points clear so that the user should not take the time value dispalyed in the X-axis is the actual time values. Still need to play around with the waveform graphs 🙂

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 11
(15,157 Views)
Highlighted

So does this mean in order for the waveform graph to display anything it needs to be fed data of both axis for RPM AND time? I tried putting the graph in the time loop and wiring it to my RPM output line but the graph never drew the plot. I tried fiddling with the settings to see if it would change. I still haven't found a solution. I tried displaying the points as a different color to see what would happen. When I ran the program again, the graph displayed only one plot point that moved only along the Y-axis when I changed the frequency with my function generator and did not move with time.

 

Also the DAQ only outputs counts, that's why I had to make the conversion to output RPM. 

0 Kudos
Message 6 of 11
(15,148 Views)
Highlighted

You would really benefit from one of the LabVIEW tutorials. A graph expects an array of points and each time it is written to, old data is erased and replaced with the new. You are acquiring a single value and plotting a single value with each iteration of the loop. A chart is typically used for real time updates and especially when you write one point at a time. A chart maintains a history (something that is set at design time) and new data is appended to the old. As already mentioned, a chart is probably what you want to be using. Also, by default the x axis is scaled to one. You can change the scale to reflect actual timing by using the multiplier property. Look at the Real-Time Chart example that comes with LabVIEW.

 

p.s. Try to avoid all the bends in your wires. Neatness does count.

0 Kudos
Message 7 of 11
(15,143 Views)
Highlighted

Thanks for the help. I decided to go with the waveform chart. It works just fine and I am able to write the data to a file for analysis. I have another question however. I want to be able to display a static hardcoded signal from a file on the same chart so that it can be compared to the signal running real time. Is it possible to do this on the same chart?

 

~ Skins

0 Kudos
Message 8 of 11
(15,121 Views)
Highlighted

Hi Skins,

 

I have exact application that I need to see rpm data in real time to follow a pre-defined pattern of values. I have an image from pre-defiened values and I can insert this image in to graph using plot image property node. The problem is the plot image property is not available for waveform chart, only for waveform graph and xy graph I can make plot image property node. On the other hand, I cant configure waveform graph and xy graph for real time display.

Have you found any solution for your application? That would be much appreciated if you can share.

 

Thanks,

Mostafa

0 Kudos
Message 9 of 11
(11,292 Views)
Highlighted

Hello Mostafa,

 

There are a few options available for us as workarounds, but I do not think this functionality is inherently present in LabVIEW.

Here are a few potential avenues:

 

1. Since you have figured out how to use XY Graph to do this, you could attempt to mimic the functionality of a waveform chart by putting your graph into a While loop, and your read values into a stacked shift register of some sort. The graph would not update smoothly as with a chart, but would sort of track as the loop iterated. 

 

2. If your static data is going to be phase matched with your new data, you might be able to design a way to parse it from the file so that it updated on your chart as a separate channel at the same rate. I do not know offhand what hurdles we would run into with that, but it might be an arena to explore.

 

In general, I would advise that if you are seeking to pursue this for a specific application, you should either create a new forum post for this issue, referencing this thread, or create a Service Request with us. A forum post that has not been updated in 4 years is unlikely to receive significant visibility compared to new posts. A Service Request would assign a specific engineer to look into this thoroughly and advise on the application.

 

Best,

 

Daniel

0 Kudos
Message 10 of 11
(11,234 Views)