P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
998
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
13.13.11 FC 2: GP_HP Basic program, cyclic section
Function
The complete processing of the NCKPLC 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
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).
FUNCTION FC 2: VOID
// no parameters
ORGANIZATION_BLOCK OB 1
VAR_TEMP
OB1_EV_CLASS :
BYTE ;
OB1_SCAN_1 :
BYTE ;
OB1_PRIORITY :
BYTE ;
OB1_OB_NUMBR :
BYTE ;
OB1_RESERVED_1 :
BYTE ;
OB1_RESERVED_2 :
BYTE ;
OB1_PREV_CYCLE :
INT;
OB1_MIN_CYCLE :
INT;
OB1_MAX_CYCLE :
INT;
OB1_DATE_TIME :
DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 2;
//Call basic program as first FC
//INSERT USER PROGRAM HERE
CALL FC 19 (
//MCP signals to interface
BAGNo :=
B#16#1,
//Mode group no. 1
ChanNo :=
B#16#1,
//Channel no. 1
SpindleIFNo :=
B#16#4,
//Spindle interface number = 4
FeedHold :=
m22.0,
//Feed stop signal
//modal
SpindleHold :=
db2.dbx151.0);
//Spindle stop modal
//in message DB
CALL FC 10 (
//Error and operational messages
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...