L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual

Page 284

Advertising
background image

L-force | PLC Designer - SoftMotion

SoftMotion programming examples

Dynamic SoftMotion programming

284

L

DMS 5.2 EN 03/2011 TD17

 Set parameters corresponding to the motion type. If you use a circular arc (e.g. CCWL),

observe that the following positions have to be set (see SMC_GEOINFO structure:

 If required, set a start or end bit in InternMark for the path preprocessing (see

SMC_GEOINFO structure).

 Calculate end position:

 Calculate length of the object (or have it calculated):

 Save object in OUTQUEUE:

 If the path has been created completely, the OUTQUEUE list has to be closed:

Please note that if OUTQUEUE is full, i.e. if QUEUE.bFULL = TRUE, the program will not try

to add further objects. The creation of the path then has to be interrupted until the first

OUTQUEUE object has been processed. Then a further object can be added. If you want to

avoid this, the selected size for the OUTQUEUE has to be so great that all GEOINFO objects

of the desired path can be stored there.
The Queue object list first is transmitted to the CheckVelocities block and then to the

interpolator which processes it further.
Furthermore this example shows how a kinematic transformation that is not contained in

the SM_Trafo.lib library provided can be individually programmed. The blocks SMC_TRAFO

and SMC_TRAFOF which are included in this project show this by taking a Cartesian X/Y

system as an example.

GEO.dP1 := 200;
GEO.dP2 := 100;
GEO.dP3 := 50;
GEO.dT1 := 0;
GEO.dT2 := 90;

SMC_CalcEndPnt(ADR(GEO));

SMC_CalcLengthGeo(ADR(GEO));

SMC_AppendObj(POQ:=ADR(QUEUE), PGI:=ADR(GEO));

QUEUE.bEndOfList := TRUE;

Advertising