Class SoftwareLimitSwitchConfigs
Configs that affect how software-limit switches behave.
Includes enabling software-limit switches and the threshold at which they are tripped.public class SoftwareLimitSwitchConfigs : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
SoftwareLimitSwitchConfigs
- Implements
- Inherited Members
Fields
ForwardSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.
- Default ValueFalse
public bool ForwardSoftLimitEnable
Field Value
ForwardSoftLimitThreshold
Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.
- Minimum Value-3.4e+38
- Maximum Value3.4e+38
- Default Value0
- Unitsrotations
public double ForwardSoftLimitThreshold
Field Value
ReverseSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.
- Default ValueFalse
public bool ReverseSoftLimitEnable
Field Value
ReverseSoftLimitThreshold
Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.
- Minimum Value-3.4e+38
- Maximum Value3.4e+38
- Default Value0
- Unitsrotations
public double ReverseSoftLimitThreshold
Field Value
Methods
Clone()
Creates a copy of this config group.
public SoftwareLimitSwitchConfigs Clone()
Returns
Deserialize(string)
Deserialize string and put values into this object
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestringString to deserialize
Returns
- StatusCode
OK if deserialization is OK
Serialize()
Serialize this object into a string
public string Serialize()
Returns
- string
This object's data serialized into a string
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithForwardSoftLimitEnable(bool)
Modifies this configuration's ForwardSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.- Default ValueFalse
public SoftwareLimitSwitchConfigs WithForwardSoftLimitEnable(bool newForwardSoftLimitEnable)
Parameters
newForwardSoftLimitEnableboolParameter to modify
Returns
- SoftwareLimitSwitchConfigs
Itself
WithForwardSoftLimitThreshold(double)
Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.
Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.- Minimum Value-3.4e+38
- Maximum Value3.4e+38
- Default Value0
- Unitsrotations
public SoftwareLimitSwitchConfigs WithForwardSoftLimitThreshold(double newForwardSoftLimitThreshold)
Parameters
newForwardSoftLimitThresholddoubleParameter to modify
Returns
- SoftwareLimitSwitchConfigs
Itself
WithReverseSoftLimitEnable(bool)
Modifies this configuration's ReverseSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.
If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.- Default ValueFalse
public SoftwareLimitSwitchConfigs WithReverseSoftLimitEnable(bool newReverseSoftLimitEnable)
Parameters
newReverseSoftLimitEnableboolParameter to modify
Returns
- SoftwareLimitSwitchConfigs
Itself
WithReverseSoftLimitThreshold(double)
Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.
Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.- Minimum Value-3.4e+38
- Maximum Value3.4e+38
- Default Value0
- Unitsrotations
public SoftwareLimitSwitchConfigs WithReverseSoftLimitThreshold(double newReverseSoftLimitThreshold)
Parameters
newReverseSoftLimitThresholddoubleParameter to modify
Returns
- SoftwareLimitSwitchConfigs
Itself