PneumaticHub
- class wpilib.PneumaticHub(*args, **kwargs)
Bases:
PneumaticsBase
Module class for controlling a REV Robotics Pneumatic Hub.
Overloaded function.
__init__(self: wpilib._wpilib.PneumaticHub) -> None
Constructs a PneumaticHub with the default ID (1).
__init__(self: wpilib._wpilib.PneumaticHub, module: int) -> None
Constructs a PneumaticHub.
- Parameters:
module – module number to construct
- class Faults
Bases:
pybind11_object
- property Brownout
- property CanWarning
- property Channel0Fault
- property Channel10Fault
- property Channel11Fault
- property Channel12Fault
- property Channel13Fault
- property Channel14Fault
- property Channel15Fault
- property Channel1Fault
- property Channel2Fault
- property Channel3Fault
- property Channel4Fault
- property Channel5Fault
- property Channel6Fault
- property Channel7Fault
- property Channel8Fault
- property Channel9Fault
- property CompressorOpen
- property CompressorOverCurrent
- property HardwareFault
- property SolenoidOverCurrent
- getChannelFault(channel: int) bool
Gets whether there is a fault at the specified channel.
- Parameters:
channel – Channel to check for faults.
- Returns:
True if a a fault exists at the channel, otherwise false. @throws A ChannelIndexOutOfRange error if the provided channel is outside of the range supported by the hardware.
- class StickyFaults
Bases:
pybind11_object
- property Brownout
- property CanBusOff
- property CanWarning
- property CompressorOpen
- property CompressorOverCurrent
- property HasReset
- property SolenoidOverCurrent
- class Version
Bases:
pybind11_object
- property FirmwareFix int
- property FirmwareMajor int
- property FirmwareMinor int
- property HardwareMajor int
- property HardwareMinor int
- property UniqueId int
- checkAndReserveSolenoids(mask: int) int
- checkSolenoidChannel(channel: int) bool
- clearStickyFaults() None
Clears the sticky faults.
- disableCompressor() None
Disables the compressor. The compressor will not turn on until EnableCompressorDigital(), EnableCompressorAnalog(), or EnableCompressorHybrid() are called.
- enableCompressorAnalog(minPressure: wpimath.units.pounds_per_square_inch, maxPressure: wpimath.units.pounds_per_square_inch) None
Enables the compressor in analog mode. This mode uses an analog pressure sensor connected to analog channel 0 to cycle the compressor. The compressor will turn on when the pressure drops below
minPressure
and will turn off when the pressure reachesmaxPressure
.- Parameters:
minPressure – The minimum pressure. The compressor will turn on when the pressure drops below this value. Range 0 - 120 PSI.
maxPressure – The maximum pressure. The compressor will turn off when the pressure reaches this value. Range 0 - 120 PSI. Must be larger then minPressure.
- enableCompressorDigital() None
- enableCompressorHybrid(minPressure: wpimath.units.pounds_per_square_inch, maxPressure: wpimath.units.pounds_per_square_inch) None
Enables the compressor in hybrid mode. This mode uses both a digital pressure switch and an analog pressure sensor connected to analog channel 0 to cycle the compressor.
The compressor will turn on when a both:
The digital pressure switch indicates the system is not full AND
The analog pressure sensor indicates that the pressure in the system is
below the specified minimum pressure.
The compressor will turn off when a either:
The digital pressure switch is disconnected or indicates that the system
is full OR - The pressure detected by the analog sensor is greater than the specified maximum pressure.
- Parameters:
minPressure – The minimum pressure. The compressor will turn on when the pressure drops below this value and the pressure switch indicates that the system is not full. Range 0 - 120 PSI.
maxPressure – The maximum pressure. The compressor will turn off when the pressure reaches this value or the pressure switch is disconnected or indicates that the system is full. Range 0 - 120 PSI. Must be larger then minPressure.
- fireOneShot(index: int) None
- get5VRegulatedVoltage() wpimath.units.volts
Returns the current voltage of the regulated 5v supply.
- Returns:
The current voltage of the 5v supply.
- getAnalogVoltage(channel: int) wpimath.units.volts
Returns the raw voltage of the specified analog input channel.
- Parameters:
channel – The analog input channel to read voltage from.
- Returns:
The voltage of the specified analog input channel.
- getCompressor() bool
- getCompressorConfigType() wpilib._wpilib.CompressorConfigType
- getCompressorCurrent() wpimath.units.amperes
- getFaults() wpilib._wpilib.PneumaticHub.Faults
Returns the faults currently active on this device.
- Returns:
The faults.
- getInputVoltage() wpimath.units.volts
Returns the current input voltage for this device.
- Returns:
The input voltage.
- getModuleNumber() int
- getPressure(channel: int) wpimath.units.pounds_per_square_inch
Returns the pressure read by an analog pressure sensor on the specified analog input channel.
- Parameters:
channel – The analog input channel to read pressure from.
- Returns:
The pressure read by an analog pressure sensor on the specified analog input channel.
- getPressureSwitch() bool
- getSolenoidDisabledList() int
- getSolenoids() int
- getSolenoidsTotalCurrent() wpimath.units.amperes
Returns the total current drawn by all solenoids.
- Returns:
Total current drawn by all solenoids.
- getSolenoidsVoltage() wpimath.units.volts
Returns the current voltage of the solenoid power supply.
- Returns:
The current voltage of the solenoid power supply.
- getStickyFaults() wpilib._wpilib.PneumaticHub.StickyFaults
Returns the sticky faults currently active on this device.
- Returns:
The sticky faults.
- getVersion() wpilib._wpilib.PneumaticHub.Version
Returns the hardware and firmware versions of this device.
- Returns:
The hardware and firmware versions.
- makeCompressor() wpilib._wpilib.Compressor
- makeDoubleSolenoid(forwardChannel: int, reverseChannel: int) wpilib._wpilib.DoubleSolenoid
- makeSolenoid(channel: int) wpilib._wpilib.Solenoid
- reserveCompressor() bool
- setOneShotDuration(index: int, duration: wpimath.units.seconds) None
- setSolenoids(mask: int, values: int) None
- unreserveCompressor() None
- unreserveSolenoids(mask: int) None