EasyManuals Logo

Siemens SINUMERIK ONE MCP 2400.4c Function Manual

Siemens SINUMERIK ONE MCP 2400.4c
2050 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1397 background imageLoading...
Page #1397 background image
Detailed Description
2.12 Block descriptions
PLC Basic Program Solution Line (P3 sl)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
2-203
TRAN: CALL FC 21 (
Enable := M 10.0, // If True, FC 21 is active
Funct := MB 11,
S7Var := #myAny, //Not used
IVAR1 := 1, //Channel no.
IVAR2 := 0,
Error := M 10.1,
ErrCode := MW 12);
...
END_FUNCTION
Functions
3, 4: Rapid PLC NCK data exchange
General
A separate, internal data area is provided to allow the high-speed exchange of data between
the PLC and NCK. The size of the internal data field is preset to 1024 bytes. The NCK is
accessed (read/written) from the PLC via FC21. The assignment of this area (structure) must
be declared identically in both the NC parts 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 Programming Guide). 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
4-byte limit and a word at a 2-byte limit. Bytes can be positioned on any chosen offset within
the data field, single-bit 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. However, 2 byte consistency is only ensured for the data
types Word or Int, 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 = -1, data are transferred without a semaphore.

Table of Contents

Other manuals for Siemens SINUMERIK ONE MCP 2400.4c

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK ONE MCP 2400.4c and is the answer not in the manual?

Siemens SINUMERIK ONE MCP 2400.4c Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK ONE MCP 2400.4c
CategoryControl Systems
LanguageEnglish

Related product manuals