LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -3480 from DAQmxCreateDOChan, Labwindows CVI 8

I am getting a weird error message and I cannot find any information on this error.
I will post some lines of code but cannot post the entire project as it is very large.
 
I have a number of tasks declared for NidaqMX:

 TaskHandle safety0Task;
 TaskHandle safety1Task;
 TaskHandle safety2Task;
 TaskHandle safety3Task;
 TaskHandle safety4Task;
 TaskHandle shutdown_output_Task;//  Dev1/port0/line6
 
In the main body of code I initialize the tasks. The safety tasks work, iStatus=0.
the shutdown task returns iStatus = -3480:
 iStatus = DAQmxCreateDIChan (safety0Task, "Dev1/port0/line0", "safety 0-system pressure",DAQmx_Val_ChanPerLine);
 iStatus = DAQmxCreateDIChan (safety1Task, "Dev1/port0/line1", "safety 1-inlet temperature",DAQmx_Val_ChanPerLine);
 iStatus = DAQmxCreateDIChan (safety2Task, "Dev1/port0/line2", "safety 2-tank level",DAQmx_Val_ChanPerLine);
 iStatus = DAQmxCreateDIChan (safety3Task, "Dev1/port0/line3", "safety 3-case pressure",DAQmx_Val_ChanPerLine);
 iStatus = DAQmxCreateDIChan (safety4Task, "Dev1/port0/line4", "safety 4-high pressure",DAQmx_Val_ChanPerLine);
 //these lines work, iStatus =0
 //motor shutdown
 iStatus = DAQmxCreateDOChan (shutdown_output_Task, "Dev1/port0/line6", "shutdown output", DAQmx_Val_ChanPerLine);  
 //this line errors, iStatus = -3480
 DAQmxGetErrorString (iStatus,bigstring,7999);
 MessagePopup("Error",bigstring);
 //error -3480 is unknown
 
Similar code follows for several other I/O tasks, they all return -3480.
DAQmxGetErrorString does not know what error -3480 means.
I cannot find any reference to this error number in searching the boards.
 
Thanks in advance for any help
0 Kudos
Message 1 of 3
(3,430 Views)

I found out what happened. I had not initialized shutdown_output_Task, so it was =0.

My mistake, but I wasted about six hours of time chasing this down, if the error code would have told me what the problem was it would have been solved in a few seconds. This has happened to me before with CVI and Nidaq, where an error code was generated, the error string functions did not know of the code, and no information could be found. It would be a great help if ALL possible error codes would be documented in an easily accesible file, a help file or web page. It would save alot of time.

0 Kudos
Message 2 of 3
(3,417 Views)
Hello kmagas,

That function should return an error code of 200088 if you pass it an invalid task id. You're reporting that it returned 3480 instead. 3480 happens to be the low-order 16 bits of 200088. So what's probably happening is that iStatus is a short integer, instead of a long integer.

Luis

Message Edited by LuisG on 08-02-2007 01:53 PM

0 Kudos
Message 3 of 3
(3,382 Views)