Definition Of User Variables (Def) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

NCU1
NCU1 uses link variable $A_DLR[ 16 ] to write the actual current value of axis AX2 to the link
variables memory cyclically in the interpolation cycle in a static synchronized action.
Program code
N111 IDS=1 WHENEVER TRUE DO $A_DLR[16]=$VA_CURR[AX2]
NCU2
NCU2 uses link variable $A_DLR[ 16 ] to read the actual current value of axis AX2 to the link
variables memory cyclically in the interpolation cycle in a static synchronized action. If the
actual current value is greater than 23.0 A, alarm 61000 is displayed.
Program code
N222 IDS=1 WHEN $A_DLR[16] > 23.0 DO SETAL(61000)
3.1.1.5

Definition of user variables (DEF)

With the DEF command, you can define user-specific variables, or user variables (user data),
and assign values to them.
According to the range of validity (in other words, the range in which the variable is visible) there
are the following categories of user variable:
● Local user variables (LUD)
Local user variables (LUD) are variables defined in an NC program that is not the main
program at the time of execution. They are created when the NC program is called, and
deleted with an end of program reset – or the next time that the control system powers up.
Local user variables can only be accessed within the NC program in which they are defined.
● Program-global user variables (PUD)
Program-global user variables (PUD) are user variables defined in an NC program used as
the main program. They are created when the NC program is called, and deleted with an end
of program reset – or the next time that the control system powers up. It is possible to access
PUD in the main program and in all subprograms of the main program.
Note
Availability of program-global user variables (PUD)
Program-global user variables (PUD) defined in the main program are only available in
subprograms if the following machine data is set:
MD11120 $MN_LUD_EXTENDED_SCOPE = 1
If MD11120 = 0 the program-global user variables defined in the main program will only be
available in the main program.
● Global user variables (GUD)
Global user variables (GUD) are NC or channel-global variables which are defined in a data
block (SGUD, MGUD, UGUD, GUD4 to GUD9) and are kept even after an end of program
reset or the next time that the control system powers up. GUD can be accessed in all NC
programs.
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Work preparation
3.1 Flexible NC programming
397

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents