Go to Post If sponsors are only interested in blue banners and trophies, then they don't get it. - Taylor [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 21-01-2016, 19:24
jthenderson jthenderson is offline
Registered User
FRC #5464 (BlueJackets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: minnesota
Posts: 8
jthenderson is an unknown quantity at this point
c++ pcm

I was wondering... does anyone know how to code the pcm in c++? how do you set the psi?


thanks for your help!
  #2   Spotlight this post!  
Unread 21-01-2016, 20:00
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,192
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: c++ pcm

Quote:
Originally Posted by jthenderson View Post
I was wondering... does anyone know how to code the pcm in c++? how do you set the psi?


thanks for your help!
You do not set the PSI in code. It is set by the switch (about 117 psi), which you cannot change (legally). The Pressure Relief Valve can, and should, be set to the proper psi (around 120 to 125 psi).

You can enable and disable the compressor in code, but you cannot set the PSI.
  #3   Spotlight this post!  
Unread 21-01-2016, 20:04
414cnewq 414cnewq is offline
Registered User
FRC #3844 (Kentucky Wildbots)
Team Role: Alumni
 
Join Date: Jul 2014
Rookie Year: 2014
Location: KY
Posts: 86
414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of
Re: c++ pcm

The PSI is set manually using the required pressure regulator (R78 D in rulebook). If you mean just the compressor, the PCM automatically runs when you use the DoubleSolenoid Class.
  #4   Spotlight this post!  
Unread 21-01-2016, 20:13
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MRT)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 154
The Doctor is on a distinguished road
Re: c++ pcm

The API is described here:

http://first.wpi.edu/FRC/roborio/rel.../classPCM.html
__________________
Robots + Python + pentesting == me;
Blog ~ GitHub ~ Keybase
If you have a pressing issue to discuss with me, kik me at slush.puddles since I don't check CD very often.
  #5   Spotlight this post!  
Unread 21-01-2016, 21:52
jthenderson jthenderson is offline
Registered User
FRC #5464 (BlueJackets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: minnesota
Posts: 8
jthenderson is an unknown quantity at this point
Thumbs up Re: c++ pcm

thanks... its been a long day and one of my fellow programmers told me to check... its hard to think when you are tired...
  #6   Spotlight this post!  
Unread 21-01-2016, 22:05
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: 522
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: c++ pcm

That link is for an internal class that generally is not used directly.

jthenderson,
If you want to use the solenoid outputs on the PCM, just create Solenoid or DoubleSolenoid objects.

If you want the PCM to auto-enable the compressor when your system needs air, just wire the pressure-switch and compressor to the PCM. The software will know what to do as long as you created as least one Solenoid/Double Solenoid.

If you want advance features like getting the solenoid voltage (to confirm the solenoid jumper is in 12V or 24V mode), getting compressor current, or getting/clearing fault flags, you can create a Compressor object. Also you can use SetClosedLoopControl() to force-off the compressor if you want. Some teams will force the compressor off for power management.

There is no need to create a PCM object,
https://wpilib.screenstepslive.com/s...anual-id=13810
https://wpilib.screenstepslive.com/s...anual-id=13810
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