DAQmxCreateWatchdogTimerTask

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.

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.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • PCI-6509 example program doesn't run

    I can compile the "Write Dlg Chan-Watchdog Timer.dsw" sample program, but when I run it I get errors. Please help me to understand what I am doing wrong.
    Attachments:
    PCI6509_output.rtf ‏1 KB

    Anna,
    When I tested this example with the PCI-6509, I did not receive any errors. However, if I intentionally delayed the resetting of the watchdog timer, I was able to generate the -200644 error. The following function performs this reset:
    DAQmxErrChk( DAQmxControlWatchdogTask(wdTaskHandle, DAQmx_Val_ResetTimer));
    Did you make any modifications to the example? To troubleshoot this issue further, you should try increasing the watchdog timer's timeout using the following function:
    DAQmxErrChk (DAQmxCreateWatchdogTimerTask(device,"wd",wdTaskHandle,timeout,physChan,expirationState,NULL));
    Spencer S.

Maybe you are looking for