Class DCDrive
Represents a DC drive channel.
public class DCDrive : ChannelLisrtModuleBase, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasDeviceLabel, IHasKey, IPositioningAxis, ISpeedAxis, IHasServiceView
- Inheritance
-
PropertyChangedBaseDCDrive
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Properties
CurrentPosition
Gets the current position in PositionUnit.
public double CurrentPosition { get; }
Property Value
CurrentVelocity
Gets the current velocity in SpeedUnit.
public double CurrentVelocity { get; }
Property Value
DriveHasError
Gets a value indicating whether the drive has an error.
public bool DriveHasError { get; }
Property Value
Remarks
DCM Status Channel x.HasError (Bit 3).
Icon
Gets an icon which is representative for the module.
public override Uri Icon { get; }
Property Value
IsReferenced
Gets a value indicating whether the drive is referenced.
public bool IsReferenced { get; }
Property Value
- See Also
MaximumPosition
Gets or sets the maximum position in PositionUnit.
[Configuration(0, Description = "Maximum position of the axis", Unit = "Position unit")]
public double MaximumPosition { get; set; }
Property Value
MaximumSpeed
Gets or sets the maximum speed in SpeedUnit. Must correspond to the settings from CoE:8020:08.
[Configuration(0, Description = "Maximum speed of the axis must correspond to the settings from CoE:8020:08", Unit = "Position unit per second")]
public double MaximumSpeed { get; set; }
Property Value
Examples
The nominal speed configured in CoE:8020:08 44rpm, the PositionUnit is degree. The MaximumSpeed is 44 1/min / 60 s/min * 360 °/r = 264 °/s.
Exceptions
- ArgumentException
Thrown when set value is not greater than 0 (zero).
MinimumPosition
Gets or sets the minimum position in PositionUnit.
[Configuration(0, Description = "Minimum position of the axis", Unit = "Position unit")]
public double MinimumPosition { get; set; }
Property Value
Mode
Gets the current axis mode. Set with SetMode(AxisMode).
public AxisMode Mode { get; }
Property Value
PositionFactor
Gets or sets the position factor. PositionFactor = increments per unit, for example 1024 = 1024 increments per mm.
[Configuration(1, Description = "PositionFactor = increments per unit")]
public double PositionFactor { get; set; }
Property Value
PositionUnit
Gets or sets the position unit (e.g. mm).
[Configuration("")]
public string PositionUnit { get; set; }
Property Value
PositioningHasError
Gets a value indicating whether the drive has an positioning error.
public bool PositioningHasError { get; }
Property Value
Remarks
POS Status Channel x.HasError (Bit 3).
PositioningTimeoutInMS
Gets or sets the maximum time in ms for positioning. Default is 10000ms.
[Configuration(10000, Unit = "ms", Description = "Maximum time for positioning")]
public int PositioningTimeoutInMS { get; set; }
Property Value
PositioningVelocity
Gets or sets the positioning velocity in PositionUnit per second.
[Configuration(0, Unit = "Position unit per second")]
public double PositioningVelocity { get; set; }
Property Value
ReduceTorque
Gets or sets a value indicating whether the torque of the drive is reduced or should be reduced.
public bool ReduceTorque { get; set; }
Property Value
Remarks
Gets the DCM Status Channel.Status.Torque reduced
bit and sets the DCM Control Channel.Control.Reduce torque
bit.
SpeedUnit
Gets the speed unit as PositionUnits per second.
public string SpeedUnit { get; }
Property Value
Methods
DisableDrive()
Disables the drive.
public void DisableDrive()
EnableDrive()
Enables the drive.
public void EnableDrive()
Exceptions
- InvalidOperationException
Thrown when drive is not ready to enable.
- TimeoutException
Thrown when device is not ready to enable or drive gets not enabled.
GoToPosition(double, int)
Goes to the position
.
public void GoToPosition(double position, int timeout = -1)
Parameters
position
doubleSet point position in PositionUnit.
timeout
intTimeout for reaching position in ms.
Remarks
When timeout
is less than 0, PositioningTimeoutInMS is used.
Exceptions
- ArgumentOutOfRangeException
Thrown when
position
is not between MinimumPosition and MaximumPosition orposition
is less than 0.0.- TimeoutException
Thrown when motion was not completed in the expected time span.
- InvalidOperationException
Thrown when the drive is not referenced, not enabled, an operation is already running, PositionFactor is 0.0 or, Mode is not Positioning.
ResetFault()
Resets the fault state of the device.
public void ResetFault()
SetMode(AxisMode)
Sets the Mode.
public void SetMode(AxisMode mode)
Parameters
mode
AxisModeMode for setting.
Exceptions
- InvalidOperationException
Thrown if the axis is busy.
SetReference()
Sets the reference to the current position.
public void SetReference()
Exceptions
- AggregateException
Thrown if drive is not ready to execute an operation or did not finish.
SetSpeed(double, int)
Sets the speed.
public void SetSpeed(double speed, int timeout = -1)
Parameters
Remarks
When timeout
is less than 0, PositioningTimeoutInMS is used.
Exceptions
- ArgumentOutOfRangeException
Thrown when the absolute value of
speed
is greater than MaximumSpeed.- InvalidOperationException
Thrown when Mode doesn't equal Speed or MaximumSpeed is 0.0.
- InvalidOperationException
Thrown when this drive is not enabled or an operation (GoToPosition(double, int), SetSpeed(double, int), SetReference(), StartPositiveJog(), or StartNegativeJog()) is already running.
- TimeoutException
Thrown when motion was not completed in the expected time span.
ShowServiceView()
Shows the service window.
public void ShowServiceView()
StartNegativeJog()
Starts the jog operation in a negative direction.
public void StartNegativeJog()
Exceptions
- InvalidOperationException
Thrown when Mode is not set to Positioning.
- InvalidOperationException
Thrown when this drive is not enabled or an operation (GoToPosition(double, int), SetSpeed(double, int), SetReference(), StartPositiveJog(), StartNegativeJog()) is already running.
- TimeoutException
Thrown when motion was not completed in the expected time span.
StartPositiveJog()
Starts the jog operation in a positive direction.
public void StartPositiveJog()
Exceptions
- InvalidOperationException
Thrown when Mode is not set to Positioning.
- InvalidOperationException
Thrown when this drive is not enabled or an operation (GoToPosition(double, int), SetSpeed(double, int), SetReference(), StartPositiveJog(), StartNegativeJog()) is already running.
- TimeoutException
Thrown when motion was not completed in the expected time span.
StopJog()
Stops jog.
public void StopJog()