Programming the Distribution Station: Programming, Motion Logic and Suction Transfer Workflow
Programming the Distribution Station: Programming, Motion Logic and Suction Transfer Workflow
The Distribution Station is a vital part of the automated line, responsible for dispensing workpieces and transferring them to the Pick and Place Station. Today’s focus was on finalising the mechanical and logical integration of actuators, sensors, and motion elements using Siemens NX MCD and TIA Portal.
This postexplains how the sequence is programmed and how each component—virtual and logical—was configured to create a realistic, functional digital twin.
Before programming, I first refined the model by:
Defining rigid bodies for all moving components.
Creating sliding, fixed, and hinge joints based on the nature of motion.
Adding collision bodies to the piston, changer arm, and workpiece walls.
Implementing position control for both the piston and the changer (which includes the suction cup).
Sensors and Collision Zones
A sensor was added to the distribution tube to detect when a new workpiece is spawned.
The piston includes sensors to detect its retracted and extended states.
Collision bodies were added at the piston’s tip to push the workpiece to a defined stop.
Additional sensors were placed to detect whether the changer is in the LEFT, or RIGHT position.
Side collision walls were configured to keep the workpiece stable during dispensing.
The sequence was implemented using a step-based state machine in Structured Control Language (SCL).
Here is a breakdown of the logic:
Step 0 – Initialisation
The system resets timers, retracts the piston, and sets the changer and suction head to their MID positions (idle state).
Step 10 – Workpiece Detection
If a workpiece is detected in the tube and the piston is inactive, a timer starts to introduce a short delay.
IF "DISTRIBUTION_SENSOR_Tube" AND "DISTRIBUTION_SENSOR_Piston_Inactive" THEN
#DelayTimer10(IN := TRUE, PT := #Delay10);
#step := 20;
END_IF;
Step 20 – Extend Piston
After the delay, the piston extends to push the workpiece into the correct position.
Step 30 – Retract Piston
Once the workpiece is detected at the stop sensor and the piston is extended, it retracts, and the timer resets.
Step 40 – Move Changer to the left
The changer arm and suction cup move to the left (pickup) position if the piston is inactive and the workpiece is detected.
Step 50 – Engage Suction Cup
If the changer is in position and the workpiece is still present, the suction cup engages. A short delay ensures grip.
Step 60 – Move to the RIGHT (Pick Station)
Once the suction cup grips the part, the changer moves the head to the RIGHT position.
Step 70 – Delay Before Release
Once the RIGHT position is reached, another timer is started before releasing the workpiece.
Step 80 – Release and Reset
The suction cup releases the workpiece into the Pick and Place station. The entire sequence resets.
The distribution station now performs a reliable and complete cycle:
It detects workpiece arrival.
Position it with a piston.
Uses a changer arm with a suction head to transfer it.
With added collision bodies and sensors, the station's physical simulation is accurate and ready to interact with downstream components. The next steps will be refining motion curves, tuning delays, and testing object transfer in a full simulation environment.