Detailed description
2.12 Block descriptions
Basic logic functions: PLC basic program solution line (P3 sl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
231
Call example
1. Read double word of position offset 4 with semaphore in byte 0 and store in MD 100:
Data type Dword (4 bytes)
Position offset 4
6HPDSKRUH
'ZRUG
3RVLWLRQRIIVHW
'DWDW\SH'ZRUGE\WHV
CALL FC 21 (
Enable :=
M 10.0,
// if TRUE, FC 21 active
Funct :=
B#16#3,
//Read data
S7Var :=
P#M 100.0 DWORD 1,
IVAR1 :=
4,
IVAR2 :=
0,
Error :=
M 10.1,
ErrCode :=
MW12);
UN M10.1;
//Enable while 1, until value is read
R F10.0;
Examples of NCK programming from synchronized actions:
Data transfer from NC to PLC, with data written via synchronized actions;
Byte 0 serves as the semaphore
ID=1 WHENEVER $A_DBB[0] == 0 DO $A_DBR[4] = $AA_IM[X] $A_DBB[0] = 1
Data transfer from PLC to NC, with data read via synchronized actions;
Byte 1 serves as the semaphore
ID=2 WHENEVER $A_DBB[1] == 1 DO $R1 = $A_DBR[12] $A_DBB[1] = 0
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 ...