ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
08-18-2010 08:39 AM
Hi, I am trying to plot a voltage-signal graph simultaneously, as it is being acquired by the computer from the SR830 lock-in amplifier. I have used a X-Y plot and placed it inside the for loop where the data is being acquired. <It only shows me the last point instead of all the points acquired earlier too. I want to retain the earlier data plot as well instead of just the last data point but want to update the graph as the data are acquired sequentially. If I put the x-y plot outside the loop. it will acquire a set of data before plotting which is not desirable in my case, as data has to be plotted dynamically. Can u guys please suggest me a way. Am I doing something wrong? thanks in advance.
Please find the VI attached.
Solved! Go to Solution.
08-18-2010 09:41 AM
You are close, but not quite.
Right before you use the 'Build XY Graph' express function, you turn a double precision value into a 1D array.
I'm assuming you are doing that to try to build an array, but thats a little incorrect.
I do not have the two subVI's that you use so I cannot run your VI.
However, please try to run the modified version of your VI and let me know if it works.
08-18-2010 09:48 AM
The "built xy graph" express VI has a "reset?" input. Wire a true to it to reset the internal data. In your particular case do a "=0" on the iteration terminal of the inner for loop and wire it to the reset input.
08-18-2010 09:56 AM
@altenbach wrote:
The "built xy graph" express VI has a "reset?" input. Wire a true to it to reset the internal data. In your particular case do a "=0" on the iteration terminal of the inner for loop and wire it to the reset input.
Now I'm confused. Does he want to keep the previous data or not?
He made it sound like he is only getting 1 point in the graph, but he wants to keep all of the data in the graph
08-18-2010 10:01 AM
I am sorry about the title it should read like "plotting dynamic data but not plot showing previous acquired data". My plot is only showing the most recent data but not the previous ones ... I want them too in my plot.
08-18-2010 10:04 AM - edited 08-18-2010 10:04 AM
This should work
Some things to consider:
1. Look into the producer consumer architecture.
2. Have the write to file done in a different loop.
08-18-2010 10:08 AM - edited 08-18-2010 10:11 AM
@cory K wrote:
@altenbach wrote:
The "built xy graph" express VI has a "reset?" input. Wire a true to it to reset the internal data. In your particular case do a "=0" on the iteration terminal of the inner for loop and wire it to the reset input.
Now I'm confused. Does he want to keep the previous data or not?
He made it sound like he is only getting 1 point in the graph, but he wants to keep all of the data in the graph
Sorry, my message was incomplete. You need to double-click the "build xy graph" express VI and un-check "clear data on each call". Easy enough? 😄
Whenever you want to start over, wire a true to the reset input to clear the history.
08-18-2010 10:34 AM
@altenbach wrote:
Sorry, my message was incomplete. You need to double-click the "build xy graph" express VI and un-check "clear data on each call". Easy enough? 😄
Normally, I would say unchecking a box would be easy.
However, I dare not risk navigating through an express VI, we've lost too many good men in those dangerous waters
08-18-2010 10:43 AM
Thank you mate. That did the work. Thank you again.