P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1019
Call example
13.13.19 FC 12: AUXFU call interface for user with auxiliary functions
Function
FC AUXFU is generally called on an eventdriven basis in the basic program if the channel transferred in the
input parameter contains new auxiliary functions. The PLC user can extend FC AUXFU with program instructions
for processing his auxiliary function to avoid cyclic polling of the channel DBs. This mechanism permits auxiliary
functions to be processed on a jobdriven basis. FC AUXFU is supplied as a compiled empty block in the basic
program. In this case, the basic program supplies parameter "Chan" with the channel number. The PLC user
knows which channel has new auxiliary functions available. The new auxiliary functions can be determined by the
auxiliary-function change signals in the channel concerned.
Declaration of the function
Explanation of formal parameters
The table below lists all formal parameters of the AUXFU function:
Example
CALL FC 10 (
//Error and operational messages
ToUserIF :=
TRUE,
//Signals from DB 2 are transferred to
//interface
Ack :=
I6.1);
//Acknowledgement of the error message done via
//Input E6.1.
FUNCTION FC 12: VOID
//Event control of auxiliary functions
VAR_INPUT
Chan:
BYTE ;
END_VAR
BEGIN
BE;
END_FUNCTION
Signal
Type
Type
Value range
Remark
Chan
I
BYTE
0 ... 9
No. of NC channel -1
FUNCTION FC 12: VOID
//Event control of auxiliary functions
VAR_INPUT
Chan:
BYTE ;
//Parameter is supplied by basic program
END_VAR
VAR_TEMP
ChanDB:
INT;