03-21-2012 09:48 AM
Hello i want to use watchdog timer with USB-6525 and CVI 8.5. I started with sample provided by CVI (WriteDigChan-WatchdogTimer.c) and when i run the program i get this error:
FATAL RUN-TIME ERROR: "WriteDigChan-WatchdogTimer.c", line 74, col 57, thread id 0x0000133C: Invalid argument type: found 'pointer to pointer to void', expected 'pointer to int'.
At line:
DAQmxCreateWatchdogTimerTask("Dev4","wd",&wdTaskHandle,1,"Dev4/port0/line0:7",DAQmx_Val_High,NULL);
Invalid argument seems to be: &wdTaskHandle .
Declaration of wdTaskHandle is :
TaskHandle taskHandle=0,wdTaskHandle=0;
Please help me to solve this problem.
03-21-2012 11:50 AM
Based on what you say it seems that there is a misalignment between the definition of TaskHandle in your code and in the DAQMx header: see this post from Mert which can add some clarification.
On my machine TaskHandle is defined as a void * (CVI 2009SP1 installed with DAQMx 9.1.5): you may want to check which is the definition applied to your code: right click on TaskHandle type and select "Go to definition": you should see nidaqmx.h file open pointed to the definition of the variable type.
03-22-2012 08:54 AM
I modified nidaqmx.h from void* to int, everything went ok.
Thank you for your help.