P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
1048
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
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 4096 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 Parameter Manual System variables).
The concrete address is the data field is specified by a byte offset (0 to 4095) 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 4095 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.
Содержание 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 ...