AC10CtrlArr
A = Array
C = Calculate functions
The ControlArray function scans the values of an array, depending on the type of analysis required. The analysis type is passed as an argument; possible values are shown below in the Type paragraph.
IMPLEMENTATION
AC10CtrlArr (array, tipo, result, done)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | ARRSYS | array | L/S | Arrays for which you want to make a control |
IN | GLOBAL | tipo | B | Specifies the analysis type (see “Type” section) |
OUT | GLOBAL | result | F | Flag that indicates the result of the analysis. |
OUT | GLOBAL | done | F | Flag that indicates that the operation completed |
Type
tipo = 1 the function sets the result to 1 if at least one of the values in the array is non-zero
tipo = 2 the function sets the result to 1 if all the values in the array are not zero
tipo = 3 the function sets the result to 1 if the majority of the values of the array is non-zero
Example
Check the array, when the “gfConfronta” flag is set to 1, to see if all the values in the array are to 0.
IF gfConfronta gfConfronta = 0 tipo = 1 AC10CtrlArr (array, tipo, result, done) IF NOT result gfTuttiZero = 1 ENDIF ENDIF
Note
-
The function executes a WAIT a time every 180 milliseconds