Siemens SINUMERIK 840D sl Programming Manual page 12

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Table of contents
3.1.4.5
Determine length of string (STRLEN) ..................................................................................451
3.1.4.6
3.1.4.7
Selection of a substring (SUBSTR)......................................................................................453
3.1.4.8
Reading and writing of individual characters........................................................................454
3.1.4.9
Formatting a string (SPRINT)...............................................................................................455
3.1.5
Program jumps and branches ..............................................................................................463
3.1.5.1
Return jump to the start of the program (GOTOS)...............................................................463
3.1.5.2
3.1.5.3
Program branch (CASE ... OF ... DEFAULT ...)...................................................................467
3.1.6
Repeat program section (REPEAT, REPEATB, ENDLABEL, P) .........................................468
3.1.7
Check structures ..................................................................................................................474
3.1.7.1
Conditional statement and branch (IF, ELSE, ENDIF).........................................................476
3.1.7.2
Continuous program loop (LOOP, ENDLOOP)....................................................................477
3.1.7.3
Count loop (FOR ... TO ..., ENDFOR)..................................................................................478
3.1.7.4
3.1.7.5
3.1.7.6
Program example with nested check structures ..................................................................481
3.1.8
CLEARM) .............................................................................................................................481
3.1.9
Macro technique (DEFINE ... AS) ........................................................................................487
3.2
Subprogram technique.........................................................................................................490
3.2.1
General information..............................................................................................................490
3.2.1.1
Subprogram .........................................................................................................................490
3.2.1.2
Subprogram names..............................................................................................................491
3.2.1.3
Nesting of subprograms .......................................................................................................492
3.2.1.4
Search path..........................................................................................................................493
3.2.1.5
Formal and actual parameters .............................................................................................493
3.2.1.6
Parameter transfer ...............................................................................................................494
3.2.2
Definition of a subprogram ...................................................................................................496
3.2.2.1
Subprogram without parameter transfer ..............................................................................496
3.2.2.2
Subprogram with call-by-value parameter transfer (PROC) ................................................496
3.2.2.3
3.2.2.4
Save modal G functions (SAVE) ..........................................................................................500
3.2.2.5
Suppress single block execution (SBLOF, SBLON) ............................................................501
3.2.2.6
3.2.2.7
Identifying subprograms with preparation (PREPRO)..........................................................509
3.2.2.8
Subprogram return M17 .......................................................................................................510
3.2.2.9
RET subprogram return .......................................................................................................511
3.2.2.10
Parameterizable subprogram return jump (RET ...) .............................................................512
3.2.2.11
Parameterizable subprogram return jump (RETB ...)...........................................................518
3.2.3
Subprogram call ...................................................................................................................522
3.2.3.1
Subprogram call without parameter transfer ........................................................................522
3.2.3.2
Subprogram call with parameter transfer (EXTERN) ...........................................................524
3.2.3.3
Number of program repetitions (P).......................................................................................526
3.2.3.4
Modal subprogram call (MCALL) .........................................................................................527
3.2.3.5
Indirect subprogram call (CALL) ..........................................................................................529
3.2.3.6
TO ...) ...................................................................................................................................530
3.2.3.7
3.2.3.8
3.2.3.9
Extend search path for subprogram calls (CALLPATH).......................................................533
3.2.3.10
Execute external subroutine (EXTCALL) .............................................................................534
12
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents