B3: Distributed systems - 840D sl only
2.2 NCU link
Extended Functions
Function Manual, 03/2013, 6FC5397-1BP40-3BA1
91
Channelspecific system variable
Identifier Meaning
$A_LINK_TRANS_RATE
1)
Number of write requests that still can be
transferred in the current interpolator cycle.
1) Application example, refer to Section: "Synchronization of a write request (Page 91)"
2.2.2.6 Synchronization of a write request
If certain applications require the new value of a link variable to be transferred to the other
NCUs in the link group in precisely two interpolation cycles, writing to the link variable must
be made in a synchronized action. In the synchronized action, writing to the link variable is
only executed if in the actual interpolator cycle, the write request can still be executed. The
$A_LINK_TRANS_RATE system variable contains the number of write requests that can still
be transferred in the current interpolator cycle.
In the following example, a link variable, data type WORD (2 bytes) and a link variable, data
type DWORD (4 bytes), are written:
Program example
N120 WHEN $A_LINK_TRANS_RATE > 0 DO $A_DLW[0] = 9
N125 WHEN $A_LINK_TRANS_RATE > 0 DO $A_DLD[2] = 7
N130 G4 F1
The synchronized action in N120 is performed only when the write request can be transferred
in the same interpolator cycle to the other NCU of the link group. In this case, the
$A_LINK_TRANS_RATE system variable is also decremented in the same interpolator cycle
so that the updated value is available for the synchronized action in the following
N125 block.
2.2.2.7 Example: Structure of the link variables memory
The following data are defined for the link communication:
Data format Number Bytes per data Bytes required
BYTE 2 1 2
WORD 1 2 2
DWORD 3 4 12
REAL 1 8 8
required size of the link variables memory: 24