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

DAQ reading too quickly in For Loop

已解决!
转到解答

I'm trying to characterize a system with a VI that sets the speed of a motor, waits for 7 seconds to spin up, then takes 200 readings averages them.  The sample rate is 20 Hz, so with 200 samples it should take 10 seconds.  The program then loops through another iteration, sets the motor speed using the next value and repeates the process.  

 

Although the first iteration works well, for some reason something goes wrong in all the iterations after that, because it takes reading for only 2 or 3 seconds instead of the 10 that it should take.  I'm not sure if it's some kind of memory issue or maybe something else.  VI is attached.  Thanks!

0 项奖励
1 条消息(共 3 条)
2,601 次查看
解答
已被主题作者 LiveEveryDay 接受

That would be because you are using acquisition mode =  "continuous acquiition" not "N sample (on Demand)" so while you are waiting the seven seconds you are taking samples


"Should be" isn't "Is" -Jay
2 条消息(共 3 条)
2,594 次查看

You need to make sure that automatic error handling is turned on or connect some error out indicators. Besides what Jeff said, the timeout for the acquisition is also 10 seconds. You could be getting a timeout error after the first acquisition and no data after that.

0 项奖励
3 条消息(共 3 条)
2,587 次查看