This library provides a set of classes, interfaces, and types for controlling actuators and end switches in industrial automation systems. It simplifies the implementation of control logic for high-bay warehouse systems or similar applications.
Install with Apax:
If not yet done login to the GitHub registry first. More information you'll find here
apax add @simatic-ax/actuators
Add the namespace in your ST code:
Using Simatic.Ax.Actuator;
Class | Description |
---|---|
Actuator2Way |
Represents a 2-way actuator that can move between two positions: Home and Work. |
Actuator3Way |
Represents a 3-way actuator that can move between three positions: Home, Work1, and Work2. |
Variable | Type | Description |
---|---|---|
I_InHomePosition |
itfEndswitch |
End switch indicating the actuator is in the home position. |
I_InWorkPosition |
itfEndswitch |
End switch indicating the actuator is in the work position. |
Q_ToHomePosition |
itfPosition |
Command to move the actuator to the home position. |
Q_ToWorkPosition |
itfPosition |
Command to move the actuator to the work position. |
TMonToWorkPosition |
LTIME |
Monitoring time for moving to the work position. Default: T#5s . |
TMonToHomePosition |
LTIME |
Monitoring time for moving to the home position. Default: T#5s . |
Method | Parameters | Return Value | Description |
---|---|---|---|
GoToHomePosition |
None | itfCommand |
Command to move the actuator to the home position. |
GoToWorkPosition |
None | itfCommand |
Command to move the actuator to the first work position. |
GetState |
None | ActuatorState |
Retrieves the current state of the actuator. |
Variable | Type | Description |
---|---|---|
I_InHomePosition |
itfEndswitch |
End switch indicating the actuator is in the home position. |
I_InWorkPosition |
itfEndswitch |
End switch indicating the actuator is in the first work position. |
I_InWorkPosition2 |
itfEndswitch |
End switch indicating the actuator is in the second work position. |
Q_ToHomePosition |
itfPosition |
Command to move the actuator to the home position. |
Q_ToWorkPosition |
itfPosition |
Command to move the actuator to the first work position. |
Q_ToWorkPosition2 |
itfPosition |
Command to move the actuator to the second work position. |
TMonToWorkPosition |
LTIME |
Monitoring time for moving to the first work position. Default: T#5s . |
TMonToHomePosition |
LTIME |
Monitoring time for moving to the home position. Default: T#5s . |
Method | Parameters | Return Value | Description |
---|---|---|---|
GoToHomePosition |
None | itfCommand |
Command to move the actuator to the home position. |
GoToWorkPosition |
None | itfCommand |
Command to move the actuator to the first work position. |
GoToWorkPosition2 |
None | itfCommand |
Command to move the actuator to the second work position. |
GetState |
None | ActuatorState |
Retrieves the current state of the actuator. |
Interface | Description |
---|---|
itfActuator |
Defines methods for controlling actuator states and retrieving their current state. |
Method | Parameters | Return Value | Description |
---|---|---|---|
GoToHomePosition |
None | itfCommand |
Command to move the actuator to the home position. |
GoToWorkPosition |
None | itfCommand |
Command to move the actuator to the first work position. |
GoToWorkPosition2 |
None | itfCommand |
Command to move the actuator to the second work position. |
GetState |
None | ActuatorState |
Retrieves the current state of the actuator. |
Type | Description |
---|---|
ActuatorState |
Enumeration representing the possible states of an actuator. |
- InHomePosition : The actuator is in its home or default position. |
|
- MoveToWorkPosition : The actuator is moving to its designated work position. |
|
- MoveToWorkPosition2 : The actuator is moving to its second work position (for 3-way actuators). |
|
- InWorkPosition : The actuator is in its first work position. |
|
- InWorkPosition2 : The actuator is in its second work position (for 3-way actuators). |
|
- MoveToHomePosition : The actuator is moving back to its home position. |
|
- Error : The actuator has encountered an error. |
|
- Undefined : The actuator's state is undefined or indeterminate. |
Class | Description |
---|---|
ActuatorControl |
Provides control logic for actuator positions, including setting, holding, and resetting positions. |
Variable | Type | Description |
---|---|---|
Behavior |
PositionBehavior |
Defines the behavior of the actuator position: ActiveHold or SelfHold . |
Method | Parameters | Return Value | Description |
---|---|---|---|
WriteCyclic |
Q: BOOL (output) |
None | Writes the cyclic output signal. |
Set |
None | BOOL |
Sets the actuator position to active. |
Reset |
None | BOOL |
Resets the actuator position to inactive. |
Hold |
None | BOOL |
Holds the actuator position based on the configured behavior. |
Interface | Description |
---|---|
itfPosition |
Defines methods for setting, holding, and resetting actuator positions. |
Method | Parameters | Return Value | Description |
---|---|---|---|
Set |
None | BOOL |
Sets the actuator position to active. |
Reset |
None | BOOL |
Resets the actuator position to inactive. |
Hold |
None | BOOL |
Holds the actuator position based on the configured behavior. |
Type | Description |
---|---|
PositionBehavior |
Enumeration defining position behavior. |
- ActiveHold : The actuator actively holds its position. |
|
- SelfHold : The actuator maintains its position without active control. |
Class | Description |
---|---|
Endswitch |
Represents an end switch with monitoring capabilities. |
Variable | Type | Description |
---|---|---|
Behavior |
Behavior |
Defines whether the end switch is NormallyOpen or NormallyClosed . |
Method | Parameters | Return Value | Description |
---|---|---|---|
ReadCyclic |
signal: BOOL , valid: BOOL , default: BOOL |
None | Reads the cyclic signal and updates the internal state of the end switch. |
StartMonitoring |
MonitoringTime: LTIME |
None | Starts monitoring the end switch with a specified monitoring time. |
TimeHasElapsed |
None | BOOL |
Checks if the monitoring time has elapsed. |
IsActivated |
None | BOOL |
Checks if the end switch is currently activated. |
HasReached |
None | BOOL |
Checks if the end switch has been reached. |
HasLeft |
None | BOOL |
Checks if the end switch has been left. |
Interface | Description |
---|---|
itfEndswitch |
Defines methods for monitoring and retrieving the state of an end switch. |
Method | Parameters | Return Value | Description |
---|---|---|---|
StartMonitoring |
MonitoringTime: LTIME |
None | Starts monitoring the end switch with a specified monitoring time. |
IsActivated |
None | BOOL |
Checks if the end switch is currently activated. |
HasReached |
None | BOOL |
Checks if the end switch has been reached. |
HasLeft |
None | BOOL |
Checks if the end switch has been left. |
TimeHasElapsed |
None | BOOL |
Checks if the monitoring time has elapsed. |
Type | Description |
---|---|
Behavior |
Enumeration representing the behavior of an end switch. |
- NormallyOpen : The end switch is open by default and closes when activated. |
|
- NormallyClosed : The end switch is closed by default and opens when activated. |
Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.
This workspace will be checked by the markdownlint-cli (there is also documented how to install the tool) tool in the CI workflow automatically. To avoid, that the CI workflow fails because of the markdown linter, you can check all markdown files locally by running the markdownlint with:
markdownlint **/*.md --fix
Please read the Legal information