Fcs For Access Coordination With Fetch/Write - Siemens NCM S7 Manual

Simatic net ncm for industrial ethernet
Table of Contents

Advertisement

5.4

FCs for Access Coordination with FETCH/WRITE

Overview
The following FCs are available for FETCH/WRITE function to coordinate access:
FC
AG_LOCK (FC7)
AG_UNLOCK (FC8)
Caution when Configuring
If you use FCs AG_LOCK and AG_UNLOCK, you must specify the following
information for S7-400 stations in the configuration:
S in HW Config
In the "Addresses" tab, the option "Address setting for LOCK/UNLOCK" must
be selected.
How the Block Works
With these FCs, you can coordinate access to system memory areas so that no
inconsistent data are created and transferred. The control is from the user program
in the S7 CPU that can, if necessary disable an external FETCH/WRITE access
using an AG_LOCK call. After a certain time or after the local write/read access is
completed, an AG_UNLOCK job can be used to enable external access again.
Another advantages is that this access lock only applies to the FETCH/WRITE
connection specified in the call. If more than one FETCH/WRITE connections are
configured, these can, for example, be used for certain specific system areas and
a selective access coordination can be implemented.
The following diagram illustrates the usual chronological sequence of memory
access coordination controlled in the user program with AG_LOCK and
AG_UNLOCK.
SIMATIC NET NCM S7 for Industrial Ethernet
C79000-G8976-C129–06
Programming FCs (Functions) and FBs for S7 Ethernet CPs
can be used with:
S7 – 300
S7 – 400
x
x
x
x
Meaning
Locks external data access
with FETCH/WRITE.
Releases external data
access with FETCH/WRITE.
167

Advertisement

Table of Contents
loading

Table of Contents