Siemens SINUMERIK 840DE Programming Manual page 62

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

Advertisement

Fundamental Principles of NC Programming
2.2 Language elements of the programming language
Constants
Integer constants
Integer with or without leading sign, e.g., for assigning a value to an address
Examples:
X10.25
X -10.25
X0.25
X.25
X=-.1EX-3
Note
If, in an address, which permits decimal point input, more decimal places are specified than
actually provided for the address, then they are rounded to fit the number of places provided.
X0 cannot be replaced with X.
Example:
Do not replace G01 X0 with G01 X!
Hexadecimal constants
Constants can also be interpreted in hexadecimal format. The letters "A" to "F" stand for the
digits 10 to 15.
Hexadecimal constants are enclosed in single quotation marks and start with the letter "H",
followed by the value in hexadecimal notation. Separators are allowed between the letters
and digits.
Example for machine data (see also "Programming Guide Advanced"):
$MC_TOOL_MANAGEMENT_MASK='H3C7F'
The maximum number of characters is limited by the value range of the integer data type.
Binary constants
Constants can also be interpreted in binary format. In this case, only the digits "0" and "1"
are used.
Binary constants are enclosed in single quotation marks and start with the letter "B", followed
by the binary value. Separators are allowed between the digits.
2-16
;Assignment of the value +10.25 to address X
;Assignment of the value –.25 to address X
;Assignment of the value +0.25 to address X
;Assignment of the value +0.25 to address X without leading "0"
;Assignment of the value –.1*10-3 to address X
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
;Assignment of hexadecimal
;machine data
values to
Fundamentals

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents