11-14-2012 02:15 PM
I am using a Compact DAQ with 9211 TC module, creating my tasks in MAX. In my LV 2012 application I need to modify the task at times to change the Thermocouple type and min/max input ranges independently for each channel, and do this once the task has already been running. I have successfully achieved this by first using the "Clear Task.vi", modifying the properties using a Daqmx Channel node, and then restarting the task.
I first tried to simply stop the task (Stop Task.vi), modify the properties and resart, but I would receive error -201171 suggesting a min input value out of range.
It isn't clear to me why I need to clear the task rahter than just stop the task to modify the properties, and the error I receive does not seem accurate with the behavior I am seeing.
I am wondering if this is a bug or expected behavior?
Thanks
Dan
11-14-2012 07:51 PM - edited 11-14-2012 07:52 PM
Hi Dan,
It might be a bug. Could you provide some more information?
Brad
11-15-2012 01:44 PM
Brad,
One other thing to note is that I have replicated this issue both with simulated HW and with the actual HW
To answer your questions:
1. I am using a cDaq 9174 (simulated) with Daqmx v9.5.5 (have also replicated the issue with a cDaq-9178 - real HW)
2. I am passing values given in the following link for polynomial limits: http://digital.ni.com/public.nsf/allkb/98EE9F9C730FDF09862572F800603D6B
and have verified I am passing the correct values for the respective therrmocouple.
3. I am setting the AI.Thrmcple.Type, AI.Min, and AI.Max properties after stopping the task.
4. Nothing else is preformed in between stopping and restarting the task other than writing these three properties for each of 4-chs on a 9211
5. This did not prevent the error.
Thanks
Dan
11-16-2012 01:06 AM
@LV_Dan wrote:
I am using a Compact DAQ with 9211 TC module, creating my tasks in MAX. In my LV 2012 application I need to modify the task at times to change the Thermocouple type and min/max input ranges independently for each channel, and do this once the task has already been running. I have successfully achieved this by first using the "Clear Task.vi", modifying the properties using a Daqmx Channel node, and then restarting the task.
I first tried to simply stop the task (Stop Task.vi), modify the properties and resart, but I would receive error -201171 suggesting a min input value out of range.
It isn't clear to me why I need to clear the task rahter than just stop the task to modify the properties, and the error I receive does not seem accurate with the behavior I am seeing.
I am wondering if this is a bug or expected behavior?
Thanks
Dan
You have the difference between the Stop and the clear task vi in handling the hardware resources.That is the reason it worked for changing the configuration when you have cleared the task and didn't work when you just try to stop the task. You can take a look into the Knowledge Base for more detail.
Good luck