Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Error -200477 occurred at DAQmx Timing (Sample Clock)

Go to solution

The reason is: Specified operation cannot be performed when there are no devices in the task.

The VI works good in development system. How its exe vi shows this error. The VI includes usb 6001 and NI 9266 (with cDAQ-9171). The error occurs for both DAQ when execute DAQmx Timing (Sample Clock) VI. The source input of sampling clock VI is leave unwired, so the source is the default onboard clock.

0 Kudos
Message 1 of 8

Any NI engineer can help on this?

0 Kudos
Message 2 of 8

Hi chenl,


Could you please provide us with a bit more context about your application? 

At which point during the execution of your application the error occurs? 

Is this occurring in a particular VI, or is it occurring across multiple VIs in your application? 

Are you running the executable on this same machine, or in a different one? 





0 Kudos
Message 3 of 8

Hi, Moacir,


The error occurs when executing sample in create a task VI using NI 9266. Same error occurs when create task VI using USB 6001.

In the picture, you can see I put an error indicator before sample This indicator verify the error occurs at this vi.

Yes, I running the executable on this same machine.




0 Kudos
Message 4 of 8

Can you post the actual vi, preferably saved back to an earlier version?  (I for one would need it saved back to 2016 or earlier.)   I tried to generate your -200477 error by feeding invalid physical channel into DAQmx Create Virtual, but the error codes I got were different.


First point: according to your screencap, your error occurs *before* the call to DAQmx


Second point: you've shown us a specific case where an AO current task is supposed to be configured.  We have no way of knowing where it gets its inputs from or even whether that's the case that executes.  What are the other cases of that case structure?  



-Kevin P

0 Kudos
Message 5 of 8

Hi, Kevin


I had attached actual VI in 2016 version for your review.

For the first point you mention, the error occurs *after* the call to DAQmx




0 Kudos
Message 6 of 8
Accepted by topic author chenl
04-11-2019 09:30 AM

Ok, now I notice *both* error indicators, one before and one after DAQmx Timing.


As posted, the front panel array of 'Enable' booleans is an empty array.  Indexing an empty array gives you the default value for the array element.  In the case of a boolean, all indexed values come out False.  Thus no channels (or devices) are added to your task.


When I run it, I got the same -200477 error.   As soon as I populated the array with any True values, I (correctly) got a different error because I don't have the hardware device specified in your code.  If the code that calls this subvi sends in an empty array or an array with all False values, that would explain your error.



-Kevin P

Message 7 of 8

Hi, Kevin,


You are correct. When build application, a data file was not included in the source. This cause a empty array pass to VI when ini the data. There is error warning if the data file was not found. But for some reason I clear the error.


Thank you so much for you great job.


0 Kudos
Message 8 of 8