Go to Post Welcome to a Chief Delphi poll, where the responses are made up and the numbers don't matter. - JohnSchneider [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 13-02-2015, 22:59
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Not enough resources to create a counter

Hi we encountered a problem today when we added four more counters to our command based robot. For some reason on the fourth addition the counter can not be created and throws an error from HAL saying something about insufficient resources. (I'm sorry i don't have the exact error with me right now)

If we remove one of the counters the code runs fine. We can swap around the order of allocation of the counters and it always throws the exception after creating a fixed number of them (I think on the 8th counter)

Any thoughts on what may be causing this??

Tia -

mp
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2015, 23:31
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,586
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: Not enough resources to create a counter

From http://wpilib.screenstepslive.com/s/...ulses-and-more
Quote:
There are 8 Up/Down Counter units contained in the FPGA which can each operate in a number of modes based on the type of input signal:
If you are using any encoders in 1x or 2x mode, changing them to 4x will keep them from using counters.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2015, 08:18
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Re: Not enough resources to create a counter

We're just using them with switches (DigitalInput).
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2015, 14:40
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Re: Not enough resources to create a counter

Hi - nevermind. We have solved this problem indirectly by moving our switches to the CANTalons. We can read them using isFwdLimitSwitchClosed () and isRevLimitSwitchClosed ().

Thanks just the same...

mp
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2015, 17:44
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,586
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
Why not use the digital input class directly?
Reply With Quote
  #6   Spotlight this post!  
Unread 15-02-2015, 21:55
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Re: Not enough resources to create a counter

Hi Joe - we are using digitalinputs but thought to be safe we would read them though counters in case we move past them too quickly (they are reed switches)

Seems surprising to me that we could run out of them.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2015, 10:51
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,586
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: Not enough resources to create a counter

I was referring to moving the switches to the Talon SRXs. I suspect that using the Digital Inputs on the roboRIO will have less latency then reading them on the Talon SRXs.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2015, 16:59
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Re: Not enough resources to create a counter

Hmm - could be that the roboRIO reading a DI will be faster than roboRIO asking CAN to read the limit switch.

One interesting observation since we got this working: the CANTalon shuts off the motor auto-magically when the limits switches are reached. I expect this is reacting faster than Java could switch it off.

The limit switches can be disabled, but not sure if that just disables the auto-shutoff of the motor or disables your ability to read the switch.

Clearly much more to be learned with the CANTalons - and the JavaDocs are not even fully generated yet - so some things are just trial and error.
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2015, 17:01
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 990
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Not enough resources to create a counter

Quote:
Originally Posted by shindigo View Post
Clearly much more to be learned with the CANTalons - and the JavaDocs are not even fully generated yet - so some things are just trial and error.
http://www.crosstheroadelectronics.c...e%20Manual.pdf
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


All times are GMT -5. The time now is 18:08.

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