10-25-2024 04:17 AM
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.
Solved! Go to Solution.
10-25-2024 06:11 AM - edited 10-25-2024 06:12 AM
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!
10-25-2024 08:41 AM
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.
10-25-2024 10:38 AM
Can you please show me example of what you said.
10-25-2024 11:04 AM
@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.
10-28-2024 05:00 AM
10-28-2024 05:26 AM
10-28-2024 05:32 AM
Thank you for that but I am beginner and still cannot do what you mentioned so can you please help with example !!
10-28-2024 05:52 AM
10-28-2024 05:57 AM
Nice advice !!! I will see later.