P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
1052
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
2. Read word of position offset 8 without semaphore and store in MW 104:
Function 5: Update control signals to channel
The purpose of this function is to transmit important control signals at high speed in between cyclic data
transfers. Data bytes 6 and 7 of user interfaces DB21, ... are transferred to the NC. The channel is specified in
parameter "IVAR1". This enable, for example, the feed disable, read-in disable to be transferred outside of the
PLC cycle.
The following signals are relevant:
Function 6: Update control signals to axes
The purpose of function 6 is to transmit important control signals at high speed in between cyclic data transfers.
The data byte 2 of application interface DB31, ... is transferred to the NC. The transfer is performed for all
activated axes. This allows the controller enable to be transferred outside the PLC cycle, for example.
The following signals are relevant:
CALL FC
21
(
Enable
:=M 10.0,
//if TRUE, FC 21 active
Funct :=B#16#3,
//Read
data
S7Var
:=P#M 104.0 WORD 1,
IVAR1 :=8,
IVAR2 :=-1,
Error :=M
10.1,
ErrCode :=MW12);
Signal
Typ
e
Type
Value range
Comment
Enable
I
BOOL
1= FC 21 active
Funct
I
BYTE
5
5: Control signals to channel
S7Var
I
ANY
S7 data storage area
Not used
IVAR1
I
INT
1. Max. channel
Channel number
Error
O
BOOL
ErrCode
O
INT
1:
"Funct" invalid
10: Channel no. invalid
Signal
Typ
e
Type
Value range
Comment
Enable
I
BOOL
1= FC 21 active
Funct
I
BYTE
6
6: 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