From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are charts and graphs so difficult?

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!

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 27
(2,400 Views)

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
(2,335 Views)

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 27
(2,313 Views)

@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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 27
(2,289 Views)

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

 

Bob Schor

0 Kudos
Message 5 of 27
(2,277 Views)

@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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 27
(2,258 Views)

@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
(2,252 Views)

BTW...


This only got 20 kudos: XY-chart.

 

The nugget is there as well.

0 Kudos
Message 8 of 27
(2,249 Views)

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
(2,237 Views)

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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 27
(2,212 Views)