Go to Post Part of FRC and design/engineering is perseverance. Keep your chin up, your thoughts positive, and have respect for your work and the work of your teammates. - Nathan_Fraser [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 10-02-2011, 23:44
Inconceivable Inconceivable is offline
Registered User
FRC #2530 (Inconceivable)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Rochester, MN
Posts: 2
Inconceivable is an unknown quantity at this point
Question What happens when an encoder goes out?

Hello! I'm am using a CAN based (speed mode) control this year for a mechanum drive equipped with the us digital E4P encoders that come in the KOP (with 360 encoder wheels), and a mentor brought up a very good question. What happens if an encoder stops working or malfunctions? My gut feeling is that with all the safety checks implemented in the CAN Libraries (Labview), The Jag would figure out that it's not getting a valid signal from the encoder and simply shut down, but is there the possibility that it would just go full speed ahead in attempt to get to the set RPM (because it's reading 0 RPM)? If a Jag can detect whether or not an encoder is out, and one does, I intend to have all of the drive-motor jags switch to voltage mode so you aren't stuck with a dead wheel, or robot, depending on how it reacts... Does anyone know?
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2011, 02:04
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: What happens when an encoder goes out?

Quote:
Originally Posted by Inconceivable View Post
Hello! I'm am using a CAN based (speed mode) control this year for a mechanum drive equipped with the us digital E4P encoders that come in the KOP (with 360 encoder wheels), and a mentor brought up a very good question. What happens if an encoder stops working or malfunctions? My gut feeling is that with all the safety checks implemented in the CAN Libraries (Labview), The Jag would figure out that it's not getting a valid signal from the encoder and simply shut down, but is there the possibility that it would just go full speed ahead in attempt to get to the set RPM (because it's reading 0 RPM)? If a Jag can detect whether or not an encoder is out, and one does, I intend to have all of the drive-motor jags switch to voltage mode so you aren't stuck with a dead wheel, or robot, depending on how it reacts... Does anyone know?
The Jag can't tell if an encoder is out because the signal from a dead encoder is perfectly valid and could be telling the real state of a good encoder. I believe it would behave as your second guess... it would go full speed ahead. If you choose to monitor the speed by reading the feedback over CAN, then you could write code to attempt to detect the issue and switch modes.

-Joe
Reply With Quote
  #3   Spotlight this post!  
Unread 11-02-2011, 09:47
Hugh Meyer's Avatar
Hugh Meyer Hugh Meyer is offline
Registered User
FRC #1741 (Red Alert Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Greenwood Indiana
Posts: 158
Hugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud of
Re: What happens when an encoder goes out?

Quote:
Originally Posted by Inconceivable View Post
Hello! I'm am using a CAN based (speed mode) control this year for a mechanum drive equipped with the us digital E4P encoders that come in the KOP (with 360 encoder wheels), and a mentor brought up a very good question. What happens if an encoder stops working or malfunctions? My gut feeling is that with all the safety checks implemented in the CAN Libraries (Labview), The Jag would figure out that it's not getting a valid signal from the encoder and simply shut down, but is there the possibility that it would just go full speed ahead in attempt to get to the set RPM (because it's reading 0 RPM)? If a Jag can detect whether or not an encoder is out, and one does, I intend to have all of the drive-motor jags switch to voltage mode so you aren't stuck with a dead wheel, or robot, depending on how it reacts... Does anyone know?
Spencer,

Yes, it goes full speed. We had this happen two days ago. That really helped drive home the safety issues to several of our students. No one got hurt even slightly, but it was scary.

We are looking to do something like Joe suggested by adding some code to look for this state. We also have the encoder signals on the drive train routed to the cRio to get distance, so we will likely put the safety code in that part of the loop. The good news is that it did stop when we disabled it.

I like your idea to have it switch to voltage mode if that happens. That might be a bit tricky to do, but it seems feasible.

-Hugh
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2011, 22:24
Inconceivable Inconceivable is offline
Registered User
FRC #2530 (Inconceivable)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Rochester, MN
Posts: 2
Inconceivable is an unknown quantity at this point
Re: What happens when an encoder goes out?

Thanks a lot! It's good to know that. Now that I've thought a bit about it, it would probably be equal effective to give the driver the ability to switch modes. The driver can recognize an out of control wheel just as well as a [well written] program. He would probably react slower, but having the driver do it would ensure that the robot wouldn't go into V-mode at an undesired time, and the driver may want to go into V-mode for some reason. In fact, some drivers prefer the V-mode for everything except fine control, which is where speed mode really comes in handy. Just for safety though, it would probably be good to have an auto-switch feature: if an encoder is stationary for more than one second while more than, say, 2 volts are being applied to the motor, switch modes! I've heard, however, that the serial port on the cRIO has a little trouble both setting values and reading RPM from the jags simultaneously...
Reply With Quote
  #5   Spotlight this post!  
Unread 12-02-2011, 00:17
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: What happens when an encoder goes out?

Quote:
Originally Posted by Inconceivable View Post
I've heard, however, that the serial port on the cRIO has a little trouble both setting values and reading RPM from the jags simultaneously...
That's not the case, except for the fact that only one message can be outstanding at one time. This is a limitation of the Jag, not the serial port. Each message only takes about 3ms - 4ms. You can typically have about 3 outstanding messages to different motors at a time.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2011, 10:16
JasonStern JasonStern is offline
Mentor
FRC #1123 (AIM Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Arlington, VA
Posts: 65
JasonStern is on a distinguished road
Re: What happens when an encoder goes out?

Quote:
Originally Posted by jhersh View Post
That's not the case, except for the fact that only one message can be outstanding at one time. This is a limitation of the Jag, not the serial port. Each message only takes about 3ms - 4ms. You can typically have about 3 outstanding messages to different motors at a time.

-Joe
Does this mean the 2can has the same limitation?

Thanks,
Jason
__________________
Que será será
Reply With Quote
  #7   Spotlight this post!  
Unread 14-02-2011, 13:08
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: What happens when an encoder goes out?

Yes.
This is a limitation of the Jaguar firmware (or the sensor itself), not a limitation of the CAN bus.
You would have this same limitation in a PID loop on the cRIO.
__________________
-- Marshal Horn
Reply With Quote
  #8   Spotlight this post!  
Unread 14-02-2011, 14:01
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: What happens when an encoder goes out?

Quote:
Originally Posted by JasonStern View Post
Does this mean the 2can has the same limitation?

Thanks,
Jason
If the limitation you are referring to is the inability to have more than one outstanding message at a time to a single Jaguar, then yes... it is the Jaguar and the 2CAN does not remove that limitation.

-Joe
Reply With Quote
  #9   Spotlight this post!  
Unread 14-02-2011, 14:56
JasonStern JasonStern is offline
Mentor
FRC #1123 (AIM Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Arlington, VA
Posts: 65
JasonStern is on a distinguished road
Re: What happens when an encoder goes out?

Quote:
Originally Posted by jhersh View Post
If the limitation you are referring to is the inability to have more than one outstanding message at a time to a single Jaguar, then yes... it is the Jaguar and the 2CAN does not remove that limitation.

-Joe
Thanks for the information! What about the 3 outstanding messages in total? Is that a limitation of the serial port, the crio, or the Jaguars?

--Jason
__________________
Que será será
Reply With Quote
  #10   Spotlight this post!  
Unread 14-02-2011, 15:01
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: What happens when an encoder goes out?

Quote:
Originally Posted by JasonStern View Post
Thanks for the information! What about the 3 outstanding messages in total? Is that a limitation of the serial port, the crio, or the Jaguars?

--Jason
That's based on the time it takes for a message to be bridged from the serial port to CAN, the Jaguar to process each message, the time for the reply to be bridged to serial, and the actual transmission times on each bus.

-Joe
Reply With Quote
  #11   Spotlight this post!  
Unread 14-02-2011, 15:39
JasonStern JasonStern is offline
Mentor
FRC #1123 (AIM Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Arlington, VA
Posts: 65
JasonStern is on a distinguished road
Re: What happens when an encoder goes out?

Quote:
Originally Posted by jhersh View Post
That's based on the time it takes for a message to be bridged from the serial port to CAN, the Jaguar to process each message, the time for the reply to be bridged to serial, and the actual transmission times on each bus.

-Joe
Thanks again for the information!

Jason
__________________
Que será será
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 17:50.

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