phoenix6.hardware.core.core_candle
¶
Module Contents¶
- class phoenix6.hardware.core.core_candle.CoreCANdle(device_id: int, canbus: str | phoenix6.canbus.CANBus = '')¶
Bases:
phoenix6.hardware.parent_device.ParentDevice
Constructs a new CANdle object.
- Parameters:
device_id (int) – ID of the device, as configured in Phoenix Tuner.
canbus (str | CANBus, optional) –
Name of the CAN bus this device is on. Possible CAN bus strings are:
”rio” for the native roboRIO CAN bus
CANivore name or serial number
SocketCAN interface (non-FRC Linux only)
”*” for any CANivore seen by the program
empty string (default) to select the default for the system:
”rio” on roboRIO
”can0” on Linux
”*” on Windows
- property sim_state: phoenix6.sim.candle_sim_state.CANdleSimState¶
Get the simulation state for this device.
This function reuses an allocated simulation state object, so it is safe to call this function multiple times in a robot loop.
- Returns:
Simulation state
- Return type:
- get_version_major(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
App Major Version number.
Minimum Value: 0
Maximum Value: 255
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
VersionMajor Status Signal Object
- Return type:
StatusSignal[int]
- get_version_minor(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
App Minor Version number.
Minimum Value: 0
Maximum Value: 255
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
VersionMinor Status Signal Object
- Return type:
StatusSignal[int]
- get_version_bugfix(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
App Bugfix Version number.
Minimum Value: 0
Maximum Value: 255
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
VersionBugfix Status Signal Object
- Return type:
StatusSignal[int]
- get_version_build(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
App Build Version number.
Minimum Value: 0
Maximum Value: 255
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
VersionBuild Status Signal Object
- Return type:
StatusSignal[int]
- get_version(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
Full Version of firmware in device. The format is a four byte value.
Minimum Value: 0
Maximum Value: 4294967295
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Version Status Signal Object
- Return type:
StatusSignal[int]
- get_fault_field(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
Integer representing all fault flags reported by the device.
These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.
Minimum Value: 0
Maximum Value: 4294967295
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
FaultField Status Signal Object
- Return type:
StatusSignal[int]
- get_sticky_fault_field(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
Integer representing all (persistent) sticky fault flags reported by the device.
These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.
Minimum Value: 0
Maximum Value: 4294967295
Default Value: 0
Units:
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFaultField Status Signal Object
- Return type:
StatusSignal[int]
- get_is_pro_licensed(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Whether the device is Phoenix Pro licensed.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
IsProLicensed Status Signal Object
- Return type:
StatusSignal[bool]
- get_supply_voltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[phoenix6.units.volt] ¶
Measured supply voltage to the CANdle.
Minimum Value: 0.0
Maximum Value: 32.767
Default Value: 0
Units: V
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
SupplyVoltage Status Signal Object
- Return type:
StatusSignal[volt]
- get_five_v_rail_voltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[phoenix6.units.volt] ¶
The measured voltage of the 5V rail line.
Minimum Value: 0.0
Maximum Value: 10.23
Default Value: 0
Units: V
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
FiveVRailVoltage Status Signal Object
- Return type:
StatusSignal[volt]
- get_output_current(refresh: bool = True) phoenix6.status_signal.StatusSignal[phoenix6.units.ampere] ¶
The measured output current. This includes both VBat and 5V output current.
Minimum Value: 0.0
Maximum Value: 10.23
Default Value: 0
Units: A
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
OutputCurrent Status Signal Object
- Return type:
StatusSignal[ampere]
- get_device_temp(refresh: bool = True) phoenix6.status_signal.StatusSignal[phoenix6.units.celsius] ¶
The temperature that the CANdle measures itself to be at.
Minimum Value: -128
Maximum Value: 127
Default Value: 0
Units: ℃
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
DeviceTemp Status Signal Object
- Return type:
StatusSignal[celsius]
- get_v_bat_modulation(refresh: bool = True) phoenix6.status_signal.StatusSignal[float] ¶
The applied VBat modulation duty cycle.
This signal will report 1.0 if the VBatOutputMode is configured to be always on, and 0.0 if configured to be always off. Otherwise, this will report the applied modulation from the last ModulateVBatOut request.
Minimum Value: 0.0
Maximum Value: 1.0
Default Value: 0
Units: frac
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
VBatModulation Status Signal Object
- Return type:
StatusSignal[float]
- get_max_simultaneous_animation_count(refresh: bool = True) phoenix6.status_signal.StatusSignal[int] ¶
The maximum number of simultaneous animations supported by the current version of CANdle firmware.
Any control request using an animation slot greater than or equal to this signal will be ignored.
Minimum Value: 0
Maximum Value: 31
Default Value: 0
Units:
Default Rates: - CAN 2.0: 10.0 Hz - CAN FD: 10.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
MaxSimultaneousAnimationCount Status Signal Object
- Return type:
StatusSignal[int]
- get_fault_hardware(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Hardware fault occurred
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_Hardware Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_hardware(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Hardware fault occurred
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_Hardware Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_undervoltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device supply voltage dropped to near brownout levels
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_Undervoltage Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_undervoltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device supply voltage dropped to near brownout levels
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_Undervoltage Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_boot_during_enable(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device boot while detecting the enable signal
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_BootDuringEnable Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_boot_during_enable(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device boot while detecting the enable signal
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_BootDuringEnable Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_unlicensed_feature_in_use(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
An unlicensed feature is in use, device may not behave as expected.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_UnlicensedFeatureInUse Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_unlicensed_feature_in_use(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
An unlicensed feature is in use, device may not behave as expected.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_UnlicensedFeatureInUse Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_overvoltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device supply voltage is too high (above 30 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_Overvoltage Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_overvoltage(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device supply voltage is too high (above 30 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_Overvoltage Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_5_v_too_high(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device 5V line is too high (above 6 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_5VTooHigh Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_5_v_too_high(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device 5V line is too high (above 6 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_5VTooHigh Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_5_v_too_low(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device 5V line is too low (below 4 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_5VTooLow Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_5_v_too_low(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device 5V line is too low (below 4 V).
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_5VTooLow Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_thermal(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device temperature exceeded limit.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_Thermal Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_thermal(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
Device temperature exceeded limit.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_Thermal Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_software_fuse(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
CANdle output current exceeded the 6 A limit.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_SoftwareFuse Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_software_fuse(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
CANdle output current exceeded the 6 A limit.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_SoftwareFuse Status Signal Object
- Return type:
StatusSignal[bool]
- get_fault_short_circuit(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
CANdle has detected the output pin is shorted.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
Fault_ShortCircuit Status Signal Object
- Return type:
StatusSignal[bool]
- get_sticky_fault_short_circuit(refresh: bool = True) phoenix6.status_signal.StatusSignal[bool] ¶
CANdle has detected the output pin is shorted.
Default Value: False
Default Rates: - CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh (bool) – Whether to refresh the StatusSignal before returning it; defaults to true
- Returns:
StickyFault_ShortCircuit Status Signal Object
- Return type:
StatusSignal[bool]
- set_control(request: phoenix6.controls.modulate_v_bat_out.ModulateVBatOut) phoenix6.status_signal.StatusCode ¶
- set_control(request: phoenix6.controls.solid_color.SolidColor) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.empty_animation.EmptyAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.color_flow_animation.ColorFlowAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.fire_animation.FireAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.larson_animation.LarsonAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.rainbow_animation.RainbowAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.rgb_fade_animation.RgbFadeAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.single_fade_animation.SingleFadeAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.strobe_animation.StrobeAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.twinkle_animation.TwinkleAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.controls.twinkle_off_animation.TwinkleOffAnimation) phoenix6.status_signal.StatusCode
- set_control(request: phoenix6.hardware.parent_device.SupportsSendRequest) phoenix6.status_signal.StatusCode
- clear_sticky_faults(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear the sticky faults in the device.
This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_hardware(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Hardware fault occurred
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_undervoltage(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device supply voltage dropped to near brownout levels
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_boot_during_enable(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device boot while detecting the enable signal
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_unlicensed_feature_in_use(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_overvoltage(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device supply voltage is too high (above 30 V).
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_5_v_too_high(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device 5V line is too high (above 6 V).
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_5_v_too_low(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device 5V line is too low (below 4 V).
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_thermal(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: Device temperature exceeded limit.
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_software_fuse(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: CANdle output current exceeded the 6 A limit.
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type:
- clear_sticky_fault_short_circuit(timeout_seconds: phoenix6.units.second = 0.1) phoenix6.status_signal.StatusCode ¶
Clear sticky fault: CANdle has detected the output pin is shorted.
- Parameters:
timeout_seconds (second) – Maximum time to wait up to in seconds.
- Returns:
StatusCode of the set command
- Return type: