Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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 Pmg object events meanwhile)
The array is used in a different way in each language. This chapter describes the usage of arrays in both languages.
 

VBScript

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 the Array method (for 1-dimensional array), or by means of the Dim statement (also for multi-dimensional arrays).

JavaScript

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 - Returns the list of object viewers according to selected criteria
Pm.GetRtLangs - Returns the list of all national languages supported by the application
Pm.ArrayOper - Array operations
Pm.TransformValue - Transformation of the value
 
PmaData.GetVarArray - Creates an array of values from all object variables
PmaData.GetVarSubArray - Creates an array of values from object variables specified by index (from-to)
PmaData.SetVarArray - Assignment of values from the values array to the object variables
PmaData.SetVarSubArray - Assignment of values array
 
PmaDataTable.GetArray - Creates an array of values from selected data items of the object
PmaDataTable.SetArray - Assignment of an array of values to the data items of the object
 
PmaTrendGroup.GetData - Returns the stored data
PmaTrendGroup.GetValueByTime - Returns a value (or more values) of a variable (more variables) by the specified time
PmaTrendGroup.SetValueByTime - Writing the value (more values) of a variable (more variables) by the specified time.
 
PmaAlarmGroup.GetHistoryData - Obtains the data from history of alarms/events
PmaAlarmGroup.GetStateData - Obtains the data from current state of alarms

History:
Pm8.03.02: Created
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
 
- SVG
- How to use array of values in the PROMOTIC system
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice