LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drawing single points on XY graph

Hello,

 

I have a problem with XY Graph. How to make adding simple points to XY Graph works?

 

The concept is that user by using button add results of specific mathematic function with parameter given by the user himself, so next x,y point appear on graph after each click on button. Example effect in attachment.

 

Greetings

 

0 Kudos
Message 1 of 6
(3,418 Views)

You need to build your data in shift registers. There are plenty of examples in the forum here. What kind of data do you have?

 

It also looks like your data is equally spaced in x, thus a waveform graph is sufficient. Build the 1D data array in a shift register.

0 Kudos
Message 2 of 6
(3,411 Views)

Hi,

 

Thanks for idea about shift registers. I'm still learning and everything for me is new.

 

I've created VI that represents my idea, but still have one problem to solve. Indicator of result of eqation (in this case X^2=Y) is updated only when I click a button to add new points to graph. Is there a possibility to make indicator update whenever user change value of X?

 

Greetings

0 Kudos
Message 3 of 6
(3,358 Views)


You need the event  "Value Change" for X.

0 Kudos
Message 4 of 6
(3,330 Views)

If you use the "build xy graph" express VI, you don't need the shift registers. Just configure it to not clear data on each call.

(see example)

 

If you use shift registers, I would recommend complex data. Simplifies the code significantly. 😉 (see other example)

 

(I don't understand the song and dance with the timeout event....)

 

 

Download All
0 Kudos
Message 5 of 6
(3,319 Views)

Altenbach,

 

Quick question regarding the express for xy graph. If I had multiple y values could this express vi work for me (multi plotting)? I'm sure just building an array of my individual (qty 4) Y values would not work. Would I bundle, then build array for my Y values? Would I have to do the same for the X value.

 

I would not be "clearing data".

 

Each iteration of the Express VI would be plotting the following:

 

(1) X value, (4) Y values

 

Thanks in advance.

0 Kudos
Message 6 of 6
(2,883 Views)