13.13.11 Fc 2: Gp_Hp Basic Program, Cyclic Section - Siemens SINUMERIK 828D Function Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions

13.13.11 FC 2: GP_HP Basic program, cyclic section

Function
The complete processing of the NCK­PLC interface is carried out in cyclic mode. In order to minimize the
execution time of the basic program, only the control/status signals are transmitted cyclically; transfer of the
auxiliary functions and G functions only takes place when requested by the NCK.
Declaration
FUNCTION FC 2: VOID
// no parameters
Call example
As far as the time is concerned, the basic program must be executed before the user program. It is, therefore,
called first in OB 1.
The following example contains the standard declarations for OB 1 and the calls for the basic program (FC2), the
transfer of the MCP signals (FC19), and the acquisition of error and operating messages (FC10).
ORGANIZATION_BLOCK OB 1
VAR_TEMP
OB1_EV_CLASS :
OB1_SCAN_1 :
OB1_PRIORITY :
OB1_OB_NUMBR :
OB1_RESERVED_1 :
OB1_RESERVED_2 :
OB1_PREV_CYCLE :
OB1_MIN_CYCLE :
OB1_MAX_CYCLE :
OB1_DATE_TIME :
END_VAR
BEGIN
CALL FC 2;
//INSERT USER PROGRAM HERE
CALL FC 19 (
BAGNo :=
ChanNo :=
SpindleIFNo :=
FeedHold :=
SpindleHold :=
CALL FC 10 (
998
BYTE ;
BYTE ;
BYTE ;
BYTE ;
BYTE ;
BYTE ;
INT;
INT;
INT;
DATE_AND_TIME;
//Call basic program as first FC
//MCP signals to interface
B#16#1,
B#16#1,
B#16#4,
m22.0,
db2.dbx151.0);
//Mode group no. 1
//Channel no. 1
//Spindle interface number = 4
//Feed stop signal
//modal
//Spindle stop modal
//in message DB
//Error and operational messages
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Basic Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents