LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why Do I get error -200525 in DAQmxReadDigitalXX

Solved!
Go to solution

I have a hard time to figure out why I get this runtime error so I'm asking for help. Here is the code

 

// DAQ DIGITAL INPUT Reserve line 23-31
char    chanP1TestIn[]    =     "dev1/port0/line30:31";        // 30: test, 31:retest


........

 

    /////////////////// Digital Inputs //////////////////
    DAQmxErrChk (DAQmxCreateTask("",&P1TaskDI));                                    
    DAQmxErrChk (DAQmxCreateDIChan(P1TaskDI,chanP1TestIn,"P1Test",DAQmx_Val_ChanForAllLines));
    DAQmxErrChk(DAQmxSetChanAttribute(P1TaskDI, "P1Test", DAQmx_DI_InvertLines, 0));   

.........   
 

     DAQmxReadDigitalU32(P1TaskAI,1,timeOut,DAQmx_Val_GroupByChannel,&data,1,&read,NULL);

 

I've changed to DAQmxReadDigitalLines format and still have the same error code. LabWindowsCVI 8.5 with DAQ PCI-6629

 

NON-FATAL RUN-TIME ERROR:   "AntiG.c", line 1156, col 21, thread id 0x00000F7C:   Function DAQmxReadDigitalU32: (return value == -200525 [0xfffcf0b3]). Measurements: Read cannot be performed because this version of DAQmx Read does not match the type of channels in the task.    Use the version of DAQmx Read that corresponds to the channel type. Task Name: _unnamedTask<4>  Status Code: -200525

 

Thanks

 

Lanny

0 Kudos
Message 1 of 2
(4,099 Views)
Solution
Accepted by topic author UKnowWhat
Never mind, my fault. I type the wrong task name - should be P1TaskDI (digital) not P1TaskAI (Analog).
0 Kudos
Message 2 of 2
(4,097 Views)