Botu SCL_ output the largest value in a multidimensional variable length array and its array subscripts and subscripts

Experimental case

Customize a two-dimensional array, output the element with the largest value in the matrix, and output the superscript and subscripts of the array. Familiar with the use of FOR loop in Botu SCL.

1. Array definition

Create a two-digit array [0…2,0…3], the range is a 3×4 matrixArray definition

2. Program call

The main program calls the SCL function and fills in the pinsProgram call

3. SCL program segment

Automatically read the array range (minimum subscript and maximum superscript), the maximum value in the two-level loop nesting judgment matrix
SCL program

4. HMI simulation test

Change the value in any position in the matrix, SCL automatically sorts to find the maximum value in the matrix, and outputs its subscript and superscript in the array
HMI simulation test

Guess you like

Origin blog.csdn.net/fenglingxicao/article/details/106890065