MIN block

Short summary

Name

MIN

→POU type

→function

Category

Standard (safe), Select

Conform to →IEC-standard

(error) currently restricted
(IEC demands data type ANY_ELEMENTARY for the inputs, hence the following data types are demanded as well: LTIMESTRINGWSTRINGCHARWCHARLDATE_AND_TIMELTIME_OF_DAY and LDATE. Currently, these data types are not supported for the block.) 

Graphical interface

Available since

version 1.22.0 (for Neuron Power Engineer) - initial variant

version 3.8.0 (for library Standard (safe)): block provided in this library

Functionality

The block returns the minimum value of all values connected at the inputs: MIN(IN1, IN2, ..., IN16)

Bitstring values (= ANY_BIT values; see →generic data type} are treated like unsigned →integer values by the block. This behavior is a specification according to the →IEC-standard.

Inputs, return value

 

Identifier

→Data type

Description

Inputs:

IN1

REALLREALUSINTUINTUDINTULINTSINTINTDINTLINTTIMEBOOLBYTEWORDDWORDLWORDDATE_AND_TIMEDATE or TIME_OF_DAY

1st value

IN2

REALLREALUSINTUINTUDINTULINTSINTINTDINTLINTTIMEBOOLBYTEWORDDWORDLWORDDATE_AND_TIMEDATE or TIME_OF_DAY

2nd value

... (extensible until)

 

IN16

REALLREALUSINTUINTUDINTULINTSINTINTDINTLINTTIMEBOOLBYTEWORDDWORDLWORDDATE_AND_TIMEDATE or TIME_OF_DAY

16th value

Return value:

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT, LINT, TIME, BOOL, BYTE, WORD, DWORD, LWORD, DATE_AND_TIME, DATE or TIME_OF_DAY

 

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

PROGRAM Test
    VAR
        result : INT;
    END_VAR
    result := MIN(IN1 := 3, IN2 := 345, IN3 := -3, IN4 := 999, IN5 := 4);       (* The variable 'result' evaluates to '-3'.  *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.