P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1053
Function 7: Update control signals to axes
The purpose of function 7 is to transmit important control signals at high speed in between cyclic data transfers.
The data byte 4 of application interface DB31, ... is transferred to the NC. The transfer is performed for all
activated axes. This enables, for example, the feed stop to be transferred outside the PLC cycle.
The following signals are relevant:
13.13.25 FC 22: TM_DIR Direction selection for tool management
Function
The block TM_DIR provides the shortest path for positioning a magazine or a revolver based on the actual and
setpoint position.
As long as a 1 signal is applied to the Start input, all output parameters are updated cyclically. Changes can be
made to input parameters (e.g. position values) in subsequent PLC cycles.
The output signals are undefined when the start signal is at 0 level.
In the case of direction selection with special positioning input "Offset" > 0, a new setpoint position is calculated
from the setpoint and special positions and the number of magazine locations according to the following formula:
New setpoint position = (setpoint pos. - (special pos. -1)) neg. modulo # locations
The new setpoint position corresponds to the location number at which the magazine must be positioned so that
the setpoint position requested by the user corresponds to the location number of the special position. The
directional optimization is active both with and without special positioning.
The block must be called once with the appropriate parameter settings for each magazine.
Signal
Typ
e
Type
Value range
Comment
Enable
I
BOOL
1= FC 21 active
Funct
I
BYTE
7
7: Control signals to axes
S7Var
I
ANY
S7 data storage area
Not used
IVAR1
I
INT
0
Error
O
BOOL
ErrCode
O
INT
1: "Funct" invalid
WARNING
The block may only be called in conjunction with the tool management.
Note
For further details on tool management (also with regard to PLC) refer to the Description of
Functions Tool Management. Furthermore, PI services are provided for tool management via
the FB 4, FC 7 and FC 8 (see also the corresponding Sections in this documentation).