Example: Replacement Of An M Function - Siemens SINUMERIK 828D Function Manual

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

Advertisement

9.15.2.4

Example: Replacement of an M function

Example 1
The function M6 is replaced by calling the subprogram "SUB_M6".
The information relevant for a tool change should be transferred using system variables.
Parameterization
Machine data
MD10715 $MN_M_NO_FCT_CYCLE[2] = 6
MD10716 $MN_M_NO_FCT_CYCLE_NAME[2] = "SUB_M6"
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 2
Main program
Programming
PROC MAIN
...
N10 T1 D1 M6
...
N90 M30
Subprogram "SUB_M6"
Programming
PROC SUB_M6
N110 IF $C_T_PROG==TRUE
N120
T[$C_TE]=$C_T
N130 ENDIF
N140 M[$C_ME]=6
N150 IF $C_D_PROG==TRUE
N160
D=$C_D
N170 ENDIF
N190 M17
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
K1: Mode group, channel, program operation, reset response
Comment
;
;
M6 is replaced by subroutine "SUB_M6"
;
;
Comment
; IF address T is programmed
;
Execute T selection
; ENDIF
; Execute tool change.
; IF address D is programmed
;
Execute D selection
; ENDIF
9.15 Replacing functions by subprograms
Meaning
Tool change with M6
Replacement
subprogram for M6
Information transfer
using system
variables
643

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents