Go to Post A lot of people forget this when posting, but your posts here on ChiefDelphi will more or less be here forever. Do you really want that post you just be made to be on the Internet forever?... Post wisely... - artdutra04 [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 12-01-2015, 09:44
dougwilliams's Avatar
dougwilliams dougwilliams is offline
Engineer - Controls, Electronics
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: May 2013
Rookie Year: 2013
Location: Vestal, NY
Posts: 109
dougwilliams is on a distinguished road
Question Help with RoboRio Serial Ports -

We are integrating a NAV6 IMU with the RoboRIO and had it working fine over USB (with USB/RS232 converter), and tried to go direct to the RoboRio RS232 port. We keep getting errors when running - similar to what we had with the USB port before we correctly passed the port (SerialPort::kUSB). We have swapped that out with SerialPort::kOnboard, but still have no luck. We tried swapping the TX/RX wires, but the RoboRIO choked after that, so we went back to the original which seemed more promising.

What should we see in the RoboRIO web page - we always seem to see two ports, but both are stuck at 9600. In the LIDAR thread someone mentiones something about the "main" I2C port not working, but the MXP one does, and I'm wondering if there is a setting somewhere that is steering logical ports to either the "On Board" ports vs the MXP ports.

Our code and most relevant setup file for serial comms is here:
https://github.com/team2053tigertron...r/FODRobot2015

Related side question 1: Where is the latest "official" downloadable source for the WPILib? I see a few repositories, but nothing I can discern as latest/official, etc. (So I can browse the functions and make sure we are using them right).

Related side question 2: Are there any links to Beta teams who used C++, and posted their code somewhere? I have only found one or two, but none that used the serial port...
Reply With Quote
  #2   Spotlight this post!  
Unread 12-01-2015, 10:34
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 343
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Help with RoboRio Serial Ports -

Quote:
Originally Posted by dougwilliams View Post
We are integrating a NAV6 IMU with the RoboRIO and had it working fine over USB (with USB/RS232 converter), and tried to go direct to the RoboRio RS232 port. We keep getting errors when running - similar to what we had with the USB port before we correctly passed the port (SerialPort::kUSB). We have swapped that out with SerialPort::kOnboard, but still have no luck. We tried swapping the TX/RX wires, but the RoboRIO choked after that, so we went back to the original which seemed more promising.

What should we see in the RoboRIO web page - we always seem to see two ports, but both are stuck at 9600. In the LIDAR thread someone mentiones something about the "main" I2C port not working, but the MXP one does, and I'm wondering if there is a setting somewhere that is steering logical ports to either the "On Board" ports vs the MXP ports.

Our code and most relevant setup file for serial comms is here:
https://github.com/team2053tigertron...r/FODRobot2015

Related side question 1: Where is the latest "official" downloadable source for the WPILib? I see a few repositories, but nothing I can discern as latest/official, etc. (So I can browse the functions and make sure we are using them right).

Related side question 2: Are there any links to Beta teams who used C++, and posted their code somewhere? I have only found one or two, but none that used the serial port...
One thing to check is that the Roborio "console out" functionality needs to be disabled to use the Roborio RS-232 port.

Others have successfully integrated the nav6 with Roborio via the RS-232 port, though I don't know about doing so in c++.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-01-2015, 11:02
dougwilliams's Avatar
dougwilliams dougwilliams is offline
Engineer - Controls, Electronics
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: May 2013
Rookie Year: 2013
Location: Vestal, NY
Posts: 109
dougwilliams is on a distinguished road
Re: Help with RoboRio Serial Ports -

Quote:
Originally Posted by slibert View Post
One thing to check is that the Roborio "console out" functionality needs to be disabled to use the Roborio RS-232 port.
Interesting ... where is console output setting?
Reply With Quote
  #4   Spotlight this post!  
Unread 12-01-2015, 11:13
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,754
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Help with RoboRio Serial Ports -

In the roboRIo WebDash.

RoboRIO Webdashboard
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2015, 11:42
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,561
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: Help with RoboRio Serial Ports -

Quote:
Originally Posted by Mark McLeod View Post
In the roboRIo WebDash.
And on the imaging tool. Note that if you ever have to reimage the roboRIO, the imaging tool will automatically turn the console out back on.
Reply With Quote
  #6   Spotlight this post!  
Unread 12-01-2015, 22:40
razorgator's Avatar
razorgator razorgator is offline
Registered User
AKA: Chase Rainwater
FTC #9879 (Root Negative One)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Springdale, AR
Posts: 17
razorgator will become famous soon enoughrazorgator will become famous soon enough
Re: Help with RoboRio Serial Ports -

We are also trying to get the Nav6 to run on the RoboRio using C++. We originally tried going from Nav6 to a USB input on the RoboRio (changing the initialization of the serial port to kUSB). We didn't have any luck with that approach. However, perhaps that was to be expected. I see that there is a note on the Kauai Labs website that suggests using a USB-serial cable with FTDI or Prolific chipsets. The cable we used did not have either of those.

We have moved to trying to communicate with the Nav6 via the RS-232 port onboard the RoboRio. Until this evening, we were getting messages while our code was running on the RoboRio suggesting that there was an issue with our use of SerialPort.h. While we did change the initialization parameter to kOnboard, we had not disabled the console out. When we disabled that, the messages went away. However, we are still unable to receive information from the Nav6. For testing purposes, we are just calling the GetYaw function and attempting to display it on the SmartDashboard. At the moment, no value is displayed.

Thanks for everyone's input this far. Any other suggestions are welcome!
Reply With Quote
  #7   Spotlight this post!  
Unread 13-01-2015, 08:07
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 343
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Help with RoboRio Serial Ports -

Quote:
Originally Posted by razorgator View Post
We are also trying to get the Nav6 to run on the RoboRio using C++. We originally tried going from Nav6 to a USB input on the RoboRio (changing the initialization of the serial port to kUSB). We didn't have any luck with that approach. However, perhaps that was to be expected. I see that there is a note on the Kauai Labs website that suggests using a USB-serial cable with FTDI or Prolific chipsets. The cable we used did not have either of those.

We have moved to trying to communicate with the Nav6 via the RS-232 port onboard the RoboRio. Until this evening, we were getting messages while our code was running on the RoboRio suggesting that there was an issue with our use of SerialPort.h. While we did change the initialization parameter to kOnboard, we had not disabled the console out. When we disabled that, the messages went away. However, we are still unable to receive information from the Nav6. For testing purposes, we are just calling the GetYaw function and attempting to display it on the SmartDashboard. At the moment, no value is displayed.

Thanks for everyone's input this far. Any other suggestions are welcome!
The Trendnet TU-S9 USB serial adapter works on the roborio, that's the easiest integration method from a wiring perspective. There are some additional troubleshooting tips on the nav6 wiki. This has been tested with C++.

For RS-232, check your wiring. TX on the nav6 side connects to RX on the roborio side, and vice versa. And you have to connect GND on the nav6 to GND on the roborio's RS-232 connector.

To be sure the nav6 is sending data, look at the green TX led on the nav6 circuit board.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-01-2015, 16:53
razorgator's Avatar
razorgator razorgator is offline
Registered User
AKA: Chase Rainwater
FTC #9879 (Root Negative One)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Springdale, AR
Posts: 17
razorgator will become famous soon enoughrazorgator will become famous soon enough
Re: Help with RoboRio Serial Ports -

Thank you for the direction.

The green TX led is lit. We will double check the RS-232 wiring this evening.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-01-2015, 18:31
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 195
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Help with RoboRio Serial Ports -

On the same team as dougwilliams here - We got the serial port working. All we had to do was switch the pinouts and uncheck console output in the roboRIO webdashboard. Now it works!

Thanks for the help!

- Drew
Reply With Quote
  #10   Spotlight this post!  
Unread 13-01-2015, 19:17
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 343
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Help with RoboRio Serial Ports -

Quote:
Originally Posted by jreneew2 View Post
On the same team as dougwilliams here - We got the serial port working. All we had to do was switch the pinouts and uncheck console output in the roboRIO webdashboard. Now it works!

Thanks for the help!

- Drew
You're very welcome, Drew. We've updated the nav6 troubleshooting page to capture the issue you encountered. Good luck in this year's competition!
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 12:54.

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