Data Types - Siemens SINUMERIK 828D Function Manual

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

Advertisement

P4: PLC for SINUMERIK 828D
14.3 Programming
Note
Using local and global symbols
Local variables use the temporary, local memory of the target system. Subprograms that only
use local variables and transfer parameters, are easy to port and can be flexibly used.
If you wish to use a parameter in several program organizational units, then it makes sense
to define this parameter as global symbol in the symbol table - and not in the local variable
table. This reason for this is that then you would have to include the parameter in every local
variable table of the individual POUs.
Note
Initialization of local variables
As local variables occupy temporary memories, you must initialize the local variables in the
POU each time that the POU is called. You cannot assume that a local variable keeps a data
value from one POU call to the next.
14.3.2.4

Data types

When defining symbols in the global symbol table, a data type does not have to be explicitly specified, as it is
implicitly specified by the data associated with the symbol.
If you assign values in the local variable table, then you must specify a data type for every local variable.
By explicitly specifying a data type for a value, you give the Programming Tool PLC828 clear instructions how
much memory must be assigned for the value (e.g. the value 100 can be stored as BYTE, WORD or DWORD)
and how the value is to be represented (e.g. should 0 be interpreted as BOOL or as numerical value?).
The operations and parameterized subprograms are recognized using a precise definition. This definition is also
called signature. For all standardized operations, the data types permissible for the addresses of the operation
are specified in the signature. For parameterized subprograms, the signature of the subprogram is generated by
the user in the local variable table.
Data type check
The Programming Tool PLC828 offers a simple data type check. If a data type is specified for a local or global
variable, the software checks that the data type of the address corresponds to the signature of the operation.
Elementary data types
BOOL (bit)
BYTE
WORD
DWORD (Double Word)
REAL
Complex data types
TON
TOF
1104
Description
Boolean
Byte, unsigned
Integer number (16 bit)
Integer number (32 bit)
32-bit floating point
Description
Switch-on delay
Switch-off delay
Memory area
0 ... 1
0 ... 255
-32768 ... +32767
-2147483648 ... +2147483647
-37
+38
+/- 10
 ... +/- 10
Memory area
100 ms T0 ... T15
10 ms from T16
100 ms T0 ... T15
10 ms from T16
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