OK, I've eliminated LabView from the equation. I'm just running a simple C++ app calling NIDAQmx:
----
#include <iostream>
#include <NIDAQmx.h>
using namespace std;
int main(int argc,
char * argv[])
{
cout << "create task '" << argv[1] << "'" << endl;
TaskHandle _task_handle;
int error = DAQmxCreateTask(argv[1],
&_task_handle);
if (DAQmxFailed(error))
{
char error_buffer[2048] = {'\0'};
DAQmxGetExtendedErrorInfo(error_buffer,
sizeof(error_buffer));
cerr << error_buffer << endl;
return 1;
}
cout << "create task done" << endl;
DAQmxClearTask(_task_handle);
return 0;
}
----
Here's what I get:
$ ./Debug/project3.exe 6224DIO/port0/line0
create task '6224DIO/port0/line0'
Measurements: Specified string is not valid, because it contains an invalid character.
Position of Invalid Character: 7
Invalid String: 6224DIO/port0/line0
Task Name: 6224DIO/port0/line0
Status Code: -200552
What's going on here?? Am I not allowed to use the channel name as the task name? I was able to do this with NIDAQmxbase ...