Read Attribute Values / Data Type (Getvarphu, Getvarap, Getvarlim, Getvardft, Getvartyp) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Flexible NC programming
1.1 Variables
1.1.16
Read attribute values / data type (GETVARPHU, GETVARAP, GETVARLIM,
GETVARDFT, GETVARTYP)
The attribute values of system/user variables can be read with the predefined GETVARPHU,
GETVARAP, GETVARLIM and GETVARDFT functions, the data type of a system/user
variable with GETVARTYP.
Read physical unit
Syntax:
<Result>=GETVARPHU(<name>)
Meaning:
<result>
GETVARPHU
<name>
Example:
The NCK contains the following GUD variables:
DEF CHAN REAL PHU 42 LLI 0 ULI 10000 electric
Program code
DEF INT result=0
result=GETVARPHU("electric")
IF (result < 0) GOTOF error
The value 42 is returned as result. This corresponds to the physical unit [kW].
Note
GETVARPHU can be used, for example, to check whether both variables have the expected
physical units in a variable assignment a = b.
56
:
Numeric value of the physical unit
Data type:
Range of
values:
:
Reading of the physical unit of a system/user variable
:
Name of the system/user variables
Data type:
INT
See Table in "Attribute: Physical unit (PHU) (Page 37)"
In case of fault
- 2
The specified
<name>
system parameter or a user variable.
STRING
Comment
; Determine the physical unit of the GUD
variables.
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
has not been assigned to a
Job Planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents