Examples
The sample programs use the Tc2_MC2 library and run entirely in simulation mode.
Progress can be monitored in TwinCAT Scope View with the configuration provided.
PTP – point to point movement
The sample program manages and moves an axis in PTP mode. The axis is moved with two instances of an MC_MoveAbsolute function block in buffered mode over several intermediate positions and velocity levels.
Download: Sample PTP Move.zip
Master/slave coupling
The sample program couples two axes and moves them together. The slave axis is uncoupled and positioned during the journey.
Download: Sample Master Slave.zip
Dancer control
The sample program shows how the velocity of a slave axis can be controlled according to the position of a dancer.
Download: Sample Dancer Control.zip
Superimposed movement (superposition)
The sample shows the overlay of a movement while an axis is driving.
Download: Sample Superposition.zip
Compensation of the backlash of an axis
The sample program shows how the backlash of an axis can be compensated for.
Download: Sample Backlash Comp.zip
External setpoint generation
The sample shows how an axis can be moved via the external setpoint generator. The movement of the NC axis "Axis" is generated as the sum of the individual movements of the other two Nc axes.
Download: Sample ExtSetPoint.zip
Control loop switching in an AX5000 with two existing encoders
The sample illustrates switching between two axis control loops. Suitable hardware is required for this sample.
Download: Sample Control loop switching.zip
Writing outputs in the IO interface of the encoder or drive of an axis
The example shows how the IO outputs not used by the Nc can be written from the PLC
Download: Sample_WriteNcIoOutput.zip
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86 or x64) | Tc2_MC2 |