LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph

Solved!
Go to solution

Can anyone help me please. I want to plot XY graph where my x-axis is acquired voltage signal, and y-axis is another acquired voltage signal and both been read by NI module, I want to have the graph to be build continuously. In other words, to have each x&y values as point and so on getting multiple points from different x & y vales. what I am getting is a graph once stop running the system, but what I need is graph similar to the normal graph that been created with time on the x-axis.   

0 Kudos
Message 1 of 16
(447 Views)

Hi Omar,

 


@Omar-Abdelhameed wrote:

I want to plot XY graph where my x-axis is acquired voltage signal, and y-axis is another acquired voltage signal and both been read by NI module, I want to have the graph to be build continuously.

 

what I am getting is a graph once stop running the system, but what I need is graph similar to the normal graph that been created with time on the x-axis.   


Unfortunately you forgot to attach your current code…

 

Answer: build the XY plot inside your loop to display the data inside the loop. THINK DATAFLOW!

Best regards,
GerdW


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

hi Omar

 

XY graphs are plotted by combining 2 arrays into a cluster, in order to keep building up your XY plot, you need t o add your new point  into the existing set of points, you are probably running on a while loop. 

THen you need to create shift registers (one for x and one for y) and add the new point to the existing array using build array. At every iteration, bundle X Y arrays and plot it INSIDE the loop. This way the XY plot will be continuously growing and being plotted as you collect the data. 

As GerdW said, post your code and we can point areas in your code to get what you need. 

 

 

0 Kudos
Message 3 of 16
(395 Views)

Can you please show me example of what you said. 

0 Kudos
Message 4 of 16
(380 Views)

@Omar-Abdelhameed wrote:

Can you please show me example of what you said. 


Homework assignment examples  are not normally provided unless they are simple modifications to what you have attached to your post.  Show us what you've done and then explain why it doesn't work right for you.  Then you'll get better help since we can see what concepts you are struggling with. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 16
(375 Views)

1.png2.png

0 Kudos
Message 6 of 16
(326 Views)

Hi Omar,

 

the VI does EXACTLY what YOU programmed it to do!

 

Your XY plot consists of exactly one point - and this never changes...

 

Again: You need to build an array of points inside the loop!

Best regards,
GerdW


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

Thank you for that but I am beginner and still cannot do what you mentioned so can you please help with example !! 

0 Kudos
Message 8 of 16
(315 Views)

Hi Omar,

 

please take the Core1 lessons to learn how to handle/create arrays in loops - this is VERY BASIC LabVIEW stuff...

 

All you need is a BuildArray node and a shift register!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 16
(305 Views)

Nice advice !!! I will see later. 

0 Kudos
Message 10 of 16
(302 Views)