Move Axis
TwinCAT NC PTP offers the PLC programmer simple function blocks for the operation of NC axes. This example describes the integration and operation of an axis within the TwinCAT system.
The example program uses simulation axes (axes with simulated encoders), and can thus be run on any Windows NT PC without additional hardware. The file TcNcsample PTPmove.wsm is loaded into the TwinCAT System Manager, and the system is started with these settings.
- Load the WSM file
- Register the setting via the menu Actions - Save To Registry
- Start the TwinCAT system via the gear wheel symbol
TwinCAT Scope is used to be able to examine the result. The supplied setting, TcNcsample PTPmove.scp , allows the axis motion to be recorded.
- Load the SCP file into TwinCAT ScopeView
- Start recording via the menu or via the F5 key. (The Score configuration contains a trigger condition so that, after starting the process with F5, recording will only commence once the axis has started)
Finally, the example program TcNcsample PTPmove.pro is loaded into TwinCAT PLC Control, compiled, and started.
- Load the PRO file
- Compile the PLC project via the menu Project - Rebuild All.
- Load the PLC project via the menu Online - Login into the runtime system
- Start the program via the menu Online - Run
Once the program has started, the axis is moved in simulation mode, and recording commences. The image shows position, velocity, and acceleration of the axis.


