Detailed description
2.2 Functions
Basic logic functions: Various NC/PLC interface signals and functions (A2)
34
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
2.2.4
Read/write PLC variable
High-speed data channel
For highspeed exchange of information between the PLC and NC, a memory area is
reserved in the communications buffer on these modules (dualport RAM). Variables of any
type (I/O, DB, DW, flags) may be exchanged within this memory area.
The PLC accesses this memory using 'Function Calls' (FC) while the NCK uses '$ variables'.
Organization of memory area
The user's programming engineer (NCK and PLC) is responsible for organizing (structuring)
this memory area.
Every storage position in the memory can be addressed provided that the limit is selected
according to the appropriate data format (i.e., a DWORD for a 4byte limit, a WORD for a 2-
byte limit, etc.).
The memory is accessed via the data type and the position offset within the memory area.
Access from NC
To allow the NC to access PLC variables (from a part program) quickly, $ variables are
provided in the NCK. The PLC uses a function call (FC) to read and write $ variables. Data
are transferred to and from the NCK immediately.
$ variables can be accessed (by the NCK) during preprocessing and in synchronized
actions.
Data type information is determined by the $ variable data type, the position index is
specified as an array index (in bytes).
The following $ variables are available:
$A_DBB
Data byte (8 bits)
$A_DBW
Data word (16 bits)
$A_DBD
Data double word (32 bits)
$A_DBR
Real data (32 bits)
Ranges of values
$A_DBB(n)
<= x <= 255
$A_DBW(n)
-32768 <= x <= 3276
$A_DBD(n)
-2147483648 <= x <= 2147483647
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 ...