val = Pm.ArrayOper(aArray, sType)
aArray | (Array) Array over which the operation is performed |
---|---|
sType | (String) Type name of the performed operation: "Min" - Minimum value of all array items. The items have to be numeric, of the String or Date type. In case of the String type, the items are sorted alphabetically. "Max" - Maximum value of all array items. The items have to be numeric, of the String or Date type. In case of the String type, the items are sorted alphabetically. "Sum" - Sum of the array items values. The items have to be numeric and the result is a value of the Double type. "Mean" - Mean value of the array items. The items have to be numeric and the result is a value of the Double type. "StdDeviation" - Standard deviation of the array items values. The items have to be numeric and the result is a value of the Double type. "CRC1" - CRC-16-CCITT, 2 bytes Cyclical Redundancy Check with CCITT polynomial [0x1021 = x16+x12+x5+1]. Cyclical Redundancy Check of the array value bytes. The items can be of any type and the result is the value of the Integer type, i.e. 2 bytes value. This check sum is used, for example, at the PmSBUS communication. It is possible to enter the sub-option: "CRC1,Be" that performs the sum over the values converted into Big-Endian format. "CRC2" - CRC-16-IBM, 2 bytes Cyclical Redundancy Check with CCITT polynomial [0xA001 = x16+x15+x2+1]. Cyclical Redundancy Check of the array value bytes. The items can be of any type and the result is the value of the Integer type, i.e. 2 bytes value. This check sum is used, for example, at the Modbus communication protocol. It is possible to enter the sub-option: "CRC2,Be" that performs the sum over the values converted into Big-Endian format. "CRC3" - CRC-16-IBM, 2 bytes Cyclical Redundancy Check with CCITT polynomial [0x8005 = x16+x15+x2+1]. Cyclical Redundancy Check of the array value bytes. The items can be of any type and the result is the value of the Integer type, i.e. 2 bytes value. This check sum is used, for example, at the PmABradleyDF1 communication. It is possible to enter the sub-option: "CRC3,Be" that performs the sum over the values converted into Big-Endian format. "CSumB1" - Check sum of the "byte values sum" type. The values of the array are stored linear into the memory and then the sum of such stored bytes is performed. The result sum is converted into the Byte data type (i.e. sum 256 modulo). "CSumB2" - The same as CSumB1 but the result sum is converted into the Integer data type (i.e. sum 65536 modulo). |
This method is not functional yet for Web panels.
Dim arr
arr = pMe.Pm("/Data").GetVarArray()
Pm.Debug "Sum=" & Pm.ArrayOper(arr, "Sum")
Pm.Debug "Min=" & Pm.ArrayOper(arr, "Min")
Dim arr
arr = Array("abc", "xyz", "fgr")
Pm.Debug "Min=" & Pm.ArrayOper(arr, "Min")
Pm.Debug "Max=" & Pm.ArrayOper(arr, "Max")
Min = abc
Max = xyz