Sample Programs

PTP – point to point movement

The example program manages and moves an axis in PTP mode. The axis is moved with two instances of an MC_MoveAbsolute function block in queued mode over several intermediate positions and velocity levels.

The example program requires the TcMC2.lib library and operates fully in simulation mode. Progress can be monitored in TwinCAT Scope View with the configuration provided.

Click here to save the example program:

TwinCAT NC Sample PTP Move.zip

Master-Slave coupling

The example program couples two axes and moves them together. The slave axis is uncoupled and positioned during the journey.

TwinCAT NC Sample Master Slave.zip

Dancer control

The dancer control example program shows how the speed of a slave axis can be controlled using the position of a dancer.

TwinCAT NC Sampel Dancer Control.zip

Superimposed movement (Superposition)

The example shows the overlay of a movement while an axis is driving.

TwinCAT NC Sample Superposition.zip