Test example with drive simulation

PLC test environment

Distance control from TwinCAT-CNC Build V2.10.1505.22

Configuration of CAN drive

Configuration of a Z axis according to CANopen DS402 drive with additional distance sensor (0x60E4_01).

Simulation in PLC

Test example with drive simulation 1:
Test example with drive simulation 2:

Simulation of CAN-PDO via PLC inputs/outputs

Test example with drive simulation 3:

In PLC the drive encoder and the distance sensor additionally are charged with a small random noise.

Turning on the drives

After setting of drive permission (drive on, torque, feedhold off) drive can be moved.

Moving on a set position

Test example with drive simulation 4:
Test example with drive simulation 5:

Referencing of
sensor, „ sensor zero “

Entering the set position

Position=400000

Selection of distance control

Transition=1 (ON)

Test example with drive simulation 6:

For the transmitted set position (SET_POS) the distance sensor delivers value = 0.

Changing the surface position „ Surface offset “

The changed surface position results in a changing of the measured distance sensor.

Test example with drive simulation 7:

This causes a re-adjusting of the real axis position until the distance sensor delivers the value = 0 again. In this case the desired distance to surface is reached.

Test example with drive simulation 8:

„ Froozing “ of the current hight

Transition=2 (FREEZE)

If distance control is interrupted (Transition = FREEZE = 2), in this time a changed sensor value (–20000) has no influence on the axis correction.

Test example with drive simulation 9:

After re-activation of distance control the current sensor value is considered again.

Deselection

After deselection of distance control (Transition = OFF = 0) the position offset caused by the distance sensor is cancelled.

Transition=0 (OFF)

Test example with drive simulation 10: