LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are charts and graphs so difficult?

Highlighted

All I want to do is plot two values on a chart or graph or whatever you want to call it.

 

I don't want to go through all the trouble of making an X/Y chart and keeping all my chart history myself.

 

It drives me nuts as I bang my head against this chart/graph wall every time, it should be easier than this!

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 1 of 27
(528 Views)
Highlighted

I always had trouble keeping them straight in my head, so many years ago I made these 2 thing to refer to.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
Message 2 of 27
(463 Views)
Highlighted

Hi RTSLVU,

 


@RTSLVU wrote:

All I want to do is plot two values


What exactly is your problem?

(Isn't all this shown in the context help?)

 


@RTSLVU wrote:

on a chart or graph or whatever you want to call it.


You should call them as they are named in LabVIEW!

Helps you and us to understand your exact problem as there are differences between charts and graphs…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 27
(441 Views)
Highlighted

@RTSLVU wrote:

I don't want to go through all the trouble of making an X/Y chart and keeping all my chart history myself.


Like this?

(Nugget: Sporatic Waveform Chart)


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 4 of 27
(417 Views)
Highlighted

@Crossrulz -- that is so subversive, so clever, such a brilliant Nugget!  Thanks for sharing!!

 

Bob Schor

0 Kudos
Message 5 of 27
(405 Views)
Highlighted

@Bob_Schor wrote:

@Crossrulz -- that is so subversive, so clever, such a brilliant Nugget!  Thanks for sharing!!


Your words are like an image that is not a snippet: worthless!  You should thank me properly.

Spoiler
As my signature states, there are only two ways to tell somebody thanks: Kudos and Marked Solutions.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 6 of 27
(386 Views)
Highlighted

@crossrulz wrote:

@RTSLVU wrote:

I don't want to go through all the trouble of making an X/Y chart and keeping all my chart history myself.


Like this?

(Nugget: Sporatic Waveform Chart)


That's great, and a bit puzzling.

 

So the chart can do restricted* XY data, as long as X is time.

 

It would be useful [to me] if I could set a bunch of XY data at once as well. For instance, when a chart in a VI is multipurpose: showing real time data, and showing stored data. At real time, this trick will work.

 

I setting the chart's History the (only) way? This is array of waveforms, where each waveform has one point (in this example, there can be more points, but they will be dT apart).

 

*

A restriction is X has to increase, or nothing will show?

Another restriction is all channels have to have the same number of waveforms added. 

0 Kudos
Message 7 of 27
(380 Views)
Highlighted

BTW...


This only got 20 kudos: XY-chart.

 

The nugget is there as well.

0 Kudos
Message 8 of 27
(377 Views)
Highlighted

wiebe@CARYA wrote:

@crossrulz wrote:

@RTSLVU wrote:

I don't want to go through all the trouble of making an X/Y chart and keeping all my chart history myself.


Like this?

(Nugget: Sporatic Waveform Chart)


A restriction is X has to increase, or nothing will show?

While this is certainly a clever idea, it is a "trick" that works for a peculiar reason.  Recall that the name of this Indicator is Waveform Chart.  A Waveform has three components:  t0, the starting X Value, dt, the constant spacing of all the unspecified, but computable X values, and Y, an array of all the Y Values.  This "trick" lets you specify X (as t0), ignore dt (since you have only a single X), and replace the Y array with a single-element Array holding the single value of Y.  I suppose you do get scrolling and other "Chart" attributes (I've never actually tried using this trick, though I applaud its cleverness).

 

Some time ago, I found a Blog Post (which I could probably find again) that described what I've come to call a "FlexiGraph", an XY Graph that had (by programmatic design) "Chart-like" scrolling properties.  It also had the possibility of changing X scales during data collection, working by keeping several N-point copies of the plotted data in memory, updating all of them as new points arrived, and displaying the appropriately-scaled one as the User requests.  It is a little tricky to program, but works like a charm, is fast and is memory-efficient.

 

Bob Schor

0 Kudos
Message 9 of 27
(365 Views)
Highlighted

wiebe@CARYA wrote:

A restriction is X has to increase, or nothing will show?

Another restriction is all channels have to have the same number of waveforms added. 


Yep, all hell breaks loose when X goes backwards.

 

As far as the number of waveforms added, that only makes sense since you should only be writing to a chart from the terminal.  This means you should have an array of waveforms already; a waveform for each channel.  So I don't really consider this a restriction.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 10 of 27
(340 Views)