Constants - Siemens SINUMERIK 828D Function Manual

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

Advertisement

P4: PLC for SINUMERIK 828D
14.3 Programming
Advantages of the data type check
The data type check helps you to avoid programming errors that have been widely propagated through the
program. If an operation supports numbers with signs, the Programming Tool PLC828 designates the use of
unsigned numbers in addresses of operations.
Example:
The comparison < I is an operation with sign. -1 is less than 0 for addresses with sign. However, if the operation
< I supports unsigned data types, then the programming itself must ensure that the following does not occur:
While a program is being executed, an unsigned value of 40.000 is actually smaller than 0 for the operation < I. If
it cannot be guaranteed that the unsigned numbers for signed operations do not exceed the positive and
negative limit values, then unpredictable events can occur in your program or in the mode of operation of the
control.
Working with operations to convert the data type
Conversion operations convert one data type into another. The Programming Tool PLC828 supports the
following conversion operations to transfer values between the elementary data types.
Conversion of data
types
INT in BCD
BCD in INT
DINT in REAL
REAL in DINT
(ROUND)
14.3.2.5

Constants

Range of constants
Size of the data
Decimal:
B (Byte)
W (Word)
D (Double word)
0 ... 4294967295
Size
D (Double word)
+1.175495E-38 ... +3.402823E+38
1106
Conversion operations
I_BCD
BCD_I
DI_R
TRUNC
Range without sign
Hexadecimal:
0 ... 255
0 ... FF
0 ... 65535
0 ... FFFF
0 ... FFFF FFFF
Decimal real number (positive)
Complete data type
Data check,
check, permissible
permissible addresses
addresses
IN: INT
IN: WORD, INT
OUT: INT
OUT: WORD, INT
IN: INT
IN: WORD, INT
OUT: INT
OUT: WORD, INT
IN. DINT
IN: DWORD, DINT
OUT: REAL
OUT: REAL
IN: REAL
IN: REAL
OUT: DINT
OUT: DWORD, DINT
Range with sign
Decimal:
-128 ... +127
-32768 ... +32767
-2147483648 ...
+2147483647
Decimal real number (negative)
-1.175495E-38 ... -3.402823E+38
Hexadecimal:
80 ... 7F
8000 ... 7FFF
8000 0000 ... 7FFF FFFF
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Basic Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents