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

DMS 5.2 EN 03/2011 TD17
L
165
L-force | PLC Designer - SoftMotion
The SM_PLCopen.lib library
Additional program organisation units
Example:
In positive direction output 1 is switched on between positions 0 and 100, and in
negative direction between positions 200 and 300.
Output 2 is switched on between 100 and 300 in all directions.
Output 3 is switched on for 2 seconds in all directions at position 10.
Outputs: MC_OUTPUT_REF
Here the 32 tappet outputs can be determined.
TrackOptions: MC_TRACK_REF
Via the TrackOptions further settings can be carried out for each tappet output.
Each element within the array is used for the corresponding output.
OnCompenation: A delay (positive value) or an early switch-on process (negative value)
can be set. The time is specified in seconds.
OffCompenation: A delay (positive value) or an early switch-off process (negative
value) can be set. The time is specified in seconds.
Hysteresis: Additionally a hysteresis can be set. It avoids a permanent switching of the
output, e. g. if a servo controller is placed exactly on the switching position and moves
around the position a bit because of the position control.
Positions:
ARRAY [1...4] OF MC_CAMSWITCH_TR:=TrackNumber:=1, FirstOnPosition:=200,
LastOnPosition:=300, AxisDirection:=2, CamSwitchMode:=0),
(TrackNumber:=2, FirstOnPosition:=100, LastOnPosition:=300, CamSwitchMode:=0),
(TrackNumber:=3, FirstOnPosition:=10, CamSwitchMode:=1, Duration:=T#2000ms),
(TrackNumber:=1, FirstOnPosition:=0, LastOnPosition:=100, AxisDirection:=1);
TYPE MC_OUTPUT_REF :
ARRAY [0...31] OF BOOL;
END_TYPE
TYPE MC_TRACK_REF :
ARRAY [0...31] OF MC_TRACK_TR;
END_TYPE
TYPE MC_TRACK_TR :
STRUCT
OnCompensation: LREAL;
OffCompensation: LREAL;
Hysteresis: LREAL;
END_STRUCT
END_TYPE