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
Banjo_B
Posts: 50
0 Kudos

Digital Output after Counter Reaches a specified number?

Hi all.

 

I have come accross a problem using the counter on a USB 6008.

 

Basically what I am doing is counting the pulse signal from an incremental encoder (one channel only). When this count reaches a specified number (eg 2000 pulses), I need this to activate a digital output on one of the DAQ's DO lines.

 

This seems to be a triggering task which requires 2 counters but alas the USB 6008 does not have 2 counters. I have tried using a simple state machine structure specifying that when the counter reads equal or greater than 2000, move to a state which outputs on one of DO lines. This leads to a situation where the count may be far greater than 2000 before it moves to the digital output state especially when the encoder is rotating quickly.

 

Is it possible to accomplish what i need with the USB 6008?. If anybody has any input it would be much appreciated.

 

Active Participant
Kevin_Price
Posts: 1,906
0 Kudos

Re: Digital Output after Counter Reaches a specified number?

I don't think you can get there with the counter on a USB-6008.  It sounds like you need hardware-level timing for this DIO bit, so you'd need to use a more capable data acq device.

 

It isn't clear whether you need this to happen exactly 1 time or repeatedly every 2000 pulses.  If it's every 2000 pulses, does it matter when/where you start the count?  In other words, is the real requirement related to a position change that corresponds to 2000 pulses?  If so, do you have a plan for establishing your 0 position to get the phasing right?   Does your incremental encoder have 2 quadrature channels and an index pulse?

 

It's hard to recommend a daq board without knowing answers to these questions, and probably others as well.  That said, the safest bet is probably a board based on the STC-3 timing module, such as X-series boards and certain cDAQ chassis.

 

-Kevin P

 

-- looking to hire? PM me...
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