Go to Post Sometimes the best feeling doesn't come from watching yourself excel but rather from watching others excel. - kristenliz_28 [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 01-15-2018, 10:02 PM
axb5 axb5 is offline
Registered User
FRC #6619
 
Join Date: Jan 2018
Location: Livermore
Posts: 3
axb5 is an unknown quantity at this point
CAN Timeouts and CAN Bus Failure

Problem:

Our team has had issues the last few days with CAN timeout errors. This began when our software team couldn’t instantiate the TalonSRX object without the robot code crashing. Soon we found that we couldn’t find the CAN hardware through the NI web interface. The CAN bus is connected to two TalonSRXs, the PDP, PCM, VRM and RoboIO.

Debugging:

We tried a number of fixes without much luck.
We rewired the CAN bus to contain only the PDP and RIO and still couldn’t find either through the NI web interface. At one time, we blew a 20 amp fuse and replaced it. We don’t know why and it probably has nothing to do with the CAN bus.

We even replaced the entire PDP.

Stats and Specifications:

Our CAN bus utilization: 14-16%
Resistance across the CAN bus: 120 Ohms
The CAN bus begins at the RIO and ends at the PDP.
*In code, we can monitor the PDP’s voltage but still get timeout errors.*
Firmware: We upgraded the RIO’s firmware to the 2018 version before we had these issues. We downgraded to the 2017 version and still had the same issues. We’ve also flashed the RIO multiple times using the reimaging tool.

Talon Test Code:
Code:
package org.usfirst.frc.team6619.robot;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
public class Robot extends IterativeRobot {
	private static final int kMotorPort = 0;
	private static final int kJoystickPort = 0;
	private WPI_TalonSRX m_motor;
	private Joystick m_joystick;
	@Override
	public void robotInit() {
		m_motor = new WPI_TalonSRX(kMotorPort);
		m_joystick = new Joystick(kJoystickPort);
	}
	@Override
	public void teleopPeriodic() {
		m_motor.set(m_joystick.getY());
	}
}
Thanks for your attention.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-15-2018, 10:11 PM
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 640
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: CAN Timeouts and CAN Bus Failure

When troubleshooting the CAN bus, you should be looking at the Talon LEDs (section 2.3 in the Talon User's Guide) and roboRIO web-based config.

Before you wrote any software, did you follow these steps...
https://github.com/CrossTheRoadElec/...e-any-software

CAN bus should measure 60Ω, not 120Ω. This is because there should be one 120Ω resistor at each end (typically the RIO and the PDP).

Did you set the device ID's of the Talons. If they are both set to 0 then the API will not function (regardless of what year API).
__________________
Omar Zrien - CTR Electronics - Cross The Road Electronics - Chief Software/Owner
CTRE New products | CTRE/FRC Source Examples | FRC Installer (for Talon SRX and more)
Get Latest Updates on Facebook | Twitter
Reply With Quote
  #3   Spotlight this post!  
Unread 01-15-2018, 10:14 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,870
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
Have you followed all the steps in the CTRE manual? https://github.com/CrossTheRoadElec/...e-any-software

I didn't see you mention running the lifeboat.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-15-2018, 10:22 PM
axb5 axb5 is offline
Registered User
FRC #6619
 
Join Date: Jan 2018
Location: Livermore
Posts: 3
axb5 is an unknown quantity at this point
Re: CAN Timeouts and CAN Bus Failure

We will try upgrading the RIO using lifeboat tomorrow when we have access to the robot. We can also reduce the resistance across the CAN bus. We were successfully running the Talons over CAN just two days ago ...

Thanks for all your help.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-25-2018, 05:42 PM
axb5 axb5 is offline
Registered User
FRC #6619
 
Join Date: Jan 2018
Location: Livermore
Posts: 3
axb5 is an unknown quantity at this point
Re: CAN Timeouts and CAN Bus Failure

We figured it out. We reimaged the RIO, used the lifeboat utility, and re updated the firmware. This seemed to work.
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 05:23 AM.

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


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