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

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

Advertisement

13.19

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.19.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
AUF
LAR1
AUF
LAR2
L
M001:
L
T
+AR1
+AR2
TAK;
LOOP
13.19.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.
Basic Functions
Function Manual, 01/2015, 6FC5397-0BP40-5BA2
DB 100;
P#20.0;
DI 101;
P#50.0;
4;
DBW [AR1,P#0.0];
DIW [AR2,P#0.0];
P#2.0;
P#2.0;
M001;
P3: Basic PLC program for SINUMERIK 840D sl
13.19 Programming tips with STEP 7
// 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
1067

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents