05-06-2020 04:30 AM
Solved! Go to Solution.
05-06-2020 07:52 AM
Sorry, I really don't know the text-based API and syntax to comment on many details. But there's 1 thing I *can * suggest:
@Serenade wrote:
Someone suggested me to set sample clock for DI like this: nidaq.DAQmxCfgSampClkTiming(DItaskHandle,"Dev%d/ai/SampleClock" %num,float64(sampleRate),DAQmx_Val_Rising,DAQmx_Val_ContSamps,uInt64(1000000))
Change that second argument to have a leading '/' character, such as this: "/Dev1/ai/SampleClock". Your X-series device can definitely support that kind of usage. You've already got the right task start sequence in place, starting AI last.
-Kevin P
-Kevin P
05-06-2020 08:13 PM
lol I added '/' and it works!! (and enough timeout.)
Thank you so much.
Could you allow me to ask one extra question?
Where did you found this solution?
05-06-2020 08:51 PM
I didn't so much "find" it as remember it. It helps that I do my DAQ in LabVIEW where channels and terminals are available from a dropdown list that contains the corresponding syntax. (Terminals have a leading "/" character, channels don't.)
I've also been in a few similar threads in recent years. Here's one. Here's another. There've been others too.
-Kevin P
05-25-2020 07:52 PM
I see!!
Indeed, it seems it's better to use labview.
I was quite curious how people find the solution for this kind of problem.
Thank you for the reply and the links.