How to use array of values in the PROMOTIC system

The PROMOTIC system allws to write algorythms in two scripting languages:
- VBScript and
- JavaScript (this can be used only in graphic item events meanwhile)
The array is used in a different way in each language. This chapter describes the usage of arrays in both languages.


The array in this language is a standard VBScript array, i.e. Array data type.

The VBScript array functions can be used in order to work with this array.

The array can be created by using the Array method (for 1-dimensional array), or by the Dim statement (also for multi-dimensional arrays).


The array in this language is represented by the PmArray object. This object is optimized for PROMOTIC system usage and allows to use 1- and 2-dimensional array.

The JavaScript language has its own Array object, but it is not recommended to use such object in the PROMOTIC system.

The PmArray object can be created by the Pm.CreatePmArray method.

Some other PROMOTIC methods using arrays

Pm.StringSplit - Returns a 1-dimensional array of substrings
Pm.StringJoin - Returns a string created by merging the substrings contained in 1-dimensional array
Pm.FileCsvRead - Reading from CSV file
Pm.FileCsvWrite - Writing to CSV file
Pm.FileTextWrite - Storing the variable (or the array of variables) into the text file
Pm.FindViewers - Obtaining he list of object viewers
Pm.GetRtLangs - Obtainig the list of all national languages supported by the application
Pm.ArrayOper - Array operations
Pm.TransformValue - Transformation of the value
PmData.GetVarArray - Creates an array of values from all object variables
PmData.GetVarSubArray - Creates an array of values from object variables specified by index (from-to)
PmData.SetVarArray - Assignment of values from the values array to the object variables
PmData.SetVarSubArray - Assignment of values array
PmDataTable.GetArray - Creates an array of values from selected data items of the object
PmDataTable.SetArray - Assignment of an array of values to the data items of the object
PmTrend.GetData - Returns the stored data
PmTrend.GetValueByTime - Returns the value (or more values) of a variable (more variables) by the specified time
PmTrend.SetValueByTime - Writing the value (more values) of a variable (more variables) by the specified time.
PmAlarmEvent.GetHistoryData - Obtains the data from history of alarms/events
PmAlarmEvent.GetStateData - Obtains the data from current state of alarms
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice