LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creat XY graph multiscale (graph multiplot) automatically?

Solved!
Go to solution

Hi,
I can Creat XY graph multiscale (graph multiplot) automatically ?
I means to detect how many of curve we have in graph and show a multiscale Which corresponds to each curve automatically.
160817i5765F4963ADB242B (1).png



0 Kudos
Message 1 of 11
(3,997 Views)

Hi Sarah,

 

no, you cannot create new scales at runtime.

Yes, you can show and hide pre-defined scales ate runtime using property nodes.

 

Create as many scales as you think you will need and show them as needed!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,968 Views)
Solution
Accepted by topic author Sarah_LAB

hi sarah_lab,

to get the current number of plots, you have two options.

1. the size of your value array of the xy-graph

2. increment the xy-graph-property.ActivePlot until an error occurs

 

 

also see this snippet

graphs-programmatically-add-plot.png


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 11
(3,958 Views)

hi jwscs 

 

 

0 Kudos
Message 4 of 11
(3,925 Views)

the image i posted is a .png with extra information, called a snippet (which can be identified by the top left iconification)

you can drag+drop it onto a blockdiagram

 

and you also can create snippets yourself easily, just have a look at the menu "Edit"->"Create Snippet from Selection"

 

on the top right there is the labview version with which it was created,

if you have labview >= 2016 it should work, otherwise please state your labview version, so i could make a save for previous version.

 

regarding the question, wether scales can be created at runtime, gerdw posted that it is not possible.

my googlefu supports that.

 

regards

 

ps: i am a gengineered gecko-eating cat 😉


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 11
(3,919 Views)

Thank you 
That's exactly what I was looking for, but how can I link each curve with its axis?
As you notice the curves are small relative to axis.
example.png

0 Kudos
Message 6 of 11
(3,892 Views)
Solution
Accepted by topic author Sarah_LAB

Hi Sarah,

 

each plot has a property to assign it to a scale...

Best regards,
GerdW


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

in my example i have one graph with 4 plot,  i can't get the property of each plot?
how can get it ?
I'm sorry I'm still a beginner in labview Smiley Sad .
thank you for your attention.

0 Kudos
Message 8 of 11
(3,884 Views)
Solution
Accepted by topic author Sarah_LAB

you are half there:

 

since you know which plot is which,

you use the property node of the graph,

the first property you set is "Active Plot", like you do already,

then you pull down to add another property "Plot -> Y Scale Index"

 

xy-graph-active-plot-active-scale.png

 

hover over the properties with CTRL+h to see what the help sais about it.

 

have a look generally what properties there are ..

some properties you will find almost everywhere,

the lower ones are almost always the more specific ones to the thing you have the property node from/for.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 9 of 11
(3,879 Views)

Thank you guys, the problem is solved,
Heart Heart

0 Kudos
Message 10 of 11
(3,856 Views)