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.
MY CONTRIBUTION
Coordinating operator inputs, motion commands and axis feedback
I developed the Structured Text sequence that connects hardware inputs and end sensors to PLCopen motion commands. I linked the hardware I/O, tested movement and end-position behaviour on the physical axis, and created the HMI view for axis and system monitoring.
ENGINEERING APPROACH
Finding the travel range before automatic positioning
Manual jogging and automatic operation use separate command paths. The automatic sequence first locates both end sensors and stores their positions. It then generates targets inside that range with a 5 mm margin, monitoring move completion, axis errors and end-position conditions before advancing.
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
From end-sensor search to repeated positioning
On the laboratory axis, the application links travel-limit discovery to repeated absolute-position moves. The HMI displays actual and target positions, detected limits and axis status during the test workflow.
