Detailed description
2.14 Programming tips with STEP 7
Basic logic functions: PLC basic program solution line (P3 sl)
258
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
FUNCTIONBLOCK FB 100
Comment
CODE_VERSION1
//starting from STEP 7 Version 2 for deactivating the multi-
instance DB
VAR_INPUT
WhichAny : INT ;
Addr1 : ANY ;
//Observe predetermined order
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L
WhichAny;
DEC 1;
L
P#10.0;
//10 bytes per ANY
*I;
LAR2;
L
P##Addr1;
+AR2;
//Add ANY start addresses
L
P##Temp_addr;
LAR1 ;
//Retrieve pointer from VAR_TEMP
L
DID [AR2,P#0.0];
//Transfer pointer value to VAR_TEM
T
LD [AR1,P#0.0];
L
DID [AR2,P#4.0];
T
LD [AR1,P#4.0];
L
DIW [AR2,P#8.0];
T
LW [AR1,P#8.0];
CALL FB 101, DB 100
(ANYPAR := #Temp_addr);
//ANYPAR is data type ANY
Summary of Contents for SINUMERIK 840D sl
Page 282: ...Index Basic logic functions Acceleration B2 64 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 388: ...Basic logic functions Travel to fixed stop F1 Function Manual 11 2006 6FC5397 0BP10 2BA0 52 ...
Page 962: ...Index Basic logic functions Emergency Stop N2 20 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1704: ...Constraints Basic logic functions Spindles S1 94 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1716: ...Index Basic logic functions Spindles S1 106 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1996: ...Index Basic logic functions Tool Offset W1 208 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2150: ...Table of contents Basic logic functions Appendix 4 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2184: ...Glossary Basic logic functions Appendix 38 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...