Lenze ApplicationTemplate PackML (PLC Designer R3-x) User Manual
Page 85

Lenze · ApplicationTemplate PackML · 1.0 EN - 05/2014
85
Architecture: The ApplicationTemplate PackML in detail
Consistent data transfer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[9-1]
Example: The Lock() method inhibits real time-critical data of the ACD structure.
2. After the last exclusive access to the data area, a task must call the Unlock() method to enable
the data area.
[9-2]
Example: The UnLock() method enables a reserved data area der ACD structure.
Program in machine module 1 ( TaskMidPriority = 4 ms):
Program in machine module 2 ( TaskHighPriority = 2 ms):
IF Lock() THEN
For i:=0 TO 2000 by 1 DO
rACDOwn.aCAMData[i] := aCAMData[i];
END_FOR
IF Lock() THEN
For i:=0 TO 2000 by 1 DO
rACDOwn.aCAMData[i] := aCAMData[i];
END_FOR
Unlock()
IF Lock() THEN
For i:=0 TO 2000 by 1 DO
rACDOwn.aCAMData[i] := aCAMData[i];
END_FOR
Unlock()
IF NOT LockState() THEN
For i:=0 TO 2000 by 1 DO
aCAMData[i] := rACDModule1.aCAMData[i];
END_FOR
END_IF