Programming FCs (Functions) and FBs for S7 Ethernet CPs
5.4.1FC7 AG_LOCK
Meaning of the Block
Using the AG_LOCK block the data exchange using FETCH or WRITE on the connection selected with the parameter ID is disabled. The LOCKED output indicates whether or not the lock was successful. If the lock was not successful, the job must be triggered again in a later CPU cycle.
The STATUS output indicates the status of the CP for this connection.
Call
Representation of the AG_LOCK Function
AG_LOCK
IDSTATUS
LADDR LOCKED
Example in STL representation
STL |
|
| Explanation |
|
|
| |
call fc 7 |
| //Block call | |
ID | := | DB 100.DBW 2 | //Connection ID acc. to configuration |
LADDR | := | W#16#0100 | //=LADDR 256 dec. in hardware configuration |
STATUS | := | DB 100.DBW 4 | //Status code |
LOCKED | := | DB 100.DBX 0.6 | //Status code of access disable |
|
|
|
|
Explanation of the Formal Parameters
The following table explains all the formal parameters for the AG_LOCK function:
SIMATIC NET NCM S7 for Industrial Ethernet | 169 |