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

Starting an array of DAQmx tasks throws error 50103 on start

Hello,

 

I am creating and starting a number of tasks from an enum array which will be subsequently used to read data from devices.  The issue is that the second iteration of the starting loop throws error 50103 (specified resource reserved).

 

When I carried out some testing I discovered that the tasks are set up correctly and the error is thrown only on the start task.

 

I have attached the section of code for reference. 

 

Thanks

Dave

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

You are not clearing the DAQ tasks when you are done with them.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 项奖励
2 条消息(共 6 条)
3,424 次查看

Hi Mike,

 

This is only the setup and configuration routine for a producer / consumer acquisition.  My producer loop contains the DAQmx read which I plan to pass the list of tasks produced by this vi.  I have a clear Task function within a FOR loop which gets called after all acquisitions have been completed.

 

As far as I know, the task setup routine shown in my previous only adds channels to the task, not moves it to the Reserved state.

 

I have also tested this without the Start.vi, and I got the same error, but this time within the acquisition loop at the DAQmx Read function.

 

Dave

0 项奖励
3 条消息(共 6 条)
3,412 次查看

The problem is that if you call this VI twice without closing the tasks you'll get exactly the error you specified. So the question might be, why are you trying to call this VI multiple times?

 

Regardless of your overall software architecture, the basic flow should be that you open your DAQ refernces once, uses them over and over, and then when you are all done - close them.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 项奖励
4 条消息(共 6 条)
3,397 次查看

I have to call the start vi more than once as the tasks are contained within an array.  As I understand (but suspect I may be incorrect), that for each case corresponding to the input enum array, the task within that case is started (once) due to the auto indexing of the array.

 

This is a subVI which is only called once in the application.  The output from this should be a list of started tasks which I use in subsequent read operations until the program is complete, where the tasks are then cleared down.

 

Apologies if I have repeated myself, but I am trying to understand how this works, since what I am seeing does not seem to make any sense to me.

 

Dave

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

Duh... I just noticed that the first two cases are both trying to access the same channel (Dev2/Ai0).

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 项奖励
6 条消息(共 6 条)
3,362 次查看