Академический Документы
Профессиональный Документы
Культура Документы
STRUCT,
ARRAY
STRUCT,
ARRAY
Description
You can use the "Move value" operation to transfer the content of the operand at the IN input to the operand at the
OUT1 output. The transfer is always made in the direction of the ascending address.
If IEC test is enabled the tags at IN input and OUT1 output must be of the same data type. If the IEC test is not enabled,
the operand width at the IN input and the OUT1 output of the operation must be the same.
Copying entire arrays is possible only when the array components of the tags at input IN and at output OUT1 are of the
For the "Move value" operation, you can insert additional outputs. In this case, the content of the operand at the IN input
The operation is only executed if the signal state is "1" at the enable input EN. In this case, the ENO output also has
If the signal state at the EN input is "0", the enable output ENO is reset to "0".
The "Move block" (MOVE_BLK) and "Move block uninterruptible" (UMOVE_BLK) operations can also be used to copy
tags of the ARRAY data type. You can copy tags of the STRING data type with the operation S_CONV.
Placement
The "Move value" operation can be placed at any position in the network.
Example
about:blank 8-11-2011
Page 2 of 3
If input I 0.0 has signal state "1", the "Move value" operation is executed. The operation copies the contents of the input
operand (MW10) to the output operand (MW20) and sets the output Q 4.0 to the signal state "1".
of the source
area to be
copied.
constant elements to be
source area to
the destination
area.
of the destination
content of the
source area is
copied.
Description
You can use the "Move block" operation to copy the content of a memory area (source area) to another memory area
(destination area). The number of elements to be copied to the destination area is specified with the COUNT parameter.
The width of the elements to be copied is defined by the width of the element at input IN. The copy operation takes
The operation is only executed if the signal state is "1" at the enable input EN. If no errors occur during execution of the
The enable output ENO returns signal state "0" if one of the following conditions applies:
More data is copied than is available in the memory area at output OUT.
Placement
The "Move block" operation can be placed at any position in the network.
Example
about:blank 8-11-2011
Page 3 of 3
COUNT IW2 = 3
If the inputs I 0.0 AND I 0.1 have signal state "1", the "Move block" operation is executed. The operation selects three
INT elements from the "a_array" tag (a_array[2..4]) and copies the content to the output tag "b_array" (b_array[1..3]). If
no errors occur during execution of the operation, the ENO output has signal state "1" and output Q 4.0 is set.
about:blank 8-11-2011