6 dynamic softmotion programming, 1 preliminary steps, 2 dynamic path-programming – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 283: Dynamic softmotion programming, Preliminary steps, Dynamic path-programming, L-force | plc designer - softmotion
![background image](/manuals/566299/283/background.png)
DMS 5.2 EN 03/2011 TD17
L
283
L-force | PLC Designer - SoftMotion
SoftMotion programming examples
Dynamic SoftMotion programming
13.6
Dynamic SoftMotion programming
Tip!
See also the example project CNCDynamicPath.pro provided with SoftMotion.
It is one of the advantages of SoftMotion that the programmer and user do not only have
an impact on the processing of a path, but that they can also generate or alter the
processing during the program is running. In order to achieve this, the programmer just has
to replace the decoder block by an individual path generator, and he can nevertheless
operate the path preprocessing, and in particular the interpolator as usual.
To replace the decoder block an OUTQUEUE structure object has to be created in another
way. It has to be filled with GEOINFO objects representing the desired path and
transmitted to the corresponding subsequent block (e.g. interpolator).
13.6.1
Preliminary steps
In the declaration part an OUTQUEUE and a GEOINFO structure object, and a buffer of
a desired size have to be defined:
In an Init-step in the program body the OUTQUEUE structure has to be initialised:
13.6.2
Dynamic Path-Programming
In the program body the following steps have to be carried out for each GEOINFO object in
the position where the path is to be created:
Set start position (first object)
... or copy from the previous object.
Define motion type, e.g.:
or
QUEUE: SMC_OUTQUEUE;
BUF: ARRAY[0..49] OF SMC_GEOINFO;
GEO: SMC_GEOINFO:=(dT1:=0, dT2:=1, dToolRadius:=0, dVel:=100, dVel_End:=100,
dAccel:=200, dDecel:=500, iObj_Nr:=0);
QUEUE.nSize := SIZEOF(BUF);
QUEUE.pbyBuffer := ADR(BUF[0]);
GEO.piStartPos.dX := 0;
GEO.piStartPos := GEO.piDestPos;
GEO.iMoveType := CCWL;
GEO.iMoveType := LIN;