Go to Post This season, I learned that I will need a whip next year for keeping the electronics and pneumatics groups on schedule. - Yan Wang [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-03-2015, 10:44 PM
KPSch KPSch is offline
Registered User
AKA: Ken Schenke
FRC #1987 (Broncobots)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2013
Location: Lee's Summit, MO USA
Posts: 38
KPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to all
Unhappy Use of JoystickButton in Command Based does not activate PCM

The issue we're seeing is that when a JoystickButton is added to the scheduler (ex. myButton->WhenPressed(new MyCommand())), the PCM does not activate.

The status lights for devices:
PCM:
Status: Green Slow
Comp: Off
PDP:
Stat: Green Strobe
Comm: Green Strobe
roboRio: Off
RSL: Blinking - Robot On and Enabled
Voltage Regulator:
5V: Bright Green
12V: Bright Green
Firmware:
PCM: 1.59
PDP: 1.40
roboRIO: 2.1.0f3
roboRIO Image: FRC_roboRIO_2015_v23

Observations:
The PCM does not activate after:
A complete power cycle of the robot.
Reboot roboRIO
The PCM does activate after we:
Deploy code.
Restart robot code.
Things we've tried that didn't work
Multiple PCMs.
2.4GHz WiFi
5GHz WiFi
Multiple Radios.
3 different WiFi channels - auto, 4, and 8.
3 different joysticks (traditional and an XBox 360 controller).
Tried relocating radio on robot.
Another laptop with fresh WPIlib and NI installs.
Manually instantiating the compressor with the C++ Compressor class.
Tried manually adding the JoystickButton to the Scheduler using Scheduler::AddButton() instead of JoystickButton::WhenPressed().
Another compressor.

Things we've tried that work consistently
Ethernet Tether.
Iterative.
Restart robot code. In fact, after a power cycle if we click Restart robot code before enabling, it works every time.

Things we have not tried
Another roboRIO.
Another PDP.

At the beginning of build season, we were able to wire and re-program a previous robot (with pneumatics) and did not have any issues.
We then wired and programmed this years' robot. We did not notice any issues until we got the pneumatics hooked up on this robot.
We consulted a local team that beta tested the roboRIO. Their programming mentor was also stumped.

In our troubleshooting, we created a bare bones Command Based project:
https://github.com/FRCTeam1987/PneumaticsTest

We found that in OI.cpp, we can create a Joystick and a JoystickButton just fine. The issue arises when we add a button to the scheduler, which is line 8 in the linked project.
Through NetConsole, we have seen that the code does run when we enable on a power cycle and the compressor closed loop is on, but the compressor does not turn on and the control system status indicators are as described above.
The PCM does get a sticky fault saying "Comp Curr Too Low - Most likely the compressor is not connected." We have also cleared the sticky faults manually using the roboRIO web page with the self test button.

What are we missing?
Does anyone have any suggestions for what else to try?

We are out of ideas to try and resolve this issue. Any help you all could provide would be much appreciated.

Thanks.
Reply With Quote
 


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:08 AM.

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