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: 

Write on chart while dispalying data at runtime

ok, is that possipole? as you know i can't use annonations with charts, so what's the altranative way to write text on chart while it's displaying data, i have labview 2016, biomedical, signal express, sound and vibration toolkits, i'm installed the trials for testing if even there is a kit that allow me to do that, without having to use graph as chart ( it's simply not working with multi signal)

 

so, is there a way?

 

thank you

0 Kudos
Message 1 of 26
(3,557 Views)

Hi Fox,

 

"as you know" you cannot use cursors/annotations with a chart, but with a graph you can use them.

So the simple solution is: use a graph instead of your chart!

 

without having to use graph as chart ( it's simply not working with multi signal)

Well, I can have multiple signals (plots) in a graph without any problems…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 26
(3,549 Views)

thank you for fast reply,

that main reason i'm using chart for is that charts have history , graphs don't .. it's critical for me to keep plotting history with scroll bar, it's continuse plotting app .. when i mentioned the graph i was talking about vi on the internet that uses graph as chart (graph with history) but as i noted , it's only 2 signals , and no scroll bar

0 Kudos
Message 3 of 26
(3,538 Views)

Hi Fox,

 

it's critical for me to keep plotting history with scroll bar, it's continuse plotting app ..

You can keep a plot history on your own for a graph…

 

i was talking about vi on the internet that uses graph as chart (graph with history)

Which VI are you talking about? "The internet" is big…

 

but as i noted , it's only 2 signals , and no scroll bar

No, you didn't note this fact…

 

When you need annotations and cursors you should use a graph. Point.

With a graph you have to keep your own plot history.

 

Another solution:

Use a transparent picture indicator. Put it in front of your chart. Draw your annotations in the picture indicator.

While this will fake the annotations available in a graph it will not provide an easy (or: easier) solution…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 26
(3,536 Views)

can i have graph with history and x scroll bar?

 

another solution i'm thinking of, can't i send my text to the chart as second line? i mean force the chart to drow my text with second line plot, crazy idea? hope not

 

also doesn't the whole biomedical toolkit have chart or whatever function like chart with annonations?

0 Kudos
Message 5 of 26
(3,514 Views)

Let's assume you are sampling at 100 Hz and want to sample for about three hours, or 10,000 seconds.  Let's further assume that you have a wide monitor, and decide to plot 1000 points.

 

If you do a Chart and want to see "all the data", you will need a History of 1,000,000 points, and (by default) will be able to view 10 seconds of data at a time.  You can scroll back and look at any 10-second period over the three hours of data, of course, but that's your "default window".

 

Suppose you decided to graph the data, instead.  But what data?  Well, instead of setting aside 1,000,000 points for our data buffer, let's set out 4 1000-point buffers:  the first one will get "the last 1000 points".  We will also create "decimating averages" of the incoming data, averaging every 10 points together to make a new "factor-of-10-decimated" point, allowing our 1000-point buffer to "see" the last 10,000 points.  Doing the same thing two more times means that the fourth buffer has a factor of 1000 decimation, and sees the last 1,000,000 points (or all the data).

It's easy enough to make the graphs appear to "scroll" so that they show the last 100, 1000, 10000, or 100000 seconds.  They are all "anchored" at the current point being displayed, so there's no "scroll bar" to look backwards at higher resolution.  Of course, if you really need this, you can also program a separate graph to dip into the data being streamed to disk and look at any segment you want.

 

My point is that you can do a lot with Graphs, while minimizing the impact on PC memory and other resources.  Switching your graph between the four "scales" (x1, x10, x100, and x1000) is virtually instantaneous, as is updating the graphs.

 

Bob Schor

0 Kudos
Message 6 of 26
(3,496 Views)

i'm sorry, i'm lv begainner and don't understand most of your reply, what i did understand is that you can do graph with scroll and history.. can you provide me with code example that i can use?

0 Kudos
Message 7 of 26
(3,466 Views)

Hi Fox,

 

i'm lv begainner and don't understand most of your reply

NI provides a lot of tutorials for LabVIEW beginners. Did you take them? They are (mostly) for free!

 

can you provide me with code example that i can use?

You know LabVIEW comes with a lot of example VIs!? Did you examine them already?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 26
(3,450 Views)

sorry, i think it's my mistake that i didn't fully explain my problem in specific

 

i'm attaching the vi i'm working on

it acquire sound then detect rms then display the signal on chart

 

the chart it self has scroll bar with history so i can go back with scroll bar to any time i want since the application run

 

as you will see i'm using button named mark to add line mark to the chart on certain time (using another line plot with diffrent color) , the mark will move to the history with the signal so i can go back and see exactly where and when did i put mark

 

and my big problem is that i want to put text or even numbers instead of the line mark, so that i can remember my markings

 

although i'm lv beginner.. yet i'm sure that my problem isn't addressed in lv help, ni tutorial, or even lv examples, i think that's big problem and will need lot's of lv expert programming that's why i'm asking for help here

 

thanks

 

although i'm begenner yet i'm sure that

0 Kudos
Message 9 of 26
(3,446 Views)

Hi Fox,

 

although i'm lv beginner.. yet i'm sure that my problem isn't addressed in lv help, ni tutorial, or even lv examples,

There are example VIs explaining how to use graphs with your own history buffer.

And there are example VIs explaining how to use annotations with graphs.

 

What did you want? Annotations within a graph?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 26
(3,435 Views)