Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

specified resource reserved for first 9 seconds of thread..

SCXI,

I see that you are explicitly interacting with the task state model whenever you verify your task. This should not be the case, but each task may not be returning to the verified state after execution. What happens if you remove the "Tasks(TaskCount).Control(TaskAction.Verify)" line? Also, in order to explicitly release the resources, you may wish to try executing "Tasks(TaskCount).Control(TaskAction.Unreserve)" after the read. Please let us know the results.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 11 of 15
(1,784 Views)

Unreserve after creating the tasks does not work.

If I delay the read call for 10 seconds the program merely waits 20 seconds before reading while still erroring about 10 times.  It's weird because I have scalars and offsets for every channel to convert voltage into a value yet the text boxes still show zeros as if they aren't even referring to my voltage to value calculation yet.

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 12 of 15
(1,767 Views)
SCXI,

Could you try reading"-1" points instead of 100? For a finite acquisition, the default behavior when "-1 " is entered is to read all available samples. I'm hoping that this will cause th task unreserve all resources, preventing the error. Please let me know if that helps.

Regards,
Ryan
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 13 of 15
(1,754 Views)
How will I calculate an average if I don't know how many readings are taken?
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 14 of 15
(1,751 Views)
SCXI,

As this is a finite task, the card will only acquire 100 samples. By setting up the task for a finite samples and specifying "-1" in the read, you can be sure that the task will return the exact number of samples specified in the task. If you execute the read before 100 samples have been acquired, it will wait until all have been before returning data.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 15 of 15
(1,749 Views)