Go to Post In Dave We Trust :) - JohnBoucher [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 18-01-2016, 17:49
seabasssl seabasssl is offline
Registered User
FRC #3711
 
Join Date: Feb 2015
Location: Trout Lake, Washington
Posts: 9
seabasssl is an unknown quantity at this point
Engine flickering?

When we run our shooter command, the motors aren't running smoothly at the speed they've been set to.
The command is just setting the two motors to 100% power.
But when run, the motors flicker, as in they turn on and off.

In test mode, the motors run smoothly.

Does anyone know what the issue could be? Is there any particular code that might be useful to see?
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2016, 18:56
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Engine flickering?

Is your shooter on a 40a or 20a breaker? If you're running it on a 20a breaker and its a full CIM than you could very well be tripping the breaker.

Additionally, ensure all cables (ethernet, power, etc) are tight because the vibration from your shooter wheel may be causing the cables to wiggle out of their places.

If this is still causing issues, replace the fuses that the wheel is connected to.

If you're still having issues, replace the CIM and double check wiring.

E/ good info for people whose motors aren't consistently working. Not for you.

Add debug outputs in everything thats calling the shooter motor (including the initialize and finished methods of the shooter command) and post the output + code
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2016, 23:54
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 185
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Engine flickering?

Quote:
Originally Posted by Arhowk View Post
Add debug outputs in everything thats calling the shooter motor (including the initialize and finished methods of the shooter command) and post the output + code
Team 2481 is running in to a similar issue. We are in the midst of debugging it but when running a command from the dashboard the following is happening.

Initialize is called.
Interrupted is called.
Initialize is called.
Interrupted is called.
Initialize is called.
Command executes as expected.

When this occurs the button on the SmartDashboard is flickering.

The initialize/interrupted cycle occurs 0 to n number of times before the command finally executes.

We will be doing more debugging on Thursday and report back here with our findings. The only current theory we have is that the command is somehow interrupting itself. This our 4th year using command based and we have never seen anything like this before.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2016, 07:09
teslalab2's Avatar
teslalab2 teslalab2 is offline
RogueBotix LLC
VRC #8091
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Austin MN
Posts: 109
teslalab2 will become famous soon enoughteslalab2 will become famous soon enough
Re: Engine flickering?

I had this problem last year on our tote lifter chain. I think I just set it too .99 instead of 1 and that fixed it.
__________________
I need a jaguar development board for reprogramming a jaguars bootloader. if you have one that you want to sell, pm me. thanks

Run you CanJaguars on arduino with ArduRIO, you can also easily control Talons, Victors,Jaguars and Sparks on PWM. https://sourceforge.net/projects/ardurio/
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2016, 12:35
simpsonboy77 simpsonboy77 is offline
Registered User
AKA: Garrett Dicken
FRC #0041 (RoboWarriors)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: New Jersey
Posts: 87
simpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond repute
Re: Engine flickering?

Quote:
Originally Posted by teslalab2 View Post
I had this problem last year on our tote lifter chain. I think I just set it too .99 instead of 1 and that fixed it.
If that fixed it, it sounds like a calibration issue with the motor controller, or possibly using the wrong motor controller object in code.

@OP - A couple years ago my team had an issue and the root cause was 2 commands fighting each other. If you are using a command based architecture this may be your issue.
__________________
2013 - Present MAR Control System Adviser and FTAA
2009 - Present Programming an Electrical Mentor Team 41
2005 - 2008 Team 41 Programmer
2008 NYC Regional Winner
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2016, 22:50
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 185
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Engine flickering?

Quote:
Originally Posted by kylelanman View Post
We will be doing more debugging on Thursday and report back here with our findings. The only current theory we have is that the command is somehow interrupting itself. This our 4th year using command based and we have never seen anything like this before.
We determined the root cause of our problem. I'm not sure if the cause is the same for the OP or not but I said I would report back so here goes.

This call was in TeleopPeriodic instead of RobotInit where it should have been.
Code:
SmartDashboard::PutData(new RotateToAngleCommand(45));
We eventually figured this out by placing a printf in the constructor of RotateToAngleCommand. When the log filled up with statements very quickly it was obvious the SmartDashboard:utData command was likely in a periodic function.

In the end we had 100's of instances of the RotateToAngleCommand in memory. Given enough time I'm sure we would have run out of memory. When invoking the command from the dashboard several of the instances were being scheduled at the same time and causing the stuttering.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

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 10:12.

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