Class DryveD1Module
Represents a LisRT module for an Igus Dryve D1, with Modbus TCP communication.
Inheritance
Implements
Inherited Members
Namespace: Loehnert.Lisrt.Drive.Igus
Assembly: Loehnert.Lisrt.Drive.Igus.dll
Syntax
public class DryveD1Module : InitializableCompositeModule, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IPositioningAxis, IHasServiceView, IPolling
Constructors
DryveD1Module(String, IModbusMaster)
Initializes a new instance of the DryveD1Module class.
Declaration
public DryveD1Module(string name, IModbusMaster modbusModule)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the instance. |
IModbusMaster | modbusModule | The Modbus module for communication. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
Properties
Acceleration
Gets or sets the acceleration in PositionUnit per second squared.
Declaration
[Configuration(0, Unit = "Position unit per second squared")]
public double Acceleration { get; set; }
Property Value
Type | Description |
---|---|
Double |
ActualPosition
Gets the actual position in PositionUnit.
Declaration
public double ActualPosition { get; }
Property Value
Type | Description |
---|---|
Double |
DigitalInputs
Gets the digital inputs.
Declaration
public IReadOnlyDictionary<DryveD1DigitalInput, DryveD1DigitalInputModule> DigitalInputs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<DryveD1DigitalInput, DryveD1DigitalInputModule> |
DigitalOutputs
Gets the digital outputs.
Declaration
public IReadOnlyDictionary<DryveD1DigitalOutput, DryveD1DigitalOutputModule> DigitalOutputs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<DryveD1DigitalOutput, DryveD1DigitalOutputModule> |
Enabled
Gets or sets a value indicating whether the module is enabled.
Declaration
public override bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
HomingAcceleration
Gets or sets the homing acceleration in PositionUnit per second squared.
Declaration
[Configuration(0, Unit = "Position unit per square second", Description = "Should be 5 to 10 times greater than HomingVelocity")]
public double HomingAcceleration { get; set; }
Property Value
Type | Description |
---|---|
Double |
HomingTimeoutInMS
Gets or sets the maximum time in ms for homing. Default is 10000ms.
Declaration
[Configuration(10000, Unit = "ms", Description = "Maximum time for homing")]
public int HomingTimeoutInMS { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
HomingVelocity
Gets or sets the homing velocity in PositionUnit per second.
Declaration
[Configuration(0, Unit = "Position unit per second")]
public double HomingVelocity { get; set; }
Property Value
Type | Description |
---|---|
Double |
Icon
Gets an icon which is representative for the module.
Declaration
public override Uri Icon { get; }
Property Value
Type | Description |
---|---|
Uri |
Overrides
IsPolling
Gets a value indicating whether the polling is enabled.
Declaration
public bool IsPolling { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsReferenced
Gets a value indicating whether the drive is referenced.
Declaration
public bool IsReferenced { get; }
Property Value
Type | Description |
---|---|
Boolean |
MaximumPosition
Gets or sets the maximum position in PositionUnit.
Declaration
[Configuration(0, Description = "Maximum position of the axis (must be positive)", Unit = "position unit")]
public double MaximumPosition { get; set; }
Property Value
Type | Description |
---|---|
Double |
MinimumPosition
Gets or sets the minimum position in PositionUnit.
Declaration
[Configuration(0, Description = "Minimum position of the axis (must be positive)", Unit = "Position unit")]
public double MinimumPosition { get; set; }
Property Value
Type | Description |
---|---|
Double |
PollingInterval
Gets or sets the interval in ms for polling data. Default is 100ms.
Declaration
public double PollingInterval { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
Starts polling with Update() after Initialized.
PositionFactor
Gets or sets the position factor PositionFactor = units per shaft turn, e. g. 4 = 4mm per shaft turn.
Declaration
[Configuration(1, Description = "PositionFactor = units per shaft turn")]
public double PositionFactor { get; set; }
Property Value
Type | Description |
---|---|
Double |
PositioningTimeoutInMS
Gets or sets the maximum time in ms for positioning. Default is 10000ms.
Declaration
[Configuration(10000, Unit = "ms", Description = "Maximum time for positioning")]
public int PositioningTimeoutInMS { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PositionUnit
Gets or sets the position unit (e.g. mm).
Declaration
[Configuration("")]
public string PositionUnit { get; set; }
Property Value
Type | Description |
---|---|
String |
StatusWord
Gets the current status word.
Declaration
public StatusWord StatusWord { get; }
Property Value
Type | Description |
---|---|
StatusWord |
TreeItem
Gets the module tree item view model.
Declaration
public override ITreeItem TreeItem { get; }
Property Value
Type | Description |
---|---|
ITreeItem |
Overrides
Velocity
Gets or sets the velocity in PositionUnit per second.
Declaration
[Configuration(0, Unit = "Position unit per second")]
public double Velocity { get; set; }
Property Value
Type | Description |
---|---|
Double |
Methods
DisableDrive()
Disables the drive.
Declaration
public void DisableDrive()
DoHoming()
Does the homing.
Declaration
public void DoHoming()
Exceptions
Type | Condition |
---|---|
System.TimeoutException | Thrown when homing was not completed in the expected time span, HomingTimeoutInMS. |
System.InvalidOperationException | Thrown when this drive is not initialized, not enabled, or an other operation(GoToPosition(Double, Int32), DoHoming()) is already running.. |
EnableDrive()
Enables the drive.
Declaration
public void EnableDrive()
Exceptions
Type | Condition |
---|---|
System.TimeoutException | Thrown when device gets not ready to enable, drive gets not enabled or operation gets not enabled. |
Exit()
De initializes the object.
Declaration
public override void Exit()
Overrides
GoToPosition(Double, Int32)
Goes to the position
.
Declaration
public void GoToPosition(double position, int timeout = -1)
Parameters
Type | Name | Description |
---|---|---|
Double | position | Set point position in PositionUnit. |
System.Int32 | timeout | Timeout for reaching position in ms. |
Remarks
When timeout
is less than 0, timeout is PositioningTimeoutInMS.
Only positive target positions are supported in absolute positioning mode. If the reference point is to be
set at the positive end point of an axis and positioned absolutely, a positive Offset must be entered over the entire
axis length.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when |
System.TimeoutException | Thrown when motion was not completed in the expected time span. |
System.InvalidOperationException | Thrown when this drive is not initialized, not referenced, not enabled or an operation (GoToPosition(Double, Int32), DoHoming()) is already running. |
Initialize()
Initializes the module.
Declaration
public override void Initialize()
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when hardware is not enabled. |
ResetFault()
Resets the fault state of the device.
Declaration
public void ResetFault()
SetPositioningAcceleration(Double)
Sets the positioning acceleration in PositionUnit per second squared.
Declaration
public void SetPositioningAcceleration(double acceleration)
Parameters
Type | Name | Description |
---|---|---|
Double | acceleration | Acceleration to set. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when this drive is not initialized. |
SetPositioningVelocity(Double)
Sets the positioning velocity in PositionUnit per second.
Declaration
public void SetPositioningVelocity(double velocity)
Parameters
Type | Name | Description |
---|---|---|
Double | velocity | Velocity to set. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when this drive is not initialized. |
ShowServiceView()
Shows the service window.
Declaration
public void ShowServiceView()
StartNegativeJog()
Starts negative jog.
Declaration
public void StartNegativeJog()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when jog is already started. |
StartPolling()
Starts polling. Polling means the cyclical call of the Update() method.
Declaration
public void StartPolling()
StartPositiveJog()
Starts positive jog.
Declaration
public void StartPositiveJog()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when jog is already started, or an other operation(GoToPosition(Double, Int32), DoHoming()) is already running. |
StopNegativeJog()
Starts negative jog.
Declaration
public void StopNegativeJog()
StopPolling()
Stops polling.
Declaration
public void StopPolling()
StopPositiveJog()
Stops positive jog.
Declaration
public void StopPositiveJog()
Update()
Updates the StatusWord and ActualPosition.
Declaration
public void Update()