INPUTS
Hardware controls and end sensors enter the PLC
Enable, reset, speed, jog and automatic-cycle inputs are evaluated together with the two physical end-position sensors.
CONTROL
TwinCAT separates manual and automatic control
Structured Text coordinates operator intent, interlocks, reset handling and the explicit automatic sequence before motion is commanded.
MOTION & FIELD
PLCopen commands motion through EtherCAT
PLCopen blocks command the configured NC axis, with EtherCAT carrying motion to the drive and mechanism.
PHYSICAL TEST
Movement was checked on the laboratory axis
Movement and end-position behaviour were tested on the physical setup.
HARDWARE SETUP
Physical test setup

- 01Physical linear axis
- 02BG01 / BG02 end-position sensors
- 03Beckhoff EtherCAT control / I/O hardware
MY CONTRIBUTION
Developing the control sequence and motion interfaces
I developed the Structured Text sequence, configured the motion-block interactions, linked hardware I/O and tested the behaviour on the physical axis. I also created the HMI view used to monitor axis and system states.
ENGINEERING APPROACH
Separating manual control from automatic positioning
The application separates manual jogging from the automatic sequence. Before positioning, it finds both end sensors, stores the measured travel limits and applies a margin before commanding target positions.
STRUCTURED TEXT
Commanding an absolute position through PLCopen Motion
fb_MoveAbs(
Axis := Axis_1,
Execute := bMoveAbsExec AND bAutoActive,
Position := fRandomPos,
Velocity := fVelocityFast
);
...
IF fb_MoveAbs.Error
OR Axis_1.Status.Error
OR bLimitLeftHit
OR bLimitRightHit
OR fb_MoveAbs.Done THENIMPLEMENTATION
Control functions kept explicit and testable
- Manual positive and negative jogging
- Automatic reference search and absolute positioning
MC_Power,MC_Reset,MC_JogandMC_MoveAbsolute- End-position sensing with slow/fast override selection
- Reset, status, axis-error and operator-indicator handling
RESULT
A repeatable physical-axis test workflow
The completed application supports manual jogging, limit discovery and automatic positioning on the laboratory axis.