Class ActuatorModule
Represents a LisRT module for an Festo actuator, with Modbus TCP communication.
Implements
Inherited Members
Namespace: Loehnert.Lisrt.Drive.Festo
Assembly: Loehnert.Lisrt.Drive.Festo.dll
Syntax
public class ActuatorModule : LisrtModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IHasServiceView, IPositioningAxis
Remarks
Configuration
Insert the correct configuration values to the configuration file, which you can find in the Festo Configuration Tool (FCT) on your component under Controller -> Fieldbus -> Factor group tab.
FCT Parameter | Module Configuration |
---|---|
Exponent Position | PositionFactor and PositionUnit |
Exponent Velocity | VelocityFactor and VelocityUnit |
Modbus Timeout
Some controller (e. g. CMMO) have a Modbus communication timeout. Sometimes it's necessary to increase the time or disable the function.
A common IOException for the Modbus communication timeout is:
Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.
Constructors
ActuatorModule(String)
Initializes a new instance of the ActuatorModule class.
Declaration
public ActuatorModule(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Actuator name. |
Properties
ControlMode
Gets or sets the control mode.
Declaration
[Configuration(ControlMode.Positioning)]
public ControlMode ControlMode { get; set; }
Property Value
Type | Description |
---|---|
ControlMode |
DisableHasFaultMessage
Gets or sets a value indicating whether the has fault message will be shown.
Declaration
public bool DisableHasFaultMessage { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
DisableNotReferencedMessage
Gets or sets a value indicating whether the not referenced message will be shown.
Declaration
public bool DisableNotReferencedMessage { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
EnableDisableTimeoutInMS
Gets or sets the timeout for enabling or disabling the drive in ms. Default is 1000ms.
Declaration
public uint EnableDisableTimeoutInMS { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
HomingTimeoutInMS
Gets or sets the maximum time in ms for homing. Default is 30000ms.
Declaration
public uint HomingTimeoutInMS { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Icon
Gets a icon which is representative for the module.
Declaration
public override Uri Icon { get; }
Property Value
Type | Description |
---|---|
Uri |
Overrides
InitializationState
Gets a value indicating whether the object is initialized.
Declaration
public InitializationState InitializationState { get; }
Property Value
Type | Description |
---|---|
InitializationState |
IP
Gets or sets the IP address.
Declaration
[Configuration("")]
public string IP { get; set; }
Property Value
Type | Description |
---|---|
String |
PollingInterval
Gets or sets the interval for polling data. Default is 100ms.
Declaration
public double PollingInterval { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
Polls with ReadAndUpdateState() on Initialized.
Port
Gets or sets the port.
Declaration
[Configuration(0)]
public int Port { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PositionFactor
Gets or sets the factor for position.
Declaration
[Configuration(1)]
public double PositionFactor { get; set; }
Property Value
Type | Description |
---|---|
Double |
PositionUnit
Gets or sets the position unit.
Declaration
[Configuration("")]
public string PositionUnit { get; set; }
Property Value
Type | Description |
---|---|
String |
SetpointMaximum
Gets or sets the set point maximum.
Declaration
[Configuration(0, Description = "Minimum for the setpoint value", Unit = "Depends on the control mode")]
public double SetpointMaximum { get; set; }
Property Value
Type | Description |
---|---|
Double |
SetpointMinimum
Gets or sets the set point minimum.
Declaration
[Configuration(0, Description = "Minimum for the setpoint value", Unit = "Depends on the control mode")]
public double SetpointMinimum { get; set; }
Property Value
Type | Description |
---|---|
Double |
State
Gets the state for the actuator. Polling is active after Initialize() with PollingInterval.
Declaration
public ActuatorState State { get; }
Property Value
Type | Description |
---|---|
ActuatorState |
TreeItem
Gets the view model for the module.
Declaration
public override ITreeItem TreeItem { get; }
Property Value
Type | Description |
---|---|
ITreeItem |
Overrides
VelocityFactor
Gets or sets the factor for velocity.
Declaration
[Configuration(1)]
public double VelocityFactor { get; set; }
Property Value
Type | Description |
---|---|
Double |
VelocityUnit
Gets or sets the velocity unit.
Declaration
[Configuration("")]
public string VelocityUnit { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
DisableDrive()
Disables the drive.
Declaration
public void DisableDrive()
Remarks
Resets DriveIsEnabled.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when InitializationState is not Initialized. |
System.TimeoutException | Thrown when drive and motion is not enabled till EnableDisableTimeoutInMS. |
DoHoming()
Executes homing. In homing, the reference point of the dimensional reference system is determined.
Declaration
public void DoHoming()
Exceptions
Type | Condition |
---|---|
System.TimeoutException | Thrown when drive is not ready for homing, or drive doesn't start homing, or drive doesn't finishes homing (see HomingTimeoutInMS). |
EnableDrive()
Enables the drive.
Declaration
public void EnableDrive()
Remarks
Resets IsStop, Halt and Start. Sets DriveIsEnabled.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when InitializationState is not Initialized. |
System.TimeoutException | Thrown when drive and motion is not enabled till EnableDisableTimeoutInMS. |
Exit()
De initializes the actuator.
Declaration
public void Exit()
GoToPosition(Double, Int32)
Goes to the position
.
Declaration
public void GoToPosition(double position, int timeout = 1000)
Parameters
Type | Name | Description |
---|---|---|
Double | position | Set point position. |
System.Int32 | timeout | Timeout for MotionIsComplete in MS. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when PositionFactor is 0 (zero). |
ArgumentOutOfRangeException | Thrown when |
System.InvalidOperationException | Thrown when InitializationState is not Initialized or drive is not enabled or operation is not enabled or ControlMode is not Positioning. |
System.TimeoutException | Thrown when MotionIsComplete is false or AxisIsMoving is true till |
Initialize()
Initializes the actuator.
Declaration
public void Initialize()
ReadAndUpdateState()
Reads the ActuatorState and updates the State.
Declaration
protected void ReadAndUpdateState()
Remarks
ReadAndUpdateState() is automatically called while Initialized, depending on PollingInterval.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when InitializationState is not Initialized. |
ResetFault()
Acknowledges a fault.
Declaration
public void ResetFault()
SetSetpoint(Int32, Int32)
Sets and applies a raw set point value.
Declaration
public void SetSetpoint(int rawValue, int timeout = 1000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rawValue | Raw set point value. |
System.Int32 | timeout | Timeout for reaching the position in MS. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when InitializationState is not Initialized. |
System.TimeoutException | Thrown when start is not acknowledged till |
ShowServiceView()
Shows the service window.
Declaration
public void ShowServiceView()
StartNegativeJog()
Starts negative jog.
Declaration
public void StartNegativeJog()
StartPositiveJog()
Starts positive jog.
Declaration
public void StartPositiveJog()
StopNegativeJog()
Stops negative jog.
Declaration
public void StopNegativeJog()
StopPositiveJog()
Stops positive jog.
Declaration
public void StopPositiveJog()
WriteControlData()
Writes the control data to the actuator.
Declaration
protected void WriteControlData()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when InitializationState is not Initialized. |