Object Pm

Global object in the PROMOTIC system accessible by the Pm name.
The basic concept of VBScript and JavaScript languages makes them ideal for safe programming. For example the standard functions of the VBScript language include powerful instruments for algorithm creation, but do not offer any means cor connection with hardware environment. For example these do not allow writing to or reading disc, setting time, control I/O units, etc.

The best approach how to upgrade the VBScript language by functionality that language functions don't have, is to create objects that have the required properties and methods.

In the PROMOTIC system there is a large number of such objects (so called PROMOTIC objects) that enable an access to databases, access for serial link and for Ethernet, calling of a DLL connection, etc.

By calling methods over the PROMOTIC object we mostly accomplish the status change of the concrete object (of this instance). It means that methods of these objects don't have global character.

In the PROMOTIC system there is one global object accessible directly from any hierarchical level of the tree. This object is accessible in the VBScript language by the "Pm" variable (i.e. calling in a script it is Pm.MethodName). The Pm object comprises methods and properties that extend the functions set, for example, by writing on disk, time setting, data setting, etc.

Pm application properties and methods:
AlSound Enable/disable sound notification of alarms
AppFullName Path to the application with the application name
Application Reference to the running Promotic.exe program
AppName PROMOTIC application name
AppPriority Application priority
AppQuit Termination of the application
AppStop Termination of the running application and opening development mode
Beep Replay of the OS Windows system sound
ClockStart Starting the time clock
ClockStop Stopping the time clock
ColorOper Execution of the color conversion
ColorRgb Getting the color by entering the three RGB components
ControlSound Controls of the sound server of the PROMOTIC system
CreatePmAction Creates object of the PmAction type
CreatePmArray Creates object of the PmArray type
CreatePmExpr Creates object of the PmExpr type
CreatePmForm Creates object of the PmForm type
CreatePmList Creates object of the PmList type
CreatePmMap Creates object of the PmMap type
CreateProcess Starting the program (*.exe, *.com, *.bat) without waiting for the termination
CreateProcessSync Starting the program (*.exe, *.com, *.bat) with waiting for the termination
DdeExecute Sending the command to the DDE server
EvalMacro Evaluation of the macro expression
FindViewers Obtaining he list of object viewers
GetActiveWorkspace Returns the reference to active PmWorkspace object.
GetRtLangs Obtainig the list of all national languages supported by the application
GetSystemInfo Obtaining the system inforation
JsonParse Transforms JSON format text into object, array or elementary value
JsonStringify From object, array or elementary value creates text in JSON format
LicenceInfo Information about licenses of the PROMOTIC application
Methods Access to global methods of the application
NetGetAddress Getting the computer local address in the network
NetTestPC Test if the asked PC is accessible in the network
OtherAppOper Operation execution over the opened window of another application
PlaySound Playing the sound file *.wav
RtLang The language version of the runtime application
ShellExecute Running or printing the file or the registered document
ShutDown Shutdown of the OS Windows
Version Version of PROMOTIC system
WDogRefresh Refresh of the WatchDog program counter
WinEnviromentRead Environment variable read
WinEnviromentWrite Environment variable write
Pm properties and methods for users' administration (see Users and permissions):
AddUser Adding new user
FindUserIdLocal Getting the identifier of the local user that refers to the entered login parameters
FindUserIdNet Getting the identifier of the network user that refers to the entered login parameters
GetUserInfo Obtaining the inforation from the user system
LoggedUser Object User represents the logged user
Logoff Logging off the logged local user without the query
Logon Login of the local user without the input window
RemoveUser Delete existing user
TestUserInGroup Test if the user is or isn't a member of the user group
WndEditUserPassword Displays the box for editing the password
WndEditUsers Displays the window for editing the users
WndLogoff Display of the Logging off the user window
WndLogon Display of the Logging on the user window
Pm methods for access to INFO system (see INFO system):
Debug Text dump into the Debug_info item of INFO system
InfoAction Calling the action over the item of the INFO system
InfoWriteToFile Write the content of the page in the INFO system into the text file
Pm visualization methods (See also: VBScript visualization functions):
InputBox Entering the value by the user
InputBoxForDateTime Window for entering date and time
InputBoxForFilePath Window for the selection of the file/folder
MessageBox Displays the message box and waits for the user's click
PrintHtmlPage Print or display the preview of the HTML page or text
PrintScreen Printing the whole screen to a printer or to a file
SelectionDialog Enables to select the one option from the list in the input window
ShowHelp Display of help topic
Pm string methods (See also: VBScript string functions):
DecryptText Text decryption
EncryptText Text encryption
HTTPGetFormValue Decoding the string delivered from the Web browser
StringCmp Returns a result of a comparison of the two strings
StringCodeAt Returns the code of Unicode character on the definde position in the string
StringCodeFrom Returns the character associated with the specified Unicode code
StringFind Searches the text for requested string from the defined position.
StringFormat Writing an array of values into the string
StringJoin Returns a string created by merging the substrings contained in 1-dimensional array
StringLen Returns the number of characters in a string
StringOper Execution of string operation
StringReplace Replacement of the keyword in the string by the value
StringScan Reading data from the string
StringSplit Returns a 1-dimensional array of substrings
StringSub Returns the substring of another string
Pm date and time methods (See also: VBScript date and time functions):
CreateDate Getting date and time or getting time interval
CreatePmDateObject Creating the auxiliary object PmDateObject for working with date and time
FormatDate Getting the string from a date
GetDateOf Derive dates from defined base date
IsDaylight Test of the "daylight-saving time"
ScanDate Getting date and time from text value
Time System time
Pm properties and methods mathematic and others:
Abs Absolute value of a number
ArrayOper Array operations
Atan Returns the arctangent (invertetd tangent) of a number
CDbl Returns an expression converted into the Double type
Cos Returns the cosine of an angle
CSng Returns an expression converted into the Single type
E The mathematical Euler's number (the base of natural logarithms)
Exp Computes the value of "e raised to the power of y"
GetBit Getting the bit of the variable
GetVarType Returns the data type of the value
IsInt Testing whether the value is integer
IsValid Testing the validity of the value
Linear Getting the functional value (or the argument) of the linear function
LN10 The natural logarithm of 10
LN2 The natural logarithm of 2
LOG10E The base-10 logarithm of e
LOG2E The base-2 logarithm of e
LogN Returns logarithm of a number
PI Pi number
Pow Computes the value of "x raised to the power of y"
Random Returns a random number in defined range
Round Returns number rounded to a specified number of decimal or whole places
SetBit Changing a bit of the variable
Sign Returns an integer indicating the sign of a number
Sin Returns the sine of an angle
Sqrt Returns the square root of a number
SQRT2 The square root of 2
Tan Returns the tangent of an angle
ToNumber Conversion to numeric value
TransformValue Transformation of the value
Pm disk/files methods:
DirCreate Creation of the folder (directory)
DirExist Tests if the folder (directory) exists
DirRemove Remove of the folder (directory).
DiscGetFreeSpace Retrieves the free space on the disk
DiscGetPath Retrieves the requested path in Microsoft format.
DiscGetTotalSpace Retrieves the disk capacity
FileBinaryRead Reading the content of the binary file into the variable of the Array type
FileBinaryWrite Storing the content of the variable of the Array type into the binary file
FileCopy Copy of the file
FileCsvRead Reading from CSV file
FileCsvWrite Writing to CSV file
FileDelete Deleting the file
FileFind Finding out files and folders in the specified path
FileGetAttr Getting the file attributes
FileGetCreationTime Getting the creation time of the file
FileGetLastAccessTime Getting the last access time to the file
FileGetLastWriteTime Getting the last write time into the file
FileGetLength Getting the size of the file (in bytes)
FileMove Move (rename) of the file (folder)
FileReadVariable Reading the value of the variable from the file
FileSetAttr Sets the file attributes
FileTextRead Reading of the text file
FileTextReplace Replacement of text in the text file
FileTextWrite Storing the variable (or the array of variables) into the text file
FileWriteVariable Writing the value of the variable into the file
IniFileRead Reading the item from the *.ini file
IniFileWrite Writing the item into the *.ini file
Obsolete properties and methods:
Blinker Blinking with the panel windows refresh period
CpuUsage Computer CPU usage
InputBoxForStringSelection Enables to select the string from the list in the input window (obsolete)
MemoryUsage Computer memory usage
RtLanguage The language version of the runtime application (obsolete)
WndHtmlPage Display of the HTML page in modal/modeless window
WndInfo Window of the INFO system
PROMOTIC 8.3.22 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice