P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
1054 Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Declaration of the function
STL representation
Description of formal parameters
The table below shows all formal parameters of the "TM_DIR" function.
FUNCTION FC 22 : VOID
// NAME: TM_DIR
VAR_INPUT
MagNo: INT ;
ReqPos: INT;
ActPos: INT;
Offset: BYTE ;
Start: BOOL ;
END_VAR
VAR_OUTPUT
Cw: BOOL ;
Ccw: BOOL ;
InPos: BOOL ;
Diff: INT;
Error : BOOL ;
END_VAR
BEGIN
END_FUNCTION
Signal
Typ
e
Type Range of values Remark
MagNo I INT 1 ... Magazine number
ReqPos I INT 1 ... Setpoint location
ActPos I INT 1 ... Actual location
Offset I BYTE 0 ... Offset for special positioning
Start I BOOL Start of calculation
Cw A BOOL 1 = Move magazine clockwise
Ccw A BOOL 1 = Move magazine
counterclockwise
InPos A BOOL 1 = In position
Diff A INT 0 ... Differential path (shortest path)
Error A BOOL 1 = error