LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

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.

0 Kudos
Message 1 of 3
(2,939 Views)

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 Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,932 Views)

I modified nidaqmx.h from void* to int, everything went ok.

Thank you for your help.

0 Kudos
Message 3 of 3
(2,923 Views)