Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

counter and analog input task synchronisation

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.

sync.png

 

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

0 Kudos
Message 1 of 3
(5,662 Views)

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

0 Kudos
Message 2 of 3
(5,654 Views)

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

0 Kudos
Message 3 of 3
(5,651 Views)