LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get Graphs to show data

I have what I think is a pretty simple program that just takes measurements from one or more channels and writes the data to a file, shows the numerical value on the front panel, and also should be shown on a graph. However, I cannot get the data to show correctly on a graph. If I use autoscale for x and/or y axis, the scale will adjust accordingly but no data will show up. When I can get it to show up, it is just a dot or vertical line because the x axis doesn't change.
0 Kudos
Message 1 of 9
(3,354 Views)
What does the "rem array" subVI do? Do you get all the data you expect in the file? What version of LV are you using?

Posting your VI might help.

Lynn
0 Kudos
Message 2 of 9
(3,347 Views)
Hmm, I'm not too sure actually. I'm not very good with Labview yet. Someone else in my company, who I replaced, made these programs and I am just trying to edit their programs to get them to do what I want to do.

My main vi is attached along with the "rem array" vi.  If you can tell me what might be wrong I would definitely appreciate it.


0 Kudos
Message 3 of 9
(3,333 Views)
Actually, since I don't really understand his sub vi's, I should probably just start from scratch.  Maybe I should just spend some time trying to figure this all out and ask for help if I need it.

Thanks for your help though!

0 Kudos
Message 4 of 9
(3,327 Views)
You have a singe point which you convert to an array containing one single element. Then you either make it an empty waveform (will show nothing), or a waveform containing a single element (won't show anything on the graph unless you show the points).
 
Maybe you should use a chart instead of a graph.
0 Kudos
Message 5 of 9
(3,326 Views)
altenbach - Thank you for your reply. After looking at that, I think it had originally used a chart, not a graph, but I was trying different things to get it to work and that was how I left it.

So, using a chart, I am able to see a small vertical line which is the data I'm trying to see. I cannot figure out how to make the x-axis move though to show the data over time. Everything I try just keeps giving me the small vertical line.

If possible, I'd like the x-axis of the chart show a particular period, for example to show a period of 4 hours so that for a long test I can see what the data has been for the past 4 hours.

If you could help me out with that I would appreciate it!

Chad
0 Kudos
Message 6 of 9
(3,320 Views)
OK. A VI to work with helps a lot.

First, you need to use a chart not a graph. A chart has built in storage of data called the chart history. When you set up the chart you can specify the history length. A graph only displays the data you write to it at that moment. To use a graph you would need to accumulate the data via a shift register or other method and rewrite the entire graph every time through the loop.

If you use a chart you do not need the build array to change the data point from a scalar to an array.

Using the LED as a control is probably confusing to the user, particularly since it is not labeled.

Apparently the program is stopped by pressing the abort button on the tool bar. This is bad practice. For one thing the close reference outside the loop which closes the file reference never executes. The abort button is only there to allow programmers to halt programs which have errors, during development. Any program with a while loop should have a stop button on the front panel, and the abort button should be hidden from users.

There is something funny on the front panel which hides things moved to the right. I did not investigate. You might be better off rewriting this VI once you understand how things work.

Are you using LV 7.1? Was the program originally written in an earlier version?

Lynn
0 Kudos
Message 7 of 9
(3,318 Views)
Lynn - Thank you for your quick repsonse.

Yes, I am using Labview 7.1 and I believe this is the only version we have had.

I will start from scratch since, as you said, there is something funny on the front panel. I will add a stop button and try to get everything figured out. Your information was very helpful.

Chad
0 Kudos
Message 8 of 9
(3,314 Views)
The Forum is here to help. As you run into specific questions, please post them.

Lynn
0 Kudos
Message 9 of 9
(3,301 Views)