MUX_DINTARR_125: Multiplexer for arrays of the data type DIntArr125
Original instructions
Function description
Use this function to address and select a single element in an array. When addressing arrays, only constant indexes can be entered in the programming languages FBD and LD.
With the help of this function, variables for indexing can also be used.
EN and ENO can be configured as additional parameters.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
LD DIntArray
MUX_DINTARR_125 PositionInArray
ST SelectedElement
Representation in ST
Representation:
SelectedElement := MUX_DINTARR_125 (DIntArray, 
                   PositionInArray) ;
Parameter description MUX_DINTARR_125
Description of input parameters:
Parameter
Data type
Description
DIntArray
DIntArr125
Array an element is to be selected from
PositionInArray
Position in the array where the element to be selected is placed (range 0 ... 124)
Description of output parameters:
Parameter
Data type
Description
SelectedElement
selected element
Parameter description DIntArr125
Description of the DIntArr125 data type:
Element
Data type
Description
varname[1]
DINT
1. Element of the array
...
...
...
varname[125]
DINT
125. Element of the array
Runtime error
If the value range of the PositionInArray input is exceeded, an error message is displayed in the Diagnostic Viewer and %SW125 contains the error code value.
NOTE: For a list of all block error codes and values, see Extension/Compatibility.