2. Read word of position offset 8 without semaphore and store in MW 104:
CALL FC 21 (
Function
5: Update control signals to channel:
The purpose of function 5 is to transmit important control signals at high speed in between
cyclic data transfers. Data bytes 6 and 7 of user interfaces DB21 to DB30 are transferred to
the NC. The channel is specified in parameter "IVAR1". This function can be used, for
example, to transfer a feed stop, read-in disable outside the PLC cycle.
The following signals are relevant:
Signal
Enable
Funct
S7Var
IVAR1
Error
ErrCode
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 to DB61 is transferred to
the NC. The transfer is performed for all activated axes. This allows the servo enable to be
transferred outside the PLC cycle, for example.
The following signals are relevant:
Signal
Enable
Funct
S7Var
IVAR1
Error
ErrCode
Basic logic functions: PLC Basic program powerline (P3 pl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
Enable :=
M 10.0,
Funct :=
B#16#3,
S7Var :=
P#M 104.0 WORD 1,
IVAR1 :=
8,
IVAR2 :=
-1,
Error :=
M 10.1,
ErrCode :=
MW12);
Type Type
I
BOOL
I
BYTE
I
ANY
I
INT
A
BOOL
A
INT
Type Type
I
BOOL
I
BYTE
I
ANY
I
INT
A
BOOL
A
INT
// if TRUE, FC 21 active
//Read data
Value range
Remark
1= FC 21 active
5
5: Control signals to channel
S7 data storage area
Not used
1. Max. channel
Channel number
1: "Funct" invalid
10: Channel no. invalid
Value range
Remark
1= FC 21 active
6
6: Control signals to axes
S7 data storage area
Not used
0
1: "Funct" invalid
Detailed description
2.12 Block descriptions
245