09-24-2013 01:18 PM
What data type do I use when defining a shared variable for a DAQmx task name?
I have tried String, but when I use the shared variable that I call 'Digital IO Task' in a subVI, I get the following:
Error -200088 occurred at Main Panel.vi
Possible reason(s):
Task specified is invalid or does not exist.
09-25-2013 01:23 PM
Hi GretchenSkelly,
I believe that you can configure shared variables with NI-DAQmx global channels and NI-DAQmx local channels as stated in this article, but we cannot bind them to NI-DAQmx tasks. I tried with both variant and string data types and it kept showing an error. However I tested with strings with the code below and it seemed to work. I was able to see the value in the shared variable with a shared variable read node and in the Distributed System Manager (DSM). Are you able to see the shared variable update in the DSM?
09-25-2013 02:22 PM
Amezam,
there reall is no need to gyrate a DAQmx Task IO through a flattened string. Scan to string pulls "DAQmx Task.Name" just fine if the coersion dot offends your style guidelines.
09-26-2013 08:40 AM
Thanks for both replies. I ended up using Global Variables. I hadn't used globals for years.
But that seems to have solved my problem of passing DAQmx Task Names to subVIs.
Gretchen