beautypg.com

L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 940

background image

L-force | PLC Designer

Device Editors

938

DMS 4.1 EN 03/2011 TD29

Switching between Controller modes
The function block SMC_SetControllerMode enables the user to switch between
different controller modes. The variables byControllerMode resp.
byRealControllerMode of AXIS_REF represent the desired resp. the actual state of the
controller. Possible values are:

1

Torque/power control

2

Velocity control

3,0 Position control

4

Current control

After writing the variable byControllerMode the actual state will be checked as long as
it equals the desired control mode.

Homing (drive controlled)
SoftMotion offers two possibilities to home a drive: one is controlled by the drive, the
other by the controller.
The latter one is executed by calling the function block SMC_Homing. Thereby, the
reference signal has to be part of the IO image of the controller. During the homing
operation the drive remains in a position control mode.
In general, this method is not as precise as the drive controlled homing, as the position
latch (when touching the reference switch) is based on the actual positions received
from the drive; hence its accuracy is limited by the communication cycle.
By contrast at a drive controlled homing the reference switch is wired to the drive
itself, which is able to evaluate the position more quickly and therefore with a higher
precision. During the drive controlled homing process, the drive is set to a different
control mode, where it doesn’t follow the controllers set values, but is controlled by
internal procedures. As soon as the homing method is finished, the drive will be reset
to its original control mode.
The function block MC_Home starts the drive controlled homing procedure by setting
fReference and bStartReference. Additionally the state of the AXIS_REF (wState) is set
to “homing”. As soon as the drive passes in the homing procedure (what means that it
does no longer obey the set values of the controller), its driver will set the parameter
bStartReferenceRealState to TRUE. To indicate the finishing of the homing procedure
the driver will reset the values of bStartReference and bStartReferenceRealState to
FALSE .