Table of Contents

Class Diff_PositionVoltage_Velocity

Namespace
CTRE.Phoenix6.Controls.Compound
Assembly
Phoenix6.Hardware.dll

Requires Phoenix Pro and CANivore; Differential control with position average target and velocity difference target using voltage control.

public sealed class Diff_PositionVoltage_Velocity : ControlRequest, ICloneable
Inheritance
Diff_PositionVoltage_Velocity
Implements
Inherited Members

Constructors

Diff_PositionVoltage_Velocity(PositionVoltage, VelocityVoltage)

Requires Phoenix Pro and CANivore; Differential control with position average target and velocity difference target using voltage control.

Average PositionVoltage request of the mechanism. Differential VelocityVoltage request of the mechanism.
public Diff_PositionVoltage_Velocity(PositionVoltage AverageRequest, VelocityVoltage DifferentialRequest)

Parameters

AverageRequest PositionVoltage
DifferentialRequest VelocityVoltage

Fields

AverageRequest

Average PositionVoltage request of the mechanism.

public PositionVoltage AverageRequest

Field Value

PositionVoltage

DifferentialRequest

Differential VelocityVoltage request of the mechanism.

public VelocityVoltage DifferentialRequest

Field Value

VelocityVoltage

UpdateFreqHz

The frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.

If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
public double UpdateFreqHz

Field Value

double

Properties

Name

Name of this control request.

public string Name { get; }

Property Value

string

Methods

Clone()

Creates a copy of this control request.

public Diff_PositionVoltage_Velocity Clone()

Returns

Diff_PositionVoltage_Velocity

GetControlInfo()

Gets information about this control request.

public Dictionary<string, string> GetControlInfo()

Returns

Dictionary<string, string>

Dictionary of control parameter names and corresponding applied values

SendRequest(string, uint)

Sends this request out over CAN bus to the device for the device to apply.

public StatusCode SendRequest(string network, uint deviceHash)

Parameters

network string

Network to send request over

deviceHash uint

Device to send request to

Returns

StatusCode

Status of the send operation

ToString()

Provides the string representation of this object.

public override string ToString()

Returns

string

WithAverageRequest(PositionVoltage)

Modifies this Control Request's AverageRequest parameter and returns itself for method-chaining and easier to use request API.

Average PositionVoltage request of the mechanism.
public Diff_PositionVoltage_Velocity WithAverageRequest(PositionVoltage newAverageRequest)

Parameters

newAverageRequest PositionVoltage

Parameter to modify

Returns

Diff_PositionVoltage_Velocity

Itself

WithDifferentialRequest(VelocityVoltage)

Modifies this Control Request's DifferentialRequest parameter and returns itself for method-chaining and easier to use request API.

Differential VelocityVoltage request of the mechanism.
public Diff_PositionVoltage_Velocity WithDifferentialRequest(VelocityVoltage newDifferentialRequest)

Parameters

newDifferentialRequest VelocityVoltage

Parameter to modify

Returns

Diff_PositionVoltage_Velocity

Itself

WithUpdateFreqHz(double)

Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.

If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
public Diff_PositionVoltage_Velocity WithUpdateFreqHz(double newUpdateFreqHz)

Parameters

newUpdateFreqHz double

Parameter to modify

Returns

Diff_PositionVoltage_Velocity

Itself