LOWER_BOUND: Read out low ARRAY limit (S7-1200, S7-1500) - STEP 7

FBD (S7-1200, S7-1500)

ft:publication_title
FBD (S7-1200, S7-1500)
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
LOWER_BOUND: Read out low ARRAY limit

Description

You can declare tags of the data type ARRAY[*] in the block interface of a function block or function. For these local tags, you can read out the limits of the ARRAY. You will need to specify the required dimension at the DIM parameter.

The "Read out ARRAY low limit" instruction is used to read out the variable low limit of the ARRAY.

Enable output ENO returns the signal state "0" if one of the following conditions applies:

  • Enable input EN has the signal state "0".

  • The dimension specified at input DIM does not exist.

Note

Availability of the instruction

The instruction is available for a CPU of the S7-1200 series as of firmware version >= 4.2, and for a CPU of the S7-1500 series as of firmware version >= 2.0.

Parameters

The following table shows the parameters of the instruction "Read out ARRAY low limit":

Parameters

Declaration

Data type

Memory area

Description

EN

Input

BOOL

I, Q, M, D, L or constant

Enable input

ENO

Output

BOOL

I, Q, M, D, L

Enable output

ARR

Input

ARRAY​[*]

FB => Section InOut

FC => Sections Input and InOut

ARRAY of which the variable low limit is to be read.

DIM

Input

UDINT

I, Q, M, D, L, P or constant

Dimension of the ARRAY of which the variable low limit is to be read.

OUT

Output

DINT

I, Q, M, D, L, P

Result

Example

The following example shows how the instruction works:

If the "Enable_Start" operand returns signal state "1", the instruction is executed. It reads out the variable low limit of the ARRAY #ARRAY_A from the second dimension. If the instruction is executed without errors, the result is written to operand "Enable_Out" and operand "Result" is set.