LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph, initialize multiple sets of data, and update only one set of data

Solved!
Go to solution

do you want some thing like this

0 Kudos
Message 11 of 21
(1,850 Views)

Hi SJL,

 

programming in LabView is like drawing ancient Egyptian and Chinese symbols.

From your linked website:

To code (verb) is to write programming statements - that is, to write the source code for a program.

That's what you do with LabVIEW too. It's a programming environment!

(It's a different environment than a standard text editor, though.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 21
(1,822 Views)

Point Taken,

 

Hatef.fouladi, Somewhat, but not exactly.

 

Basically my xygraph has to be able to simply conserve a background plot, and add and refresh a new plot on top of that. Optimally it should be able to also trace the newplot with a switch.

0 Kudos
Message 13 of 21
(1,802 Views)
what you want Technically is not possible or correct way to use XY graph
but you can use some trick to do it
for example you can use property node of x scale range manipulation to tracing a plot or by rebuilding a arrays in several mode you can conserve a background plot or refresh them
just work with arrays feature and xy graph property nodes to achieve that
0 Kudos
Message 14 of 21
(1,794 Views)

Thank you, that's more of the idea I've been leaning towards.

 

Using arrays and using property node of the graph to "freeze" some plots. Is there a property node for a single plot within a graph?

 

After speaking to a few colleagues, I've decided to try disabling updating the graph entirely while the motors are moving. So far, performance incread by a factor of a 100, literally. What bothers me the most is how easy it is to create over 5000 interactive buttons within 10 lines of code in Java, while adding 100 switches/buttons to my front panel starts causing a lag in block diagram updates. Maybe there is a better way?

 

This encouraged me to use XY graph and cursor.

 

Also, is there a way in LabView to create an array of controls which can be individually called by the index inside a for loop?

 

I.e. something similar to:

{

"some general class with many different methods" a[Index][Jndex];

for(int i=0;i<Index;i++){

for (int j=0;j<Jndex;j++){

a[i][j]."Drawn at position";

method(a[i][j]); // some function that assigning event listener for a[i][j]

 

}}}

then later I can use:

display=a[1][2].getSomeThing

or

another loop,

if (a[i][j]=condition){

make that control red if control boolean already been pressed, or blink the value is inconsistent with condition.

}

instead of physically dragging out hundreds of switches, then linking them to case structure(s) to do a similar task?

 

What I would very like to see is an example code of someone making 10x10 switches where individual switch sends out to display, an array of 2 integers, all different values read in from a .csv file. Without making 100 individual switches to be wired in the block diagram.

0 Kudos
Message 15 of 21
(1,783 Views)
Hi sjl,

When you need 10 by 10 switches you should use a 2d array of switches. And when you want to react on user actions you should use the event structure...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 21
(1,775 Views)
Despite hatefs comment on "technically not possible" it is quite easy to create several plots for graphs. And it's also quite easy to create one plot in INIT state and other plots later on.
Did you try to follow my comments so far?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 21
(1,768 Views)

Hello GerdW,

 

I'm still a little puzzled on where the connection from 

Plot -> Build Array -> Graph

should happen.

 

Say Plot 1, 2 is made once in INIT state, and plot 3 and 4 is made inside the While Loop, where should they be built into an array and where should they be connected to the graph if I wish to keep the graph interactive, such that I can extract information about the location of cursor snapping onto one of the points for Plot 1.

 

I am still cleaning up my big mess of a VI.

0 Kudos
Message 18 of 21
(1,750 Views)

@GerdW wrote:
Despite hatefs comment on "technically not possible" it is quite easy to create several plots for graphs. And it's also quite easy to create one plot in INIT state and other plots later on.
Did you try to follow my comments so far?

Gerdw did you see the vi that multiplot?!
what I told technically not possible is that use xy praph  the same time with the graph, chart and xy graph features becouse labview technically have appropriate tools for each of them  but it is not means that we could not do it 

0 Kudos
Message 19 of 21
(1,727 Views)
Solution
Accepted by topic author SJLPHI

Hi SJL,

 

 

I'm still a little puzzled on where the connection from  Plot -> Build Array -> Graph should happen.

Like this:

check.png

A "static" plot is generated before the loop (in your INIT state), one plot is drawn in the loop (your measurement state)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 21
(1,677 Views)