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

Restarting a DAQ Task Inside a For Loop

已解决!
转到解答

Hello,

 

I need to iterate my data acquisition. Currently, I am doing this by creating, implementing, and clearing DAQ tasks inside a For Loop that is iterated as necessary. Unfortunately, the creation of these DAQ tasks significantly slows down my code.

 

I would like to be able to create the tasks outside the loop, pass them in, and restart the tasks at the beginning of every iteration. Is there an easy way to do this?

 

Alternatively, is there a way to make the standard DAQmx Digital Start Trigger trigger multiple times (so that it starts data acquisition at every pulse in a long pulse train as opposed to just the first pulse)?

 

Thanks!

 

- Evan

0 项奖励
1 条消息(共 6 条)
4,514 次查看

Can you share your code, or at least the relevant portion of your code?  How are you configuring the DAQ task?  Is there some reason you can't just restart the existing task, instead of destroying the task and recreating it?

0 项奖励
2 条消息(共 6 条)
4,512 次查看
解答
接受人 ERM19

I whent ahead and created this example for you (And many others.)

daq.png


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

Awesome! 

 

I'll give this a shot tomorrow and post my code if it doesn't work.

 

Thanks for the quick responses!

 

- Evan

0 项奖励
4 条消息(共 6 条)
4,500 次查看

@ERM19 wrote:

Awesome! 

 

I'll give this a shot tomorrow and post my code if it doesn't work.

 

Thanks for the quick responses!

 

- Evan


I don't think you will post your code... 🙂

 

-----

The best solution is the one you find it by yourself
5 条消息(共 6 条)
4,497 次查看

Worked like a charm 🙂

 

Thanks again!

6 条消息(共 6 条)
4,481 次查看