Go to Post At IRI you have 72 of the best teams in the country. It could literally be held in a cornfield in the middle of Indiana and nobody would care, because the competition is simply that good. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2015, 18:49
Nathan Powell's Avatar
Nathan Powell Nathan Powell is offline
The Prime Function
FRC #2582 (PantherBots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Lufkin, TX
Posts: 37
Nathan Powell is an unknown quantity at this point
CAN for Pneumatics in C++

Greetings, all.

My team is opting to use pneumatics in our tote-acquisition part of the robot this year. Pneumatics coding and wiring require a controller area network, or CAN. I have never heard of CAN until this year...would someone be able to assist me in programming a CAN for a pneumatic solenoid and compressor?
__________________
"What's this I keep hearing about always blame programming?"
  #2   Spotlight this post!  
Unread 14-01-2015, 18:54
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 610
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Re: CAN for Pneumatics in C++

There is no need to program CAN for the pneumatics. You only need to use the CAN cables on the PCM, and connect them to the roboRIO or PDP. The code is nearly exactly the same as last year, and the compressor is actually closed-loop this year! Just declare a solenoid, and the compressor should run by itself.
Hope that helped.
  #3   Spotlight this post!  
Unread 14-01-2015, 18:59
Nathan Powell's Avatar
Nathan Powell Nathan Powell is offline
The Prime Function
FRC #2582 (PantherBots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Lufkin, TX
Posts: 37
Nathan Powell is an unknown quantity at this point
Re: CAN for Pneumatics in C++

That is quite helpful. It bothered my coach a bit (who was convinced that a CAN needed some type of special programming) but this cleared up a lot of inconsistency, and at least to me makes more sense. Thank you for your help.
__________________
"What's this I keep hearing about always blame programming?"
  #4   Spotlight this post!  
Unread 14-01-2015, 20:08
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: 549
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 for Pneumatics in C++

Some helpful links... You can re-find them by searching "PCM" in the FRC Screensteps search bar.

http://wpilib.screenstepslive.com/s/...control-module

This one has some examples, probably the most useful.
http://wpilib.screenstepslive.com/s/...anual-id=13810

Porting guide if you have code from previous cRIO system you want to use.
http://wpilib.screenstepslive.com/s/...e-2014-to-2015
  #5   Spotlight this post!  
Unread 14-01-2015, 21:23
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 610
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Re: CAN for Pneumatics in C++

Quote:
Originally Posted by Nathan Powell View Post
That is quite helpful. It bothered my coach a bit (who was convinced that a CAN needed some type of special programming) but this cleared up a lot of inconsistency, and at least to me makes more sense. Thank you for your help.
In case this up again in the future: CAN programming is only needed if you're running a CAN motor controller. Despite my team beta testing, we haven't used an SRX yet, so I can't help you there. The built in CAN on the roboRIO, PDP, and PRM require no special programming. They do make wiring a lot simpler though!
  #6   Spotlight this post!  
Unread 19-01-2015, 22:36
JefferMC JefferMC is offline
Registered User
AKA: Jeff Corbett
FRC #1319 (Flash)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2005
Location: United States
Posts: 44
JefferMC will become famous soon enough
Re: CAN for Pneumatics in C++

It really takes very little special programming to run TalonSRX using CAN. Create a CANTalon class object for each and construct your RobotDrive using those.

You will need to use the roboRio's web page to locate each Talon and assign it a unique CAN bus ID (used when constructing the CANTalon object).
Closed Thread


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 02:55.

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