CODESYS Platform · 03
SoftMotion, CNC and robotics: motion in the same cycle as the logic
Running logic control and motion control on two separate systems means shuttling data between them and forever compensating for the timing gap. When they live in one project, that intermediate layer disappears.
Four families of application
All of the following can be built on a single controller with no additional motion hardware.
- Synchronised cutting — rotary and flying shear Cutting continuously moving material without stopping it. The short window in which the cutter locks to material speed is defined by a cam table; change the cut length and the profile is recalculated, with no mechanical adjustment.
- Electronic cam Instead of a mechanical camshaft, the relationship between master and follower position is defined as a table. A product change loads a new profile — no tooling comes off, no gear is swapped.
- CNC and path control CAM output interpreted directly on the controller. Linear and circular interpolation, corner smoothing and look-ahead all run inside the same project.
- Robot kinematics Converting a Cartesian target into joint angles. Delta, SCARA, gantry and palletising kinematics come as ready-made transformations, and because the robot shares a controller with the rest of the line, conveyor tracking needs no separate communication layer.
The details that decide the outcome in the field
The standard motion blocks are enough to lock one axis to another. The real problems are not in the lock itself but in the region outside it.
- Torque feed-forward Telling the drive about an expected load increase in advance lets the position controller prevent the error rather than correct it afterwards.
- Acceleration continuity Writing the phase transitions into a single cam table reduces torque steps at the handover and the mechanical fatigue that follows.
- Sensor correction Applying a measured deviation over several cycles rather than all at once, so accumulated drift is removed without a jump.
- Capture input Reading the sensor signal through a hardware capture channel instead of a software scan, so measurement resolution no longer depends on cycle time.
No tuning without measurement
You cannot diagnose a motion problem by ear or by eye. During commissioning we overlay the traces of the master and following axes and judge the deviation inside the cutting window separately from the profile outside it. An intervention made without that distinction usually breaks the part that was working.
For the timing foundations, see Control Runtime and Fieldbus pages.
Frequently asked questions about motion control
Do I need a separate motion control card?
No. The motion calculation runs on the controller’s own processor, in the same cycle as the logic task; only the computed position or velocity reference goes to the drives. That removes a separate motion card from the cabinet, along with its power supply and its own configuration software.
How many axes can be synchronised?
The limit comes from your chosen cycle time and processor capacity, not from the licence. In practice a single real-time controller can manage more than sixty axes at a 1 ms cycle; at 250 µs the number narrows according to processor class.
Does CNC need a separate control unit?
It does not. The G-code interpreter, path planner and interpolation all run inside the same project. CNC motion and the rest of the machine logic — feeding, safety, recipes — are managed from one place, with no data-exchange layer between two systems.
Can I mix drive brands on the same line?
Yes, provided the drives support the standard motion profiles. What matters is that they are all configured in the same synchronisation mode and bound to the same clock source — that is where most trouble on mixed networks comes from.
What is the difference between an electronic and a mechanical cam?
On a mechanical cam the relationship is cut into metal, and changing it means dismantling the part. An electronic cam defines the same relationship as a table, and a product change simply loads a new one. The gain is not only speed: the profile becomes measurable, recordable and versionable.
What is the most common mistake in a flying-shear application?
Focusing only on the cutting window. Synchronisation during the cut is usually set up correctly; what breaks down is the return profile outside the window. Without acceleration continuity you get a torque step at the transition, and that shows up both in cut length and in mechanical life.
Do I need a robot controller for kinematics?
Delta, SCARA, gantry and palletising kinematics are defined with ready-made transformations, so no separate controller is needed. Because the robot and the rest of the line share a controller, conveyor tracking needs no extra communication layer either — the target position is computed in the same cycle.
What is following error and how much is acceptable?
Following error is the instantaneous difference between commanded and measured position. What counts as acceptable depends on the machine, and the product tolerance decides. A constant error can be reduced by tuning; an error that swings with load usually points to a mechanical or drive-sizing problem instead.
Can I change the motion profile during production?
Yes. Cam tables can be swapped while running; what needs care is where the switch happens. Tying the change to a point where the axis is stationary or acceleration is zero prevents a jolt in the mechanics.
Which measurements do you take during commissioning?
We overlay the position traces of the master and the following axis, and record following error, torque current and command value on one time axis. The cutting window and the region outside it are judged separately — an intervention made without that distinction usually breaks the part that was working.