Instrument Control (GPIB, Serial, VISA, IVI)

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

Multiple serial data stream inputs

已解决!
转到解答

Lynn,

 

I added a while loop that keeps flushing the Queues in the Dequeue loop that I believe is continually flushing the data out until the loop times out and allows the next data to be written to the spreadsheet.  The queue size monitor appears to be controlling in the range of between 0 and 10 samples.  I would appreciate it if you could take a look and let me know if I am on the right track.

 

Phil

 

vi attached

0 项奖励
11 条消息(共 15 条)
1,561 次查看

Phil,

 

Your inner loop only runs once for each iteration of the outer loop. Most likely the flush occurs immediately after the loop starts running. Then after the Wait, the loop stops and the Dequeues start.  If any of the enqueue loop has run more than once during the wait, you will have multiple elements in the queues and will only read the oldest ones.  This explains why you see up to 10 on the queue size monitor.

 

If you move the flush queues after the Wait, then you will get the next data in the queues.  However, you will need to wait until new data is put into each of the queues after the flushes, so you may need to adjust the wait times.

 

Lynn

 

Fluh Queues after.png

12 条消息(共 15 条)
1,560 次查看
解答
接受人 larosts

Lynn,

 

Looks lie it is working.

 

On to some more rigorous testing.

 

 

Phil

0 项奖励
13 条消息(共 15 条)
1,556 次查看

Lynn,

 

Application working great so far.  A lot of cleaning up to do but the basic system is working just fine.

 

An remote pint to you for all of your help.

 

Thanks so much,

Phil

0 项奖励
14 条消息(共 15 条)
1,540 次查看

Phil,

 

Glad you got it working.

 

Lynn

0 项奖励
15 条消息(共 15 条)
1,536 次查看