07-26-2012 09:06 AM
Hi, I am using a USB 6210 board and I need to read at the same time inputs from a counter and from analog channels. I did a program in labview (similar to this example I have found, see pic) and it works well.
My problem is that I am trying to convert the program in measurement studio, but the counter behaves erratically (measurement of angular displacement changes with rotation speed of the encoder and sampling frequency). I suspect there's a problem of synchronisation between the two tasks. Is there an example or a tutorial available somewhere on this subject (better if in VB.Net)?
cheers
nunzio
07-30-2012 09:02 AM
Hi Nunzio,
here are some synchronizaion examples. Actually the examples syncronize analog tasks but you can see hoe to share the sample clock (basically is what you need also to syncronize other kind of tasks):
Synchronize Analog Input And Output In DAQmx Using ANSI C
http://zone.ni.com/devzone/cda/epd/p/id/3596
DAQmx - Synchronized AI/AO Shared Clock - LabVIEW - CVI - ANSI C - C#.NET - VB .NET
http://zone.ni.com/devzone/cda/epd/p/id/2352
DAQmx - Simultaneously Started AI/AO - LabVIEW - CVI - ANSI C - VB.NET
http://zone.ni.com/devzone/cda/epd/p/id/2348
Hope his helps,
Clara
07-31-2012 08:03 AM
Tks Clara,
just what I needed. In fact now even my program works. the problem was that as a clock I had selected "dev1/ai/sampleclock" (as in labview) instead of "ai/sampleclock". I have to say that this thing is a bit misleading, and I have found the solution only by chance.
best,
nunzio