NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
nunzio
Posts: 19
0 Kudos

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

Active Participant
Loura
Posts: 295
0 Kudos

Rif.: counter and analog input task synchronisation

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

AE Manager
NI Italy
Member
nunzio
Posts: 19
0 Kudos

Rif.: counter and analog input task synchronisation

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

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page