Siemens SINUMERIK 840D sl Programming Manual page 163

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

Advertisement

<array>:
<start column>:
<end column>:
Note
The <start column> and <end column> parameters are optional. If no column indices
are indicated, the checksum is formed over the whole array.
The result of the checksum is always definite. If an array element is changed, the result
string will also be changed.
Example
Program code
N10 DEF INT ERROR
N20 DEF STRING[16] MY_CHECKSUM
N30 DEF INT MY_VAR[4,4]
N40 MY_VAR=...
N50 ERROR=CHECKSUM(MY_CHECKSUM,"MY_VAR",0,2)
...
The example could return the following result in the MY_CHECKSUM result variable, for
example:
"A6FC3404E534047C"
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
1.23 Checksum calculation using an array (CHECKSUM)
Name of the array to be used to generate the checksum (call-by-
value parameter)
Type:
STRING
Max. string length:
Permissible arrays are 1- to 3-dimensional arrays of the following
types:
BOOL, CHAR, INT, REAL, STRING
Note:
Arrays of machine data are not permissible.
Number of the start column of the array for calculating the
checksum (optional parameter)
Number of the end column of the array for calculating the
checksum (optional parameter)
Flexible NC programming
32
Comment
; Definition of error variables.
; Definition of result
variables.
; Array definition.
163

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents