Class ActuatorModule
Represents a LisRT module for an Festo actuator, with Modbus TCP communication.
public class ActuatorModule : LisrtModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IHasServiceView, IPositioningAxis
- Inheritance
-
PropertyChangedBaseActuatorModule
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
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.
public ActuatorModule(string name)
Parameters
name
stringActuator name.
Properties
ControlMode
Gets or sets the control mode.
[Configuration(ControlMode.Positioning)]
public ControlMode ControlMode { get; set; }
Property Value
DisableHasFaultMessage
Gets or sets a value indicating whether the has fault message will be shown.
public bool DisableHasFaultMessage { get; set; }
Property Value
DisableNotReferencedMessage
Gets or sets a value indicating whether the not referenced message will be shown.
public bool DisableNotReferencedMessage { get; set; }
Property Value
EnableDisableTimeoutInMS
Gets or sets the timeout for enabling or disabling the drive in ms. Default is 1000ms.
public uint EnableDisableTimeoutInMS { get; set; }
Property Value
HomingTimeoutInMS
Gets or sets the maximum time in ms for homing. Default is 30000ms.
public uint HomingTimeoutInMS { get; set; }
Property Value
IP
Gets or sets the IP address.
[Configuration("")]
public string IP { get; set; }
Property Value
Icon
Gets a icon which is representative for the module.
public override Uri Icon { get; }
Property Value
InitializationState
Gets a value indicating whether the object is initialized.
public InitializationState InitializationState { get; }
Property Value
PollingInterval
Gets or sets the interval for polling data. Default is 100ms.
public double PollingInterval { get; set; }
Property Value
Remarks
Polls with ReadAndUpdateState() on Initialized.
Port
Gets or sets the port.
[Configuration(0)]
public int Port { get; set; }
Property Value
PositionFactor
Gets or sets the factor for position.
[Configuration(1)]
public double PositionFactor { get; set; }
Property Value
PositionUnit
Gets or sets the position unit.
[Configuration("")]
public string PositionUnit { get; set; }
Property Value
SetpointMaximum
Gets or sets the set point maximum.
[Configuration(0, Description = "Minimum for the setpoint value", Unit = "Depends on the control mode")]
public double SetpointMaximum { get; set; }
Property Value
SetpointMinimum
Gets or sets the set point minimum.
[Configuration(0, Description = "Minimum for the setpoint value", Unit = "Depends on the control mode")]
public double SetpointMinimum { get; set; }
Property Value
State
Gets the state for the actuator. Polling is active after Initialize() with PollingInterval.
public ActuatorState State { get; }
Property Value
TreeItem
Gets the view model for the module.
public override ITreeItem TreeItem { get; }
Property Value
VelocityFactor
Gets or sets the factor for velocity.
[Configuration(1)]
public double VelocityFactor { get; set; }
Property Value
VelocityUnit
Gets or sets the velocity unit.
[Configuration("")]
public string VelocityUnit { get; set; }
Property Value
Methods
DisableDrive()
Disables the drive.
public void DisableDrive()
Remarks
Resets DriveIsEnabled.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized.
- 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.
public void DoHoming()
Exceptions
- 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.
public void EnableDrive()
Remarks
Resets IsStop, Halt and Start. Sets DriveIsEnabled.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized.
- TimeoutException
Thrown when drive and motion is not enabled till EnableDisableTimeoutInMS.
Exit()
De initializes the actuator.
public void Exit()
GoToPosition(double, int)
Goes to the position
.
public void GoToPosition(double position, int timeout = 1000)
Parameters
position
doubleSet point position.
timeout
intTimeout for MotionIsComplete in MS.
Exceptions
- InvalidOperationException
Thrown when PositionFactor is 0 (zero).
- ArgumentOutOfRangeException
Thrown when
position
is not between SetpointMinimum and SetpointMaximum.- InvalidOperationException
Thrown when InitializationState is not Initialized or drive is not enabled or operation is not enabled or ControlMode is not Positioning.
- TimeoutException
Thrown when MotionIsComplete is false or AxisIsMoving is true till
timeout
.
Initialize()
Initializes the actuator.
public void Initialize()
ReadAndUpdateState()
Reads the ActuatorState and updates the State.
protected void ReadAndUpdateState()
Remarks
ReadAndUpdateState() is automatically called while Initialized, depending on PollingInterval.
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized.
ResetFault()
Acknowledges a fault.
public void ResetFault()
SetSetpoint(int, int)
Sets and applies a raw set point value.
public void SetSetpoint(int rawValue, int timeout = 1000)
Parameters
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized.
- TimeoutException
Thrown when start is not acknowledged till
timeout
.
ShowServiceView()
Shows the service window.
public void ShowServiceView()
StartNegativeJog()
Starts negative jog.
public void StartNegativeJog()
StartPositiveJog()
Starts positive jog.
public void StartPositiveJog()
StopNegativeJog()
Stops negative jog.
public void StopNegativeJog()
StopPositiveJog()
Stops positive jog.
public void StopPositiveJog()
WriteControlData()
Writes the control data to the actuator.
protected void WriteControlData()
Exceptions
- InvalidOperationException
Thrown when InitializationState is not Initialized.