Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   c++ pcm (http://www.chiefdelphi.com/forums/showthread.php?t=142277)

jthenderson 21-01-2016 19:24

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!

rich2202 21-01-2016 20:00

Re: c++ pcm
 
Quote:

Originally Posted by jthenderson (Post 1528036)
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.

414cnewq 21-01-2016 20:04

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.

The Doctor 21-01-2016 20:13

Re: c++ pcm
 
The API is described here:

http://first.wpi.edu/FRC/roborio/rel.../classPCM.html

jthenderson 21-01-2016 21:52

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...

ozrien 21-01-2016 22:05

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


All times are GMT -5. The time now is 02:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi