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

Page 948

Advertising
background image

L-force | PLC Designer

Device Editors

946

DMS 4.1 EN 03/2011 TD29

2. In the device tree define two modular drives with names "Drive" (period 360) and
"Virtual“ (period 10):

Abb. 524 Device Tree with two modular drives


3. Create program MOTION_PRG in FBD, containing the calls of the following modules:

PROGRAM MOTION_PRG
VAR
power1, power2: MC_Power;
TableSelect: MC_CamTableSelect;
CamIn: MC_CamIn;
Tappet: SMC_GetTappetValue;
MoveVirtual: MC_MoveVelocity;
END_VAR

After the Power modules (power1, power2) for the slave axes first the MoveVelocity
module will be called, moving the virtual master. TableSelect will select the desired
CAM, and CamIn will realize it. The Tappet module checks the position of the tappet.
Due to the fact that the tappet is configured 'inverted', it will switch every 10 seconds.
Now you can compile the program and start it on the controller.
In order to control the target resp. current position, create a visualization, which will
help to check the particular modules and the position of the axes.
Regard, that the master of the CAM not only can be a virtual time axis, but of course
any desired AXIS_REF data structure. For drives which the control is currently
activated, the target values will be regarded, for drives which currently are not
controlled, the current values.

Advertising