Siemens SINUMERIK 840Di Function Manual page 1169

Basic machine
Hide thumbs Also See for SINUMERIK 840Di:
Table of Contents

Advertisement

2.14
Useful tips on programming with STEP 7
2.14
2.14.1
General
General
Some useful tips on programming complex machining sequences in STEP7 are given in the
following. This information concentrates mainly on the handling of data type POINTER and
ANY. Detailed information about the structure of data types POINTER and ANY can be
found in Chapter "CPU register and storage of data" in STEP7 manual "Designing user
programs".
2.14.2
Copying data
High-speed copying
The following is an example of how to copy data at high speed from one DB into another.
Code
OPEN
LAR1
OPEN
LAR2
L
M001:
L
L
T
+AR1
+AR2
TAK;
LOOP
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
DB 100;
P#20.0;
DI 101;
P#50.0;
42;
DBW [AR1,P#0.0];
DBW [AR1,P#0.0];
DIW [AR2,P#0.0];
P#2.0;
P#2.0;
M001;
2.14 Useful tips on programming with STEP 7
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 84 bytes
//Copy word-oriented
Detailed description
2-257

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents