Siemens SINUMERIK 840D Diagnostics Manual page 149

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

Advertisement

10.04
Reactions:
Remedy:
Program Continuation:
12310
Parameters:
Definitions:
Reactions:
 Siemens AG, 2004. All rights reserved
SINUMERIK 840D/840Di/810D Diagnostics Guide (DA), 10.04 Edition
Example:
Subroutine:
(2 call-by-value parameters X and Y, 1 call-by-reference parameter Z)
PROC XYZ (INT X, INT Y, VAR INT Z)
:
M17
ENDPROC
Main program:
N10 DEF INT X
N11 DEF INT Y
N11 DEF INT Z
:
N50 XYZ (X, Y) ; REF parameter Z missing
or
N50 XYZ (X, Z) ; REF parameter Z missing!
- Correction block
- Interface signals are set.
- Alarm display.
Press the NC Stop key and select the function "Correction block" with the softkey PRO-
GRAM CORRECT. The correction pointer positions on the incorrect block.
Assign a variable to all REF parameters (call-by-reference parameters) of the subroutine
when calling. No variable must be assigned to "normal" formal parameters (call-by-value
parameters), as these are defaulted with 0.
Clear alarm with NC START or RESET key and continue the program.
Channel %1 block %2 axis parameter missing on procedure call %3
%1 = Channel number
%2 = Block number, label
%3 = Source string
When calling the subroutine, an AXIS parameter is missing which, according to the
EXTERN declaration, should be present.
With the EXTERN instruction, user-defined subroutines (procedures) are made "known"
that have a parameter transfer.
Procedures without parameter transfer require no EXTERN declaration.
Example:
Subroutine XYZ (with the formal parameters):
PROC XYZ (INT X, VAR INT Y, AXIS A, AXIS B)
EXTERN instruction (with variable types):
EXTERN XYZ (INT, VAR INT, AXIS, AXIS) Subroutine call (with actual parameters):
N10 XYZ (, Y1, R_TABLE)
Variable X is defaulted with value 0
Variable Y is supplied with the value of the variable Y1 and returns the results to the call-
ing program after the subroutine run
Variable A is supplied with the axis in R_TABLE
Variable B missing!
- Correction block
- Interface signals are set.
- Alarm display.
1 Alarms
1-149

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents