取消
显示结果 
搜索替代 
您的意思是: 

plotting dynamic data but plot showing previous acquired data too

已解决!
转到解答

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. 

0 项奖励
1 条消息(共 9 条)
5,325 次查看

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.

Cory K
2 条消息(共 9 条)
5,318 次查看

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.

0 项奖励
3 条消息(共 9 条)
5,314 次查看

 


@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

 

Cory K
0 项奖励
4 条消息(共 9 条)
5,305 次查看

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.

0 项奖励
5 条消息(共 9 条)
5,301 次查看

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.

Tim
GHSP
0 项奖励
6 条消息(共 9 条)
5,300 次查看
解答
已被主题作者 mssrb 接受

 


@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.

7 条消息(共 9 条)
5,293 次查看

 


@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 极度高兴的表情

 

Cory K
8 条消息(共 9 条)
5,277 次查看

Thank you mate. That did the work. Thank you again.

0 项奖励
9 条消息(共 9 条)
5,274 次查看