Programming Tips With Step 7; Copying Data; Any And Pointer - Siemens SINUMERIK 828D Function Manual

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

Advertisement

P3: Basic PLC Program for SINUMERIK 840D sl

13.15 Programming tips with STEP 7

13.15
Programming tips with STEP 7
Some useful tips on programming complex machining sequences in STEP7 are given below. This is essentially
handling of the data type POINTER or ANY.
Fundamental tips on the structure of the data type POINTER and ANY see:
References:
STEP 7-Manual; Chapter: "Designing user programs" > "Register of CPU and saving of data"
13.15.1

Copying data

Copying variants
For the high-speed copying of data from one DB into another it is recommended
for larger data quantities to use the system function SFC BLKMOV or SFC FILL, because here a high-speed
copying takes place.
the routine given below is for smaller data quantities, because the supply of ANY parameter to the SFCs
consumes additional time.
Example
Code
OPEN
DB 100;
LAR1
P#20.0;
OPEN
DI 101;
LAR2
P#50.0;
L
4;
M001:
L
DBW [AR1,P#0.0];
T
DIW [AR2,P#0.0];
+AR1
P#2.0;
+AR2
P#2.0;
TAK;
LOOP
M001;
13.15.2

ANY and POINTER

The following programming examples show the programming mechanism. They demonstrate how input/output
and transit variables (VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT) are accessed by data types "POINTER" or
"ANY" within an FC or FB. The access operations are described in such a way that a part symbolic method of
programming can be used.
1076
Comment
// DB xx.[AR1] is the source
// DI yy.[AR2] is the destination
//Source DB
//Source start address on data byte 20
//Destination DB
//Destination start address on data byte 50
//AR1, AR2, DB, DI loaded beforehand
//Transfer 8 bytes
//Copy word-oriented
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