cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Why doesn't a line plot here instead of just a single point?

Solved!
Go to solution
Highlighted

Why doesn't a line plot here instead of just a single point?

Hi.

 

A simple question for now…Why doesn’t the XY Graph draw a plot instead of just moving the “X” around in this attached file “Express graph test.vi”?

0 Kudos
Message 1 of 13
(195 Views)

Re: Why doesn't a line plot here instead of just a single point?

Hi Tinsnips,

 

Why doesn’t the XY Graph draw a plot instead of just moving the “X” around in this attached file “Express graph test.vi”?

Because there is not even a XYGraph in your (rather empty) VI…

 

When the graph only shows a single point then most often the plot contains only one single point!

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 13
(186 Views)

Re: Why doesn't a line plot here instead of just a single point?

You attached an empty VI, but if you are using the "build xy graph" express VI, ensure that "clear data on each call" is true if you just want to move a single point around. If not, all new data is appended to the current data forever.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 3 of 13
(171 Views)

Re: Why doesn't a line plot here instead of just a single point?

Good heavens! My apologies. I'll retry and test it this time.

0 Kudos
Message 4 of 13
(121 Views)

Re:

Ah, that's better. This time it's there...I just clicked on it myself.

 

Sorry guys. Anyway, back to the original question...

0 Kudos
Message 5 of 13
(120 Views)

Re: Re:

As has been said, double-click the express VI and configure it to clear data on each call. Of course you don't really need all that. Just create a complex array with one point (see attached).

 

(Also, don't use "continuous run". You need to use a while loop and small wait)


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 6 of 13
(108 Views)

Re: Re:

Altenbach, I don't get it. Maybe I'm not even asking the question properly. In either case (clear data on each call, or complex array with one point), All I get on the XY Graph is a single dot. I need to plot a line that shows where the dot has been...like on the waveform chart next to it. Except unlike the chart's X-axis being time, I want the graph's X-axis to be controlled by the slide control.

 

You might say I'm trying to make a virtual Etch-A-Sketch.

0 Kudos
Message 7 of 13
(99 Views)

Re: Re:

BTW, thanks so far!

0 Kudos
Message 8 of 13
(98 Views)

Re: Re:

If you uncheck "clear data on each call", your VI will work. The problem is with you use of "continuous run". That's a debugging tool, not a way to run a VI. The express VI resets the data on first call, and if you use "continuous run", it will reset with every restart. Simply place a loop around your own last code and things will work just fine.

 

("continuous run" is more like "re-run after completion". Sorry, it was not entirely clear if you want a history line or a point))

 

 


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 9 of 13
(96 Views)

Re: Re:

Of course if you just add a while loop, your plot will append gigabytes of data until you run out of memory if you would keep the code running forever.. A proper program would use a "value changed" event for the two slides and only update the graph if one of the slides is moved. Don't forget an event for the stop button.)


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 10 of 13
(91 Views)