09-20-2005 10:22 AM
int32 error=0;
TaskHandle taskHandle=0;
uInt8 data[32];
char errBuff[2048]={'\0'};int32 numRead;
int32 bytesPerSamp;
/*********************************************/ /*/ DAQmx Configure Code/*********************************************/
DAQmxErrChk (DAQmxCreateTask(
"",&taskHandle));DAQmxErrChk (DAQmxCreateDIChan(taskHandle,
"Dev1/port0/line0:7","",DAQmx_Val_ChanPerLine));DAQmxErrChk (DAQmxCfgChangeDetectionTiming(taskHandle,
"Dev1/port0/line0:7","Dev1/port0/line0:7",DAQmx_Val_ContSamps,4));But the last line gives me an error -200077...
Is this function available for my 6501? I found no document which tells me wqhat is possible with it?
Thank you.
09-21-2005 04:58 AM
Hi Ien,
Christophe S.
Account Manager East of France І Certified LabVIEW Associate Developer І National Instruments France
09-21-2005 05:53 AM
Thank you for your answer.
I use NIDAQmx 7.5 with Visual C++7.1.
The code I pasted is a part of the example given by NIDAQmx.
Even when I try with VI Logger, I have the same error (-200077).
So I think the USB 6501 is not compliant with DAQmxCfgChangeDetectionTiming function.
Can you confirm this?
Can you tell me which NIDAQmx functions I can use with the USB 6501?
Thank you.
09-21-2005 07:28 AM
You have right Ms Ien, you can’t use timing function because USB-6501 hasn’t clock and timer.
You need use basic function, like :
DAQmxCreateTask
DAQmxCreateDIChan
DAQmxStartTask
DAQmxReadDigitalLines
DAQmxStopTask
DAQmxClearTask
And detect falling and rising edge with the software that you create.
You can found all function in your start menu :
ð Start >>Programs>>National Instruments >> NI-DAQ >>NI-DAQmx C reference help
I join in this email two examples, try this into your PC.
Regards,
Christophe S.
Account Manager East of France І Certified LabVIEW Associate Developer І National Instruments France
12-01-2007 08:53 AM - edited 12-01-2007 08:55 AM