Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5362

DAQ Task error 20008 without Delay

$
0
0

When I run the code below I get an task error 20008 without the delay of 2 seconds.

Why do I need the delay and is there any way to reduce this ?

 

Chan_num is “Dev1/port4/line1”

 

Voltage is 25  or 0 or -25

 

 

int DAQ_set_voltage(int panelHandle,char *task_name, char *chan_num, unsigned long voltage)

{

if((status = DAQmxCreateTask("xyz",&VoutHandle)) == SUCCESS)

                                               

          if((status = DAQmxCreateDOChan (VoutHandle,chan_num , "www", DAQmx_Val_ChanForAllLines))== SUCCESS);

 

                                                                Delay(2);

                               

         if ((status = DAQmxWriteDigitalU32(VoutHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&voltage,&written,NULL)) == SUCCESS)

                                                 

                 status = DAQmxStartTask(VoutHandle);      

 


Viewing all articles
Browse latest Browse all 5362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>