Many thanks for your help !
The Joe's step-by-step translation of my code was really helpful to me.
Let me try to go one step further: merely translating my code was a great thing and will work but does not generate optimized code, I mean not so optimized as DAQmx allow to do. Is it true ?
In fact, I believe that DAQmx allow to acquire multiple sample (i.e. multiple counter scalars) without the need of a formal acquisition loop (my "old" for). In this case I suppose that I can leave an acquisition task running freely, while another task only plots the acquired data. Should I use DAQmxReadCounterF64 function ? Where should I put my plotting instructions, maybe in an asynchronous timer callback routine, polling a data array and plotting the last fresh acquired samples ?
Many thanks again and best wishes,
Marco