Go to Post Don't worry about someone stealing your ideas...if they're good ideas, then imitation is the sincerest form of flattery. If they're lousy ideas, we'll let you know, so you can work on finding a better idea. win-win! - MrForbes [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-11-2009, 07:42 PM
agough's Avatar
agough agough is offline
Registered User
FRC #0234 (Cyber Blue)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Indiana
Posts: 8
agough is an unknown quantity at this point
Question Encoder Limit

Is there an encoder limit?
I ask because when we build our program with 5 encoders used throughout it builds fine and it downloads but when we start it up our program won't run and tells us:
"Cannot allocate any more ports" check Resource.cpp line 61
We found nothing in Resource.cpp that is relevant.This is function/line it tells us to check(_=Space):
Quote:
UINT32 Resource::Allocate()
{
____for (UNIT32 i=0; i < m_size; i++
____{
__________if ( ! m_isAllocated[i])
__________{
__________m_isAllocated[i] = true;
__________return i;
__________} <-This is line 61
____}
____wpi_fatal(NoAvailablePorts);
____return 0;
}
If we comment out at least one encoder object creator and pointer(and it doesn't matter which one of the five we comment out) then the error doesn't show and everything else works.
__________________
"By failing to prepare, you are preparing to fail."-Benjamin Franklin
"Wise men talk because they have something to say; fools, because they have to say something."-Plato
Reply With Quote
  #2   Spotlight this post!  
Unread 02-11-2009, 07:53 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Encoder Limit

From the "C/C++ Programming Guide for the FIRST Robotics Competition"

Quote:
There are four QuadratureEncoder modules in the FPGA and 8 Counter modules that can operate as
quadrature encoders. One of the differences between the encoder and counter hardware is that encoders
can give an oversampled 4X count using all 4 edges of the input signal. Counters can either return a 1X or
2X result based on one of the input signals. If 1X or 2X is chosen in the Encoder constructor a Counter
module is used with lower oversampling and if 4X (default) is chosen, then one of the four encoders is
used.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit Switches popnbrown NI LabVIEW 1 02-10-2009 10:39 PM
Screwing Encoder into Encoder Mount? Adrien Electrical 3 01-25-2009 06:14 PM
Using a limit switch to limit motion ManicMechanic Programming 16 12-20-2007 12:54 AM
Spending Limit? Chuck Glick General Forum 8 01-08-2006 05:54 PM
$$ Limit? Stephen Kowski Rules/Strategy 1 01-08-2002 12:01 AM


All times are GMT -5. The time now is 10:13 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi