• No results found

API Basic Interface

Object being Edited

Bit 0 = Basic in run Bit 1 = Basic in pause

3. API Basic Interface

3.1. Using Basic Script Interfaces

Movicon consents the use of a series of basic script methods and properties for managing projects and the resources and objects they contain. In this way you can read/modify almost all the properties of the project resources and objects in runtime mode. Each project resource and object has been specifically provided with a set of methods and properties for this purpose and are found in the objects' Basic Script Interface group properties.

According to the basic script context you are working in, ie. editing code in a Basic Script resource, or in a screen object, etc, you will be provided with the methods and properties of the interface relative to that object. In order to have methods and properties from a different interface you will need to create a reference object to the new interface you wish to use. For instance, if you are editing script code in a screen, you will be provided with the "SynopticCmdTarget" interface.

However, if you then need to edit a title of a symbol contained in that screen, you will have to create an "DrawCmdTarget" object using the "GetSubObject" function.

You must also take into account that the methods and properties of the main

"PmeDocCmdTarget" interfaces (general project interfaces), "UIInterface" (project user interface) and "DBVariableCmdTarget" (RealTimeDB database of the project's variables) are always available independently from the context you are working in.

The "PmeDocCmdTarget" interface contains a series of methods which consent to project resource referencing (Alarms, RealTimeDB, Screens, DataLogger/Recipes, etc.). The flow chart below shows how to access objects and resources (only some have been used as examples but this procedure is the same for all the basic script interface) starting from the "PmeDocCmdTarget".

These Basic Script Interfaces are listed below with the object type they are referenced to.

Basic Script Interface Description

AlarmCmdTarget This interface groups the methods and properties of "Alarm"

objects.

AlarmThresholdCmdTarget This interface groups the events, methods and properties of

"Alarm Threshold" objects.

AlarmWndCmdTarget This interface groups the events, methods and properties of

"Alarm Window" objects.

ChartWndCmdTarget This interface groups the events, methods and properties of "Chart" objects.

ClientRulesInterface This interface groups the events, methods and properties of Networking "Client Rules" objects.

CommandLanguageCmdTarget This interface groups the methods and the properties which allow screen button or object command list "language"

commands to be modified.

CommandsListCmdTarget This interface groups the method and propertied that allow screen button or object command lists to be modified.

ButtonCmdTarget This interface groups the methods or properties which allow Button object properties to be modified.

CommandUsersCmdTarget This interface groups methods and properties that allow

"Users" command types on Screen Button or Object Command Lists to be modified.

CommandAlarmCmdTarget This interface groups methods and properties that allow

"Alarm" command types on Screen Button or Object Command Lists to be modified.

CommandVariableCmdTarget This interface groups methods and properties that allow

"Variable" command types on Screen Button or Object Command Lists to be modified.

CommandBaseCmdTarget This interface groups methods and properties common to all script interfaces usded for modifying individual commands from screen Button or Object command lists.

CommandHelpCmdTarget This interface groups methods and properties that allow

"Help" command types on Screen Button or Object Command Lists to be modified.

CommandMenuCmdTarget This interface groups methods and properties that allow

"Menu" command types on Screen Button or Object Command Lists to be modified.

CommandReportCmdTarget This interface groups methods and properties that allow

"Report/Recipe" command types on Screen Button or Object Command Lists to be modified.

CommandScriptCmdTarget This interface groups methods and properties that allow

"Script" command types on Screen Button or Object Command Lists to be modified.

CommandSynopticCmdTarget This interface groups methods and properties that allow

"Screen" command types on Screen Button or Object

Command Lists to be modified.

CommandSystemCmdTarget This interface groups methods and properties that allow

"System" command types on Screen Button or Object Command Lists to be modified.

CommandEventCmdTarget This interface groups methods and properties that allow

"Event" command types on Screen Button or Object Command Lists to be modified.

DBVariableCmdTarget This interface groups the methods and properties for accessing the RealTimeDB settings.

DBVarObjCmdTarget This interface groups the methods and properties of RealTimeDB "Tag" objects.

DisplayEditCmdTarget This interface groups events, methods and properties of

"Display" objects. You must take in to consideration that a "List Box" or "Combo Box" object inherits methods and properties both from the "DisplayEditCmdTarget" and "ListBoxCmdTarget" interfaces.

DLRCmdTarget This interface groups methods and properties of "DataLogger"

or "Recipe" objects.

DLRColumnCmdTarget This interface groups methods and properties of DataLogger or Recipe "Column" objects.

DLRWndCmdTarget This interface groups events, methods and properties of

"DataLogger-Recipe Window" objects.

DrawCmdTarget This interface groups generic events, methods and general properties for all objects that can be inserted on screen.

EventCmdTarget This interface groups methods, properties and project resource "Event" objects.

GaugeCmdTarget This interface groups events, methods and properties of

"Gauge" objects.

GenericEvents This group of events are generic and can be partly or completely available for all those objects which can be inserted on screen.

GridWndCmdTarget This interface groups "Grid" object events, methods and properties.

HisLogWndCmdTarget This interface groups events, methods and properties of

"Historical Log Window" objects.

HourSelectorCmdTarget This interface groups events, methods and properties of

"Scheduler Window" objects.

IOPortInterface This interface groups methods and properties which consent access to PC COM serial ports.

ListBoxCmdTarget This interface groups events, methods and properties of "List Box" or "Combo Box" objects.

NetworkClientCmd This interface groups methods and properties which consent access to project's "Network Client" settings.

NetworkRedudancyCmd This interface groups methods and properties which consent access to the project's "Redundancy" settings.

OPCAECmdTarget Momentarily not supported.

OPCClientCmdTarget This interface groups methods and properties which consent access to the project's OPC client general settings.

OPCClientGroupObjCmdTarget This interface groups methods and properties which consent access to the project's OPC Client "Group" settings.

OPCClientItemObjCmdTarget This interface groups methods and properties which consent access to the project's OPC Client "Item" settings.

OPCClientObjCmdTarget This interface groups methods and properties which consent access to a specific project OPC Client settings.

OPCServerCmdTarget This interface groups methods and properties which consent access to the Movicon OPC Server settings.

PmeDocCmdTarget This interface groups the project's generic methods and properties.

RASStationInterface This interface groups Networking "RAS Station" methods and properties.

RecipeWndCmdTarget This interface regroups the "Recipe Window Manager" object's events, methods and properties.

ScalingCmdTarget This interface groups methods and properties of the project's resources' "Scaling" objects.

SchedulerCmdTarget This interface groups the methods and properties of the project's resources' "Scheduler" objects.

ScriptMEIterface This interface groups the events, methods and properties of the project's "Basic Script" resource.

SynopticCmdTarget This interface groups events, methods and properties of the project's "Screen" resource.

TraceDBWndCmdTarget This interface groups events, methods and properties of

"TraceDB Window" objects.

TrendCmdTarget This interface groups events, methods and properties of

"Trend" or "Data Analysis" objects.

UIInterface This interface groups the project's generic methods and properties concerning the user interface.

UserAndGroupCmdTarget This interface groups the project's "User Management" generic methods and properties.

UserCmdTarget This interface groups the project's "User" object methods and properties.

UserGroupCmdTarget This interface groups the project's "User Group" object methods and properties.

4. AlarmCmdTarget

GetAlarmThreshold, AlarmCmdTarget Function

Syntax GetAlarmThreshold(_lpszName)

Description Returns an AlarmThresholdCmdTarget object type for the alarm threshold management.

Parameter Description

lpszName As String Name of threshold to be retrieved.

Result Object

If Function has been executed successfully it will retrieve an object of type AlarmThresholdCmdTarget if otherwise Nothing is returned.

Example:

Public Sub AlarmLoading()

Dim objAlarm As AlarmCmdTarget

Dim objThreshold As AlarmThresholdCmdTarget Set objAlarm = GetAlarmObject

Set objThreshold = objAlarm.GetAlarmThreshold("High") Debug.Print objThreshold.BackColor

Set objThreshold = Nothing Set objAlarm = Nothing End Sub