From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Not possible to programmatically stack plots in chart?

Solved!
Go to solution

xMU8H2Ir5K.gif

including a gif screenshot here of what I'd like to be able to do programmatically...

 

Is it not possible to have a chart with stacked plots increase in plot count while running?  I even have to select overlay and then stack plots again between runs to get it to show up.

 

I have a dynamic number of events I want to monitor the "on and off" state of in a rolling chart fashion.  If anyone know of any other way to do it that would be appreciated.

Message 1 of 8
(1,491 Views)

Based on the help document - I would assume this as an edit-time feature (available only through VI scripting), meaning only during an edit, it can script the placement of stacked charts.

 

santo_13_0-1634397396196.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 8
(1,452 Views)

You can use a picture indicator and some code to turn your data into the desired plots. Won't be easy, though. (Have a look at "xy mulitiplot" in the example finder for some basics.)

 

You can use a single chart and scale and offset the data of the various plots.

 


@p27 wrote:

I have a dynamic number of events I want to monitor the "on and off" state of in a rolling chart fashion.  If anyone know of any other way to do it that would be appreciated.


What is an "event" and how does it look like? Maybe a digital graph would be something? Can you attach a more realistic example?

 

 

Message 3 of 8
(1,449 Views)

The easiest option would probably be to hide the Y scale entirely and just shift your data up (e.g. plot one can be 0 or 1, plot 2 can be 1.1 or 2.1, etc.). You could draw a fake Y scale using the plot images properties and add plots with fills to serve as the separator bars if you want that too.

 

All that should be relatively easy with an XY graph. I'm not familiar enough with the differences for waveform charts to tell what would be required there, but you could definitely hold the data in a circular buffer (like a lossy queue) and build the graph.

 

Edit - or go with Altenbach's suggestion of a digital graph, which might be simpler and still do what you want.


___________________
Try to take over the world!
Message 4 of 8
(1,430 Views)

thanks for the info and ideas-  scripting occurred to me but I just assumed I'd get lost, I've only done some very simple scripting work before.  I'm going to at leats look into it and see if it as complicated as I expect...

 

I'll take a look at XY multiplot and the possibility of using digital graph too- really all I need to show is the binary state of incoming "jobs"- basically just a plot that goes high while something is being worked on and goes low when its done.  Having plots would be a nice way to see the actual timing of which "job" is started and finished in relation to others.

 

I didnt think of doing a multiplot with shifted data... that wouldnt be too hard...

 

I'll take a peek at digital plot first and see if that's the easiest option though...

 

thanks again!

0 Kudos
Message 5 of 8
(1,396 Views)

Ok here's what I cobbled together for a test (vi is 2018 64b)... seems to work but I'd like to get the 1/0 indicators off the graph if possible...

 

also is it possible to have it allow for scaling or vertical scrolling if the number of lines/plots goes off the chart?

 

U3Mw1eCJCj - Copy.gif

0 Kudos
Message 6 of 8
(1,385 Views)
Solution
Accepted by topic author p27

See if this can give you some ideas. I am sure it could be simplified....

 

 

Message 7 of 8
(1,360 Views)

Better result than mine and so much simpler!

 

thanks!

 

0 Kudos
Message 8 of 8
(1,355 Views)