LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get a graph to display in real time

Hi all, I am acquiring two voltages with the DAQ-mx base device, and I want the top graph in the attached VI to display the data in real time (right now it is pushing all data to the left, and leaving all data recorded on the screen...I don't want that, I want the minimum and maximum of the graph to increase as the number of samples taken increases, so that the data displayed will be somewhat instantaneous). Thanks.
0 Kudos
Message 1 of 7
(2,820 Views)
Forgot to attach...
0 Kudos
Message 2 of 7
(2,814 Views)
Don't let the graphs autoscale. Right click->Properties->Scales, then disable autoscaling, and set the scales to a range larger, or as large as your data range... that should solve the sweeping problem. There are also different display modes of each graph, but I think the above should solve the problem.

Geoff
Message 3 of 7
(2,810 Views)
It is not entirely clear what you want.

You VI does not contain a loop so you should only get one update/run. Are you possibly running this VI using the "continuous run" button? This is not recommended! Basically, you are restarting the VI continuously whenever it finishes. The correct way would be to add a while loop with some timing and only the DAQ read function. Most likely, all the DAQ configuration should be done exactly once outside the loop, not over and over again with each iteration.

If I understand you right, you want to see only the newest data in the upper chart. In this case, you should use a graph instead of a chart. You can set x0 and dx via a property node accordingly. You could also keep using the chart, but (1) set the chart history lenght to the number of samples and (2) play with the update mode settings of the chart properties.

In any case, do yourself a favor and align tasks horizontally. Avoid using hidden wires, backwards wires, etc. It will make the program much easier to maintain and understand. (The attached VI shows what 20 seconds of "detailing" can do to brighten the diagram image without any change in wiring :))
Message 4 of 7
(2,802 Views)
Thanks Novatron and Altenbach, I implemented those solutions and got it working. Just one thing though, Altenbach...WOW...how did you clean up that graph like that? Where can I find the alignment controls? That looks really nice!
0 Kudos
Message 5 of 7
(2,783 Views)
Ah whoops, found the alignment controls. Those are really nice, too bad I overlooked them before.. 😕
0 Kudos
Message 6 of 7
(2,779 Views)

Thanks altenbach and Novatron for your help!

 

Tom W
National Instruments
0 Kudos
Message 7 of 7
(2,749 Views)