P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1047
Call example:
Function 3, 4: Rapid data exchange PLC-NCK
FUNCTION FC 100 : VOID
VAR_TEMP
myAny: ANY ;
END_VAR
BEGIN
NETWORK
//Deactivate synchronized actions with ID3, ID10 and ID31 in NC channel 1 :
SYAK:
OPEN DB21;
SET;
S DBX
300.2;
//ID3
S DBX
301.1;
//ID10
S DBX
303.6;
//ID31
L B#16#1;
T MB11;
SPA TRAN;
//Synchronized actions from NCK channel 1:
SYVK:
L B#16#2;
T MB11;
TRAN:
CALL FC
21
(
Enable
:= M 10.0,
//if TRUE, FC 21 active
Funct
:= MB 11,
S7Var
:= #myAny,
//Not used
IVAR1
:= 1,
//Channel no.
IVAR2
:= 0,
Error
:= M 10.1,
ErrCode
:= MW 12);
END_FUNCTION