Posted 20 July 2012 - 11:25 PM
And so I would like to give names to my tasks.
It ought to be simple but still it illudes me. So now I ask... How do I give a name to a task so that error messages then will be helpful?
Posted 23 July 2012 - 01:22 PM
If that's true, that's really annoying - the wire of the task has the name of the task in it.
But beware: if one of your threads closes the task, and then another tries to access it, you can get the old unnamed task error, I think. I'm pretty sure I've done this bellyflop at times.
Posted 23 July 2012 - 02:20 PM
asbo: I'm not sure if this is the case with this error, but my understanding is that many of the errors reported by DAQ are designed with real-time in mind where even in the error case they avoid allocating memory -- i.e., no strings in the error code clusters. This means that all you get is the static text that can be obtained from the error code number itself. Much of the DAQ code was written before there was a conditional disable structure, so special casing the behavior on desktop wasn't an option. I have seen some recently written VIs that behave differently and give more helpful errors in the non-RT case.
Posted 23 July 2012 - 11:25 PM
Later: In LabVIEW 2011 with DAQmx v9.3.5, you *do* get the task name as part of the error message, in a fairly retrievable way. Further, you can probe task wires to see the task name and you can typecast/coerce task wires to strings to retrieve the task name. Somewhat disappointingly, a property node can no longer retrieve the name.
I don't have a RT box available to me, but I still expect AQ's guess to hold true.