P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1051
Call example:
1. Read double word of position offset 4 with semaphore in byte 0 and store in MD100:
Data type Dword (4 bytes)
Position offset 4
Examples: 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
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 M10.0;
3RVLWLRQRIIVHW
'DWDW\SH'ZRUGE\WHV
6HPDSKRUHV
'ZRUG
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...