Results 1 to 6 of 6

Thread: Encoders and Counters

  1. #1
    Join Date
    Nov 2008
    Posts
    20

    Default Encoders and Counters

    How many counters does an encoder use (when using at 4x)? From looking at the open.vi for the Encoder a 1x and a 2x uses 1 counter, but for the 4x it uses a "Encoder Ref Open" and the next layer is locked out. I assume using it as a 4x would use 2 counters each, is this wrong?
    David Gitz
    FRC Team #2219 Lead Technical Advisor
    http://www.megahurts2219.com/
    davidgitz@gmail.com

  2. #2
    Join Date
    Sep 2008
    Posts
    586

    Default Re: Encoders and Counters

    The following thread has a lot more details on how the different decoding types work. http://forums.usfirst.org/showthread...hlight=encoder The help page for encoders specifies that there are 4 for 4x and 8 for 1 or 2x.
    Last edited by jross; 12-27-2008 at 11:54 PM.
    Team 330 beta tester

  3. #3
    Join Date
    Nov 2008
    Posts
    20

    Default Re: Encoders and Counters

    hmm, so are these special counters? Because according to the counter documentation we can only use 8 counters at any given time.
    David Gitz
    FRC Team #2219 Lead Technical Advisor
    http://www.megahurts2219.com/
    davidgitz@gmail.com

  4. #4
    Join Date
    Sep 2008
    Location
    National Instruments: Austin, TX
    Posts
    445

    Default Re: Encoders and Counters

    Quote Originally Posted by DavidGitz View Post
    hmm, so are these special counters? Because according to the counter documentation we can only use 8 counters at any given time.
    That's correct. There are 8 general purpose counters (which can do 1x and 2x decoding) and 4 dedicated 4x decoding counters. There are 12 counters total.

  5. #5
    Join Date
    Jan 2007
    Location
    Old Lyme, CT
    Posts
    67

    Default Re: Encoders and Counters

    so if you used the 4x counters for an encoder on each wheel, you would only have 4 2x counters left for other purposes?

  6. #6
    Join Date
    Sep 2008
    Location
    National Instruments: Austin, TX
    Posts
    445

    Default Re: Encoders and Counters

    Quote Originally Posted by jmittelman View Post
    so if you used the 4x counters for an encoder on each wheel, you would only have 4 2x counters left for other purposes?
    No. There are 4 counters that can only decode at 4x. There are another 8 general purpose counters that can decode at 1x and 2x among many other types of measurements. You could decode 12 quadrature signals simultaneously. 4 of them at 4x and 8 at 1x or 2x.

    The general purpose counters' modes can be configured independently of one another. You could have 3 counters reading ultrasonic sensors, 2 reading direction sensitive gear tooth sensors, 2 reading continuous-turn pots by routing from the analog triggers, and one decoding quadrature signal at 2x. Etc.

    If you choose 4x decoding, you are using dedicated hardware and general purpose counters are unused and unaffected.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •