Class CoreCANdi
- Direct Known Subclasses:
CANdi
// Constants used in CANdi construction final int kCANdiId = 0; final String kCANdiCANbus = "canivore"; // Construct the CANdi CANdi CANdi = new CANdi(kCANdiId, kCANdiCANbus); // Configure the CANdi for basic use CANdiConfiguration configs = new CANdiConfiguration(); // Write these configs to the CANdi CANdi.getConfigurator().apply(configs); // Get Pin 1 var p1State = CANdi.getP1State(); // Refresh and print these values System.out.println("Pin 1 is " + p1State.refresh().toString());
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix6.hardware.ParentDevice
ParentDevice.MapGenerator<T>
-
Field Summary
Fields inherited from class com.ctre.phoenix6.hardware.ParentDevice
_emptyControl, deviceIdentifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClear sticky fault: The CTR Electronics' CANdi™ branded device has detected a 5V fault.clearStickyFault_5V
(double timeoutSeconds) Clear sticky fault: The CTR Electronics' CANdi™ branded device has detected a 5V fault.Clear sticky fault: Device boot while detecting the enable signalclearStickyFault_BootDuringEnable
(double timeoutSeconds) Clear sticky fault: Device boot while detecting the enable signalClear sticky fault: Hardware fault occurredclearStickyFault_Hardware
(double timeoutSeconds) Clear sticky fault: Hardware fault occurredClear sticky fault: Device supply voltage dropped to near brownout levelsclearStickyFault_Undervoltage
(double timeoutSeconds) Clear sticky fault: Device supply voltage dropped to near brownout levelsClear sticky fault: An unlicensed feature is in use, device may not behave as expected.clearStickyFault_UnlicensedFeatureInUse
(double timeoutSeconds) Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.Clear the sticky faults in the device.clearStickyFaults
(double timeoutSeconds) Clear the sticky faults in the device.Gets the configurator to use with this device's configsThe CTR Electronics' CANdi™ branded device has detected a 5V fault.getFault_5V
(boolean refresh) The CTR Electronics' CANdi™ branded device has detected a 5V fault.Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzgetFault_BootDuringEnable
(boolean refresh) Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzHardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzgetFault_Hardware
(boolean refresh) Hardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzDevice supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzgetFault_Undervoltage
(boolean refresh) Device supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzAn unlicensed feature is in use, device may not behave as expected.getFault_UnlicensedFeatureInUse
(boolean refresh) An unlicensed feature is in use, device may not behave as expected.Integer representing all fault flags reported by the device.getFaultField
(boolean refresh) Integer representing all fault flags reported by the device.Whether the device is Phoenix Pro licensed.getIsProLicensed
(boolean refresh) Whether the device is Phoenix Pro licensed.Measured output current.getOutputCurrent
(boolean refresh) Measured output current.True when the CANdi™ is in overcurrent protection mode.getOvercurrent
(boolean refresh) True when the CANdi™ is in overcurrent protection mode.Measured position of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.getPWM1Position
(boolean refresh) Measured position of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.Measured rise to rise time of the PWM signal at the S1 input of the CTR Electronics' CANdi™.getPWM1RiseToRise
(boolean refresh) Measured rise to rise time of the PWM signal at the S1 input of the CTR Electronics' CANdi™.Measured velocity of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.getPWM1Velocity
(boolean refresh) Measured velocity of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.Measured position of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.getPWM2Position
(boolean refresh) Measured position of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.Measured rise to rise time of the PWM signal at the S2 input of the CTR Electronics' CANdi™.getPWM2RiseToRise
(boolean refresh) Measured rise to rise time of the PWM signal at the S2 input of the CTR Electronics' CANdi™.Measured velocity of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.getPWM2Velocity
(boolean refresh) Measured velocity of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.Position from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.getQuadraturePosition
(boolean refresh) Position from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.Velocity from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.getQuadratureVelocity
(boolean refresh) Velocity from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.True if the Signal 1 input (S1IN) matches the configured S1 Closed State.getS1Closed
(boolean refresh) True if the Signal 1 input (S1IN) matches the configured S1 Closed State.State of the Signal 1 input (S1IN).getS1State
(boolean refresh) State of the Signal 1 input (S1IN).True if the Signal 2 input (S2IN) matches the configured S2 Closed State.getS2Closed
(boolean refresh) True if the Signal 2 input (S2IN) matches the configured S2 Closed State.State of the Signal 2 input (S2IN).getS2State
(boolean refresh) State of the Signal 2 input (S2IN).Get the simulation state for this device.The CTR Electronics' CANdi™ branded device has detected a 5V fault.getStickyFault_5V
(boolean refresh) The CTR Electronics' CANdi™ branded device has detected a 5V fault.Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_BootDuringEnable
(boolean refresh) Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzHardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_Hardware
(boolean refresh) Hardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzDevice supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_Undervoltage
(boolean refresh) Device supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzAn unlicensed feature is in use, device may not behave as expected.getStickyFault_UnlicensedFeatureInUse
(boolean refresh) An unlicensed feature is in use, device may not behave as expected.Integer representing all (persistent) sticky fault flags reported by the device.getStickyFaultField
(boolean refresh) Integer representing all (persistent) sticky fault flags reported by the device.Measured supply voltage to the CANdi™.getSupplyVoltage
(boolean refresh) Measured supply voltage to the CANdi™.Full Version of firmware in device.getVersion
(boolean refresh) Full Version of firmware in device.App Bugfix Version number.getVersionBugfix
(boolean refresh) App Bugfix Version number.App Build Version number.getVersionBuild
(boolean refresh) App Build Version number.App Major Version number.getVersionMajor
(boolean refresh) App Major Version number.App Minor Version number.getVersionMinor
(boolean refresh) App Minor Version number.setControl
(ControlRequest request) Control device with generic control request object.setQuadraturePosition
(double newValue) Sets the position of the quadrature input.setQuadraturePosition
(double newValue, double timeoutSeconds) Sets the position of the quadrature input.setQuadraturePosition
(Angle newValue) Sets the position of the quadrature input.setQuadraturePosition
(Angle newValue, double timeoutSeconds) Sets the position of the quadrature input.Methods inherited from class com.ctre.phoenix6.hardware.ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate
-
Constructor Details
-
CoreCANdi
Constructs a new CANdi object.Constructs the device using the default CAN bus for the system:
- "rio" on roboRIO
- "can0" on Linux
- "*" on Windows
- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.
-
CoreCANdi
Constructs a new CANdi object.- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.canbus
- 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
-
CoreCANdi
Constructs a new CANdi object.- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.canbus
- The CAN bus this device is on.
-
-
Method Details
-
getConfigurator
Gets the configurator to use with this device's configs- Returns:
- Configurator for this object
-
getSimState
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
-
getVersionMajor
App Major Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionMajor Status Signal Object
-
getVersionMajor
App Major Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionMajor Status Signal Object
-
getVersionMinor
App Minor Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionMinor Status Signal Object
-
getVersionMinor
App Minor Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionMinor Status Signal Object
-
getVersionBugfix
App Bugfix Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionBugfix Status Signal Object
-
getVersionBugfix
App Bugfix Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionBugfix Status Signal Object
-
getVersionBuild
App Build Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionBuild Status Signal Object
-
getVersionBuild
App Build Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionBuild Status Signal Object
-
getVersion
Full Version of firmware in device. The format is a four byte value.- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Version Status Signal Object
-
getVersion
Full Version of firmware in device. The format is a four byte value.- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Version Status Signal Object
-
getFaultField
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:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- FaultField Status Signal Object
-
getFaultField
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:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- FaultField Status Signal Object
-
getStickyFaultField
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:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFaultField Status Signal Object
-
getStickyFaultField
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:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFaultField Status Signal Object
-
getIsProLicensed
Whether the device is Phoenix Pro licensed.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- IsProLicensed Status Signal Object
-
getIsProLicensed
Whether the device is Phoenix Pro licensed.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- IsProLicensed Status Signal Object
-
getS1State
State of the Signal 1 input (S1IN). Default Rates:- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- S1State Status Signal Object
-
getS1State
State of the Signal 1 input (S1IN). Default Rates:- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- S1State Status Signal Object
-
getS2State
State of the Signal 2 input (S2IN). Default Rates:- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- S2State Status Signal Object
-
getS2State
State of the Signal 2 input (S2IN). Default Rates:- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- S2State Status Signal Object
-
getQuadraturePosition
Position from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- QuadraturePosition Status Signal Object
-
getQuadraturePosition
Position from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- QuadraturePosition Status Signal Object
-
getPWM1RiseToRise
Measured rise to rise time of the PWM signal at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: 0
- Maximum Value: 131070
- Default Value: 0
- Units: us
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM1RiseToRise Status Signal Object
-
getPWM1RiseToRise
Measured rise to rise time of the PWM signal at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: 0
- Maximum Value: 131070
- Default Value: 0
- Units: us
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM1RiseToRise Status Signal Object
-
getPWM1Position
Measured position of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM1Position Status Signal Object
-
getPWM1Position
Measured position of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM1Position Status Signal Object
-
getPWM1Velocity
Measured velocity of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM1Velocity Status Signal Object
-
getPWM1Velocity
Measured velocity of the PWM sensor at the S1 input of the CTR Electronics' CANdi™.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM1Velocity Status Signal Object
-
getPWM2RiseToRise
Measured rise to rise time of the PWM signal at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: 0
- Maximum Value: 131070
- Default Value: 0
- Units: us
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM2RiseToRise Status Signal Object
-
getPWM2RiseToRise
Measured rise to rise time of the PWM signal at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: 0
- Maximum Value: 131070
- Default Value: 0
- Units: us
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM2RiseToRise Status Signal Object
-
getPWM2Position
Measured position of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM2Position Status Signal Object
-
getPWM2Position
Measured position of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM2Position Status Signal Object
-
getOvercurrent
True when the CANdi™ is in overcurrent protection mode. This may be due to either overcurrent or a short-circuit.- Default Value: 0
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- Overcurrent Status Signal Object
-
getOvercurrent
True when the CANdi™ is in overcurrent protection mode. This may be due to either overcurrent or a short-circuit.- Default Value: 0
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Overcurrent Status Signal Object
-
getSupplyVoltage
Measured supply voltage to the CANdi™.- Minimum Value: 4.0
- Maximum Value: 29.5
- Default Value: 0
- Units: V
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- SupplyVoltage Status Signal Object
-
getSupplyVoltage
Measured supply voltage to the CANdi™.- Minimum Value: 4.0
- Maximum Value: 29.5
- Default Value: 0
- Units: V
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- SupplyVoltage Status Signal Object
-
getOutputCurrent
Measured output current. This includes both Vbat and 5V output current.- Minimum Value: 0.0
- Maximum Value: 0.51
- Default Value: 0
- Units: A
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- OutputCurrent Status Signal Object
-
getOutputCurrent
Measured output current. This includes both Vbat and 5V output current.- Minimum Value: 0.0
- Maximum Value: 0.51
- Default Value: 0
- Units: A
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- OutputCurrent Status Signal Object
-
getPWM2Velocity
Measured velocity of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PWM2Velocity Status Signal Object
-
getPWM2Velocity
Measured velocity of the PWM sensor at the S2 input of the CTR Electronics' CANdi™.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PWM2Velocity Status Signal Object
-
getQuadratureVelocity
Velocity from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- QuadratureVelocity Status Signal Object
-
getQuadratureVelocity
Velocity from a quadrature encoder sensor connected to both the S1IN and S2IN inputs.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 20.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- QuadratureVelocity Status Signal Object
-
getS1Closed
True if the Signal 1 input (S1IN) matches the configured S1 Closed State.Configure the S1 closed state in the Digitals configuration object to change when this is asserted.
- Default Value: False
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- S1Closed Status Signal Object
-
getS1Closed
True if the Signal 1 input (S1IN) matches the configured S1 Closed State.Configure the S1 closed state in the Digitals configuration object to change when this is asserted.
- Default Value: False
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- S1Closed Status Signal Object
-
getS2Closed
True if the Signal 2 input (S2IN) matches the configured S2 Closed State.Configure the S2 closed state in the Digitals configuration object to change when this is asserted.
- Default Value: False
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- S2Closed Status Signal Object
-
getS2Closed
True if the Signal 2 input (S2IN) matches the configured S2 Closed State.Configure the S2 closed state in the Digitals configuration object to change when this is asserted.
- Default Value: False
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- S2Closed Status Signal Object
-
getFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_Hardware Status Signal Object
-
getFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_Hardware Status Signal Object
-
getStickyFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_Hardware Status Signal Object
-
getStickyFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_Hardware Status Signal Object
-
getFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_Undervoltage Status Signal Object
-
getFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_Undervoltage Status Signal Object
-
getStickyFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_Undervoltage Status Signal Object
-
getStickyFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_Undervoltage Status Signal Object
-
getFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_BootDuringEnable Status Signal Object
-
getFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_BootDuringEnable Status Signal Object
-
getStickyFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_BootDuringEnable Status Signal Object
-
getStickyFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_BootDuringEnable Status Signal Object
-
getFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_UnlicensedFeatureInUse Status Signal Object
-
getFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_UnlicensedFeatureInUse Status Signal Object
-
getStickyFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_UnlicensedFeatureInUse Status Signal Object
-
getStickyFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_UnlicensedFeatureInUse Status Signal Object
-
getFault_5V
The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_5V Status Signal Object
-
getFault_5V
The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_5V Status Signal Object
-
getStickyFault_5V
The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_5V Status Signal Object
-
getStickyFault_5V
The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_5V Status Signal Object
-
setControl
Control device with generic control request object.User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode
- Parameters:
request
- Control object to request of the device- Returns:
- Status Code of the request, 0 is OK
-
setQuadraturePosition
Sets the position of the quadrature input.This will wait up to 0.100 seconds (100ms) by default.
- Parameters:
newValue
- Value to set to. Units are in rotations.- Returns:
- StatusCode of the set command
-
setQuadraturePosition
Sets the position of the quadrature input.- Parameters:
newValue
- Value to set to. Units are in rotations.timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
setQuadraturePosition
Sets the position of the quadrature input.This will wait up to 0.100 seconds (100ms) by default.
- Parameters:
newValue
- Value to set to. Units are in rotations.- Returns:
- StatusCode of the set command
-
setQuadraturePosition
Sets the position of the quadrature input.- Parameters:
newValue
- Value to set to. Units are in rotations.timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFaults
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.
This will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFaults
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:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_Hardware
Clear sticky fault: Hardware fault occurredThis will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Hardware
Clear sticky fault: Hardware fault occurred- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_Undervoltage
Clear sticky fault: Device supply voltage dropped to near brownout levelsThis will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Undervoltage
Clear sticky fault: Device supply voltage dropped to near brownout levels- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_BootDuringEnable
Clear sticky fault: Device boot while detecting the enable signalThis will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_BootDuringEnable
Clear sticky fault: Device boot while detecting the enable signal- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_UnlicensedFeatureInUse
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.This will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_UnlicensedFeatureInUse
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_5V
Clear sticky fault: The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.This will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_5V
Clear sticky fault: The CTR Electronics' CANdi™ branded device has detected a 5V fault. This may be due to overcurrent or a short-circuit.- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-