Jump to content

XY Graph with user input


Recommended Posts

Hi all,

Thanks in advance for any of your advice.

I am trying to do a very simple task. I want to display a voltage signal (corresponds to some quality parameter I need to monitor) on a XY graph. I need to display a static upper control limit and lower control limit and a moving, real-time value with the user supply the location (x axis). In my attached program I used a random number generator in place of the voltage signal. The problem I have is I can only display one point at a time. What do I need to do to display the last twelve data points? I have tried many different ways (using loops, array etc.) but to no avail. Please help.

MC

Download File:post-4960-1148421910.vi

Link to comment
Try this.

Thanks. But that's not exactly what I try to do. On my front panel I have a number controller and my application requires the user to click on the number controller to provide the location (1, 2, 3) and each location will have a voltage reading. Thus, I cannot use a For Loop.

MC

Link to comment

I think you are looking for a "chart" instead of a "graph". The chart holds a history of the data. So just feed in the new datapoint and it will be inserted on the right by shifting the rest to left. Set chart history length (rmb) and x-axis scale to your needs. Unfortunately it doesn't exist as xy-graph (x-axis is always time or a monoton growing number).

oh, almost forgot: you'll have to insert the limits as point each time you insert a data point, or they are also shifted left outside view.

Link to comment
I think you are looking for a "chart" instead of a "graph". The chart holds a history of the data. So just feed in the new datapoint and it will be inserted on the right by shifting the rest to left. Set chart history length (rmb) and x-axis scale to your needs. Unfortunately it doesn't exist as xy-graph (x-axis is always time or a monoton growing number).

oh, almost forgot: you'll have to insert the limits as point each time you insert a data point, or they are also shifted left outside view.

Thanks. Can you be more specific by giving detail instructions or examples? I appreciate your help.

MC

Link to comment
Thanks. Can you be more specific by giving detail instructions or examples? I appreciate your help.

MC

I found a solution. I used Express XY graph instead of XY graph. Express XY graph gives me an option of "Not clearing previous data" whereas XY graph does not.

Thanks for looking into this guys. I am sure I'll have more questions in the future.

MC

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.