Siemens SINUMERIK 840D sl Function Manual page 1502

Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Detailed description
2.12 Block descriptions
Functions
3, 4: Rapid PLC NCK data exchange
General
A separate, internal data area is provided to allow the highspeed exchange of data between
the PLC and NCK. The size of the internal data field is preset to 1024 bytes. The accesses
(read/write) from PLC take place via the FC 21. The occupation of this range (structure) must
be defined identically in the NC part program and the PLC user program.
These data can be accessed from the NC parts program by commands $A_DBB[x],
$A_DBW[x], $A_DBD[x], $A_DBR[x] (see /PGA1/ Parameter Manual System variables)).
The concrete address is the data field is specified by a byte offset (0 to 1023) in parameter
IVAR1. In this case, the alignment must be selected according to the data format, i.e., a
Dword starts at a 4byte limit and a word at a 2byte limit. Bytes can be positioned on any
chosen offset within the data field, singlebit access operations are not supported and
converted to a byte access operation by FC 21. Data type information and quantity of data
are taken from the ANY parameter, transferred via S7Var.
Without additional programming actions, data consistency is only ensured for 1 and 2 byte
access in the NCK and in the PLC. For the 2-byte consistency this is true only for the data
type WORD or INT, but not for the data type BYTE.
In the case of longer data types or transfer of fields, which should be transferred
consistently, a semaphore byte must be programmed in parameter IVAR2 that can be used
by FC 21 to determine the validity or consistency of a block. This handling must be
supported by the NC, i.e., in the part program, by writing or deleting the semaphore byte.
The semaphore byte is stored in the same data field as the actual user data.
The semaphore byte is identified by a value between 0 and 1023 in IVAR2.
The PLC reads and describes the semaphore byte via FC 21 in the same call, which should
transfer the user data. The PLC programmer only needs to set up a semaphore variable. For
access from the NC via the parts program, the semaphore feature must be programmed
using individual instructions according to the flow chart shown below. The sequence is
different for reading and writing variables.
Only individual variables or ARRAYs can be supported directly by the semaphore technique.
Structure transfers must be subdivided into individual jobs. The user must ensure data
consistency of this structure by programming a semaphore system.
If IVAR2 is set to -1, data are transferred without a semaphore.
Data exchange with semaphore in PLC (schematic of FC 21)
228
Basic logic functions: PLC basic program solution line (P3 sl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840di slSinumerik 840dSinumerik 840diSinumerik 810dSinumerik 840d powerlineSinumerik 840de powerline ... Show all

Table of Contents