Welcome_all

Home > Welcome

>> Help for Asix

www.asix.com.pl

User's Guide for Asix.Evo

Doc. No ENH10E019

Version: 2020-10-08


Welcome

Home > Getting Started

>> Help for Asix

www.asix.com.pl

Asix.Evo - Getting Started


1. Introduction

The AsixEvo.exe program is a module which extends the Asix package functionality - making it a new version: Asix.Evo. The new functionality introduced in the Asix.Evo mainly involves:

a) A completely new visualization of the process state, including a new environment for the application development.

b) New technology of Internet applications which allows obtaining identical functionality as in the case of window applications. The application conversion into HTML format is not required.

c) A modernized system for alarm management.

The applications developed in the Asix.Evo technology use the components of the standard Asix package in the scope of real-time data reading, recording and reading the process data archive and communication with the workstations running Asix standard applications. The Asix.Evo applications can be also integrated with the AsBase and AsTrend programs.

Further on in the documentation, all the information which directly relates to the components constituting the standard Asix package will be indicated by the Asix expression.


1.2. Installation

Home > Getting Started > 1. Introduction > 1.1. Installation

1.1. Installation

The AsixEvo is installed as part of the Asix package standard installer. Generally, full package should be installed - including all the classic Asix components.

The installation may be limited only to the Evo components, only if:

a) the workstation acts only as an Internet Server;

b) the workstation is of a terminal type which loads data from the Asix.Evo server stations only via network, and the AsTrend and AsBase programs are not used in the application.


2. First Application

In this section, the complete process of developing and starting the very simple Asix.Evo application is presented. The purpose of this application is to display a single window in which the current time will be displayed.


2.1. Developing a New Application

After the program Asix.Evo is run, execute the NewApplication ... command from the File menu. The dialogue window shown below will be displayed, in which the directory name where the configuration files will be stored should be specified.

zoom in

Fig. The Application Directory Selection Window.

In the case of the Asix.Evo application, virtually all the used files are located in two directories. The configuration files are stored in the directory (and its subdirectories) specified in the window above. The work files (e.g. archives, log files) are stored in the working directory whose name is created automatically. In this case it would be the c:\asixevo\clock_work. name. The working directory location can be changed in the Stations Settings.

When the application is created the application subcomponents tree is shown in the Application Explorer panel (View menu> Application Explorer). The component edit panels can be accessed via this panel, usually by double clicking on the item of the explorer tree.

NOTE:

The working window appearance may differ from the one shown in the reference illustrations. The window appearance, panel locations and types, toolbars can be parameterized using the commands of the View menu and by drag and drop methods.

Fig. The Asix.Evo.exe Program Main Window.


2.2. Clock Diagram Edition

The first step of the application development process is to create the diagram on which the object showing current time will be placed. To do this, click on the Diagrams item of the Application Explorer and choose the Create Diagram command from the context menu. The following illustration shows the Asix.Evo application window in which, in the central panel, the diagram is displayed in the edit mode. In the properties panel, the values of all properties describing the diagram parameters are shown. The Properties panel is a key component used when editing diagrams and windows. In the case described, the diagram name has been already changed into Clock, as well as the diagram background colour and the Fixed Sizes property.

Fig. The Diagram Editing Window.

The background colour was changed using the special colour selection window which is opened with the button shown below, in the edit field of the Background Color property.

Fig. The Diagram Background Colour Selection Option.

An available buttons set may differ depending on the type of property.

When the application is in the run mode, the diagram size will automatically adjust to the window size in which it will be displayed, if the Fixed Sizes property is set to False property. The value of property of True/False type may be rapidly changed by double-clicking on the area of values.

The next step is to place the object of Text type on the diagram, which will display the current date and time. To do this:

  1. Activate the Tools panel. (View menu > Tools)

  2. Drop down the Objects section of the toolbox.

  3. Select the object of Text type by clicking on it.

  4. Using the mouse select an area of the diagram in which the current time is to be displayed.

The following illustration shows the program window appearance after executing these steps.

Fig. The Diagram Editing Window - After Inserting the Text Object.

The Text object is not displaying anything yet. To change it, find the Text property of the object in the Properties panel.

Fig. The Text Object - Defining the Content.

Using the last button open the process variable selection window.

Fig. The Variable Selection Window.

At this stage, only a predefined set of system variables describing the internal state of the application is available. These variables do not need to be defined. Moreover, these variables may be used the same way as the process variables loaded from the PLCs and meters. The DateTime variable whose value is always equal to the current time should be chosen.

The effect of these operations is shown in the next illustration. The Color and FontStyle properties have also been changed. The values of the changed properties are displayed in bold.

In the Text property field, the &DateTime value is available. The & symbol is a short notation denoting reference to the process variable value placed after the & symbol (the other methods of reference to the variable values are described in the following sections of the documentation). Since the variable value is of DateTime type (not to confuse with the variable name), the object automatically formats the text displayed according to the system date and time settings (the method of explicit formatting will be described in the following sections).

Fig. The Diagram Editing Window - When the Text Object Parameterization Has Been Completed.


2.3. Editing Start-up Window

The next step is to create the window in which the Clock diagram will be displayed. This window will be automatically opened at the start-up of the application in the application mode.

In the Asix.Evo system, the diagrams illustrating the process status are always displayed within the window. The windows are Windows system objects and exhibit typical properties of this operating system, e.g. a header line, menu and frame. Diagrams are displayed in a window, inside the so-called panels. Each application has at least one window defined.

A new window is created with the Create Window command from the Windows component context menu of the Application Explorer tree. Then change the window name in the Window Name property and set the window size. Setting of the window size is very important, because it is the actual size of the window displayed when the application is run.

The effect can be seen in the following illustration.

Fig. The Application Window Editing Panel.

The next step is to add a panel to the window. In our application, a single panel covering the entire window area will be sufficient. To do this, the following should be executed:

  1. Execute the Add Panel command from the context menu of the window.

  2. Set the panel dock mode to Fill. (Double-clicking on the Dock Style property field sequentially switches available values).

  3. Set the Default Diagram property to Clock. This property specifies which diagram will be displayed in the panel at the window opening. During further runtime of the application it is possible to place additional diagrams on the panel.

The effect of these operations is shown below.

Fig. The Application Window Editing Panel - the View with the Panel Inserted.


2.4. Setting Start-up Parameters

The next step is to set the application start-up window. First, double click on the Stations Settings component to open the editing panel for the application settings linked to the active workstation. In addition, choose the Stations panel display (the View menu > Stations).

Fig. Workstation Settings.

When the application creation is completed, a single workstation of name compatible with the computer name located in the area called SERVERS is also created. Naturally, more workstations can be created, but in this case this is not necessary. Hierarchy inheritance of settings takes place. The settings are copied to the workstation from the parent area, unless they were explicitly redefined. By clicking on the workstation tree nodes, switching to the edit mode of settings for the chosen workstation or area may be performed.

On the lower status bar, the selected workstation/area name whose parameters are being edited is displayed. Whereas in the header line, the workstation name in the context of which the program is currently running is displayed. It is not related to edition of parameters at all. If it was not set in another way, the default workstation is the workstation whose name is compatible with the PC system name.

Please note that optional settings relate only to the parameters of Stations Settings, Channels and Archives panels. Most of the other components of the application are common to all the workstations (e.g. masks and windows). Some components have their own system of variant settings.

In the case of our application, the only setting that has to be changed is selecting the Clock window as the window which opens at the start of the application.


2.5. Security Settings

The last task is to complete the security settings parameterization. When the Security node in the tree of Application Explorer components is double-clicked, the security edit panel will be displayed.

Fig. Edit Panel of Security Settings.

Along with the application, the Administrator user with full permissions set was created. It is recommended to set the user login password now; when the user is created, the password is blank.

In the real applications, generally it will be necessary to create users of lover authority level.

The application is now ready. Still, using the Save ... command from the File menu, all the performed parameterizations need to be saved.


2.6. Creating a Shortcut

The next step is to create the application launching shortcut. The easiest way to do this is to use the wizard window opened with the Schortcuts Builder ... command from the Tools menu.

Fig. Shortcut Wizard Window.

When the settings are shown, after pressing the Create button, the application shortcut will be created on a desktop.

The Asix.Evo application may be closed now.


2.7. Starting the Application

Starting the application with the shortcut opens the created window.

Fig. The Window of the Application Being Started.

The window may be freely moved and scaled. The diagram object adjusts to the window resizing. The window, however, can not be closed. This results from the fact that no user is logged in. In the Asix.Evo applications, the user is provided with the interface created entirely by the designer. No other additional windows are displayed. The only element of the interface, which is automatically added to each application, is support of the Ctrl-Shift-F1 key combination. Using this key combination displays the 'Control Panel' window.

Fig. Control Panel Window.

This window allows performing the basic administrative operations. After login as the Administrator, it will be possible to close the application.


2.8. Running the Application in the Browser Mode

The first step in the application initialisation process in the browser version is to create a new workstation, in the context of which all the application instances will be started on client computers. To do this, in the Stations work panel, the New station.... command should be selected from the context menu of the SERWERY node. The following dialogue window will be displayed.

Figure. Window to Create a New Workstation.

Specify the workstation name and in the Station type field, select the WWW Terminal type. A new workstation in the SERVERS area will be created. It will inherit the settings from this area. In our example, nothing else has to be parameterized, however, in more complex cases, e.g. an adequate parameterization of communication channels and archives would be required.

The next step is to publish the Asix.Evo application on the IIS Web Server. A prerequisite is to install and adequately configure the IIS server - to do this, it is recommended to use the Asix.Evo package installation program. The Publish ... commend from the File menu is used to publish the application. In the following illustration, an example parameterization of the publishing process is shown.

Fig. The Application Publication Window.

The most important options are: Published Application name (used later as part of WWW address) and Terminal name, which must be the name of the WWW Terminal type workstation created previously.

When the publication operation is completed, the application is available. After the browser is launched, specify the Asix.Evo application address in the form of localhost\evonet\clock. The localhost should be replaced with a computer name or IP address.

NOTE:

If a demo version is used or if there is no valid Asix4Internet license, the access to the application will be only possible on a computer that is running the IIS server.

The illustration below shows the diagram of our application in the Internet Explorer browser.

Fig. The Application Window in the IE Browser.


3. Application Supporting Actual Data Handling

The next application will be responsible for presenting the current and archive values for two real measured variables. The complete application framework with switchable synoptic diagrams will be created. The complete application development cycle will be shown, starting from the creation of a new application, through measured variable database creation, communication channels and archives definition, to the creation of visual part. In the further part of the section, the conversion of single workstation application into a network application, consisting of a server and terminal workstation will be shown.

The application will be displaying values of two measurements, each on a separate diagram. The measurement value will be displayed on a virtual gauge in the form of text. In addition, a chart showing the history of measured value changes will be displayed. The application will feature a simple menu that allows switching the diagrams being displayed.


3.1. Creating Application with Wizard

In this case, a new application will be created using the wizard. This is the recommended method. The wizard is started using the New Application - creator command from the File menu. When the application is created, the wizard allows generating its framework and pre-set a lot of parameters necessary for operation.


3.1.1. Application Location and Languages Selection

The first tab of the wizard allows specifying the directory where the application definition files will be stored. If necessary, it is also possible to specify the directory where work files will be stored: archives, logs, etc.

It is also possible to specify languages of the application. A single language option is set by the default, and this language is in accordance with the operating system settings.

Fig. The Application Wizard - 'Application' Tab.


3.1.2. Application Template

This tab allows generating the application framework: the initial set of windows, diagrams and graphic symbols.

Fig. The Application Wizard - 'Model' Tab.

One of the variants proposed may be selected, but in the case of our application, the blank application variant will be selected. The application will be created from scratch.


3.1.3. Workstation Configuration

The Stations tab allows creating the selected set of workstations adjusted to the application requirements.

Fig. The Application Wizard - 'Stations' Tab.

Generally, the wizard creates single workstation with a name compatible with the name of the computer on which the application is created. In addition, several workstations of various profiles may be added. These workstations are generally designated to execute the application. If it is required to create more workstations, this should be done after closing the wizard in the work panel.

In our case, in addition to the edit workstation, only one additional operator workstation is created. In the following part of the example, a manual method of adding a terminal type workstation will be described.


3.1.4. Specifying the Method of Process Data Collection

In the Asix.Evo applications, access to the process, archive and current data is achieved using one of the three strategies:

a. Access via the Data Server

The basic data readout mode. The data server is a software module that internally runs the standard Asmen, Aspad and Aslink modules known from the older versions of the package. This allows using all the existing communication drivers of the Asix package for data readout from physical devices. Two-way data exchange with independent workstations running the old type Asix applications, via the Aslink network connections, is also possible.

b. Direct Connection Access to the Local Asix Application

Rarely used mode which allows accessing data via the old type Asix application run on the same computer. The typical case, is to run the Asix.Evo server as a data source for a browser application.

c. Network Access via ASIX.EVO Mechanisms

The mode used at the window terminal and WWW workstations - the workstation loads data from the Asix.Evo server, none of data server components are used.

Fig. The Application Wizard - 'Data Server' Tab.

In our application, the Asix Data Server will be used to access data. To configure the server, the Create New Data Server configuration file button should be used. This will run the Architect application in the wizard mode of the Asix.Evo application.

The Architect application is also used to configure the old type application of Asix. The detailed description of its usage is included in a separate manual.

See: Asix_Classic_Architect (PDF/CHM)

In the wizard mode of the Asix.Evo application the below window is displayed.

Fig. The Data Server Wizard of the Asix System.

The key element here is the Resources tab. It is used to create the process data archive and to configure the communication channels. In the Name of data archive in the network field, enter the Archiwum name. Then, add the communication channel called Measur__s. If an access to the controller is available, select the relevant communication driver. If not, choose the None type driver. This enables data simulation. In the case of real drivers, it is recommended to use the Edit Options button to configure the driver operation parameters.

At the wizard window close, the Architect application opens the process variable definition database edit panel.

Fig. The Process Variables Definition Editor.

Each process variable is defined with a set of attributes. Initially, only the basic set is displayed. With the [image] button located on the left side of the column headers line, displaying of additional attributes may be enabled. Because the LimitHiHi (critical maximum) attribute will be required in the application, it must be disabled now.

Two variables named Pomiar1 and Pomiar2 will be used in the application. With the toolbar '+' button, the two variables may be added successively. Their definition should be consistent with the table below.

Table: Example of the Process Variables Declaration.

 | Measurement1 | Measurement2
Name | Measurement1 | Measurement2
Description | Measurement no. 1 | Measurement no. 2
Channel | Measur__s | Measur__s
ElementsCount | 1 | 1
SampleRate | 1 | 1
Archive | Archive30 | Archive30
ArchivingParameters | D,1s,,1s | D,1s,,1s
ConversionFunction | NOTHING | NOTHING
LimitHiHi | 80 | 50

Note:

If the variables of similar definition are to be created, it is recommended to use the Insert copy of variable definition command from the context menu of the variable definition database editor.

If, while creating the Measur__s channel the driver different than the None was selected, it will be necessary to specify the variable address in the controller, under the Address attribute. The addressing method depends on the selected driver and is described in its documentation.

When the variables definition is completed, close the Architect application and return to the Asix.Evo application wizard.

There is the wizard window after Architect program exit.

Fig. Application wizard - 'Data Server' tab - after the Architect program exit.

The window has been supplemented with the name of the data server configuration file and the links between the Evo application stations and the data server variants have been set. Due to the fact that we created a new data server configuration file, the server variants were automatically created in accordance with the configuration of the Evo application stations. If we used an existing data server file (eg from an application created in a previous version of the program), then we would do the link manually in case of incompatibility of station and variant names.


3.1.5. Process Variable Database Declaration

The next wizard tab applies to the variable database configuration. The variable definition databases are the key components of each application. The application should have at least one variable database. Asix.Evo uses three formats of variable databases:

  1. Variable databases in the XML format

  2. Variable databases in the MDB format, also used in the older versions of the Asix system

  3. Variable databases stored in SQL databases, also used in earlier versions of the package

In practice, the XML databases are only used to define the so called virtual variables used in the application, which values ​​are calculated using internal calculations e.g. scripts.

Fig. The Application Wizard - 'Variable Bases' Tab.

As a result of the steps executed previously in the wizard, the variable database created using the Architect application is already selected.

At this stage it is possible to create a new XML type database or to add the other MDB databases created previously. However, in the case of our example application it is not necessary.


3.1.6. Data Source Configuration

The Data Sources tab allows pre-configuring the communication channels and archives.

Fig. The Application Wizard - 'Data Sources' Tab.

The settings shown are usually optimal. The wizard will read the contents of the variable definition databases selected previously and on its bases, the wizard will create all the required channels and archives of the application. The Asix type drivers and archives will be enabled on the server workstations (with local archiving and physical access to the drivers). The terminal workstation configuration will be set to collect current and historical data form servers.


3.1.7. Alarm System Parameterization

An alarm domain name can be set in the Alarms tab. An alarm domain clearly identifies the alarm set, i.e. alarm archives, alarm definitions and detection strategies. This is the equivalent of the alarm container name in the older Asix applications.

Fig. The Application Wizard - 'Alarms' Tab.

As opposed to the older Asix system applications, a workstation in the Asix.Evo type applications may operate simultaneously in several alarm domains. Adding subsequent domains and setting the other parameters of the alarm system may be performed later in the work panel of the alarm system parameterization.

However, in our example, an alarm domain will not be created now. The manual configuration method of such domain will be shown later.


3.1.8. Other Settings

Fig. The Application Wizard - 'Other settings' Tab.

The last tab allows copying predefined object templates, images and sounds to the application directory. This can be also done later using the selective import function from relevant work panels.

Because the standard components will not be used, all import functions will be disabled.


3.2. Configuration Overview

The application is preconfigured. Let's have a look at the settings defined by the wizard.

Select the Stations panel (if it was not open, use the Stations command from the View menu). The current hierarchy of workstations is shown in the panel: our workstation and the additional OP_STATION_1. Operator workstation is located in the Servers area. The application parameter settings are hierarchical. This means that the settings defined in the SERVERS area are also valid on the secondary workstations, provided that they will not be changed there.

Select the SERWERS node, and switch to the Application Explorer panel (if it was not open, use the Application Explorer command from the View menu).

Double-click on the Global Settings node and in the open work panel select the Communication tab. The displayed table contains the data describing roles performed by individual workstations in the application. In particular, the address of a workstation is important. For server workstations, the correct IP address or the computer system name should be specified. If the workstation and computer names are the same, the address may be left blank.

Select the Stations Settings node and open the Data Sources tab. Note that the AsixVarbase variable database was selected as an active database loaded along with the application initialisation. Switch to the Data Sources tab. The operation mode using the server data is selected in the Source of process data settings box - typical operation mode in the case of the direct readout of data from drivers. To change the configuration of communication channels and archives, or to modify the variable definition database contents, the Architect program can be restarted using the [image] button.

The data server is activated at the moment of wizard closing. The server icon can be found in the system taskbar.

Drop down the Variable Definitions node in the Application Explorer panel. Open the variable browsing panel by clicking on the AsixVarbase database node. A variables definitions previously entered into a database in the Architect program should be shown in the open panel. In the case of the XML type databases, the direct variable editing would be possible. In case of the MDB databases, it is only possible to view the database. The MDB databases are only created via the Architect program.

Using the Channels node of the Explorer panel, open the channel configuration work panel.

Fig. The Channel Configuration Work Panel.

On the Channels list, the Measur__s channel is located which was previously used when defining variables in the Architect program. To each channel, the driver responsible for collecting the variable values is linked. If the data server channels are used, always use the Asix type channel. The communication driver real type results from the definitions stored in the data server configuration.

Using the Archives node of the Application Explorer panel, open the channel configuration work panel.

Fig. The Work Panel for Configuration of Archives.

As in the case of the channels, always choose Asix as an archive type for the archives created by the Aspad module embedded in the data server.


3.3. Communication Test - Variable Preview Panel

Before proceeding to the creation of the application visual part, let's have a look at the variable preview panel. The preview panel should be already opened. If necessary, it can be opened with the Variable Preview command from the View menu.

The variable preview panel is a tool supporting the application development process. Its two basic functions are:

  • Testing communication with controllers and checking the correctness of variable addressing in situation, when the application visual part has not been created yet.

  • Data simulation, when the connection with controllers is not possible, or the controller application is not ready yet.

In our application, the preview panel will be used to simulate the data.

Fig. The Variable Preview Panel.

Extend the panel with displaying the both process variables. The current variable value will be monitored immediately after adding it to the panel. If the None driver is used, the values ​​will be equal to zero. If the other driver is used, the values should be the values read from the controller.

In the Value Editor column, the new value enter mode may be selected. Because the automatic data simulation is needed, choose the Generator Mode. Then, in the right section of the panel, set the simulation parameters to obtain the variable trend within the range of approximately 0 to 100. When the parameters are defined, the simulation process should be initiated with the [image] button.


3.4. Creating Application Windows and Diagrams

After creating the application, the process variables, defining communication channels and archives, it is possible to start the development of the application visual part.


3.4.1. Creating Window

The application main window is created by double-clicking on the Windows component of the Application Explorer panel. In the properties panel, change the window name to the Start, enter the window title, and resize the window using the mouse. The new size can be also specified in the Width and Height properties. Then, using the window context menu add two panels in which synoptic charts will be displayed. Name the first panel as Menu and the Dock Style set to Top. Name the second panel as Info and set the Dock Style to Fill. The effect of these operations is presented on the illustration.

Fig. Editing the Application Window - Panel Declarations.

Please take a note of how the panels adjust to the window being resized.

Fig. The Parameters of the Application Window Size.

In the lower corner of the application window, the actual panel size can be seen. This information is useful when creating charts.


3.4.2. Creating Diagrams

The next step is to create two diagrams. By double clicking on the Diagrams component of the Application Explorer panel, the two diagrams are created: Menu and Measurement. It is recommended to set the diagrams size according to the Menu and Info panel sizes. This will allow editing the diagrams in the size in which they will be displayed. If the edit sizes of diagrams are not be compatible with the panels sizes, then the display method will depend on the Fixed Size property of the diagram. If the False value is selected (e.g. by double clicking within the value field), the diagrams will be adequately scaled. The diagram background colour or a picture (wallpaper) displayed in the background can be selected as well.

Let's start with the Menu diagram edition. Select the Button object in the Tools panel, and then select the area on the diagram where the button is to be located. The aim is to obtain the diagram shown in the illustration.

zoom in

Fig. Editing Diagram - Adding the Button Object.

It is possible to customize the object appearance to suit to the user requirements by changing the properties responsible for the type, shape and colour. The object in the illustration has the Standard Windows Button type selected, and the text padding is set to 20%. In addition, it is recommended to change the Cursor property to the Hand. This will cause that during the application runtime, the mouse cursor will change the shape when it hovers over a button. The The End text should be entered under the Off Text property in the object State Properties group.

The object function is to close the application. To do this, enter the Terminate Action call in the Button On event handling.

zoom in

Fig. The Edit Window of Button Properties - Declaration of Action.

After opening the edit window of properties from the Actions/Application Control menu, select the Terminate Action. This will cause entering the operator action contents into the edit field. The ^ symbol is a prefix which means that property definition is the operator action contents.

Now it is possible to move to the edition of the Measurement diagram. First, place on the diagram two Text type objects, one Gauge object and one Chart object.

Fig. The Diagram Edition - Adding the Objects: Gauge and Chart.

The diagram should look similar to the diagram shown above. The Text objects do not display any information yet.

The Text object, located at the top of the diagram, will display the measurement variable description loaded from the process variable database. In the Main Variable property field, use the '+' button. In the variable selection window, select the Measurement1 variable. Then, in the Text property field, enter the @ symbol to begin the property edition process. The @ symbol is a reference to a process variable attribute. The list of all attributes will be displayed; select the Description attribute. As a result, the Text property should take the @Description value, which means that the Description (the variable description) attribute contents will be displayed for the object main variable. When edition is completed, the variable description should be displayed on the diagram.

In the Gauge object set the Main Variable property to the Measurement1 property, and in the Value property field enter the # symbol. It is the reference to the object main variable value. The gauge pointer should move according to the current Measurement variable value read out from the controller or set via the Variable Preview panel.

In the second Text object, set the Main Variable property to the Measurement1 value, set the # symbol in the Tekst property field and change Vertical Align to Center. When the changes are introduced, the object will show the current value of controlled variable.

In the Chart object set the Main Variable property to the Measurement1 value. The object has one pre-established measurement series. Find the section of measurement series in the properties panel, drop down the first series, and in the Variable Name property enter the @Name value.

Fig. The Chart Object Parameterization - Measurement Series Definition.

This is the reference to the Name attribute of the main variable, i.e., in practice, to the main variable name. The alternative parameterization method is to specify the variable name in the Series properties directly, without entering the main variable name.

After performing the above operations, the shown below final form of the diagram is achieved.

Fig. Result of the Diagram Edition.

To complete the procedure, the last configurations must be done. Let's return to the window Start parameterization. In the Menu and Info panel settings, set the Default Diagram property to Menu and Measurement respectively. In the Application Explorer panel, select the Stations Settings and in the Startup options tab select the Start window as the application start window.

Now it is possible to perform a test of the application. The first variant is to create the application shortcut using the shortcut wizard. The easier method (but only applicable to a simplified test) is to select the Start window edit panel and select the Running/Run command from the window edit toolbar. As a result of the window opening, the effect similar to the one presented in the following illustration should be achieved.

Fig. The Diagram Preview.


3.4.3. Signalling Exceeded Limits

The next step in developing the application is to add signalling if the upper limit values are exceeded. The limit value was specified previously in the variable database under the LimitHiHi attribute (critical maximum).

A Gauge object has a built-in mechanism for setting the measurement correctness ranges on a scale. In the first step, enable alarm activation limits by setting the Show Limits property to True. To complete the procedure, the ranges must be set. Because only the critical maximum limit is to be shown, the Value LL and Value L properties should be set to 0, and the Value H and Value HH should be set to @LimitHiHi. As a result, the range from 0 to the LimitHiHi attribute value (critical maximum) will be treated as the standard value range ​- the tag in the colour of the Proper Value Color property will be drawn on the scale. The range above the critical maximum of the controlled variable will be indicate by the colour specified in the HH Color property. In addition to tagging the ranges on the gauge scale, the pointer colour will be changed depending on the current measurement value. To do this, enter the expression shown in the illustration below under the Pointer Color property.

Fig. Declaration of the Expression Changing a Gauge Pointer Colour Depending on a Process Variable Value.

The expression has the form of the arithmetic expression: condition?value_if_true: value_if_false . The interpretation of the expression is as follows: if the Variable () main variable value is greater than the critical limit of the (Attribute (LimitHiHi)) main variable, use the Red colour, otherwise use the Black colour.

As the result, the gauge form shown below should be obtained.

zoom in

Fig. The Gauge Object with the Colour Change Declared Depending on the Process Variable Value.

Let's now move to the Text object which shows a variable value. In addition to alarm activation limits, we also want to handle the variable readout errors in a special way. The text displaying colour is set using the Color property, which is located in the State Properties group. The expression similar to the one used in the gauge object could be used, however, in this case the state property mechanism will be used.

In the property panel, select the State Properties line, and then use the '+' button located at the top of the panel. This will add a new state, the additional group of the properties designated as State [1]{} will appear in the panel. In the state group, the identical set of properties, as in the so called basic group, and one additional State Condition property are included.

zoom in

Fig. Declaration of the Text Object Colour Change Depending on a Process Variable Value.

Enter the =Variable()>Attribute (LimitHiHi) expression as the state condition. The Color property set to Red. The state condition takes the true value, when the main variable value exceeds the critical maximum. From this moment, all the settings defined explicitly in the group (in our case, the Color property) will take precedence over all the settings in the previous groups - when the limit is exceeded, the variable value is displayed in red.

Add the subsequent state to the object, the state condition is set to =VarIsNotGood(), the Text property to No Datum, and the Color property to Yellow. As a result, when the main variable status is incorrect, instead of the variable value, the No Datum text will be displayed in yellow. It should be noted that, when the both additional states are active, the Color property definition in the last state group will take precedence.


3.4.4. Adding Diagram Parameters

Now, the final visual form of the Measurement diagram was achieved. However, the aim is to show the two measurements. Of course the copy of the Measurement diagram may be done as well as all references to the Measurement1 variable may be replaced with the references to the Measurement2 variable. Since the two diagrams have to look identically, the better solution is to use the parameterized diagram mechanism. There will be only one diagram used to display any number of variables. In an event of any subsequent changes, only one diagram will have to be modified.

The procedure starts from adding a parameter. Click within the diagram area outside the object outlines. The diagram parameters will be shown in the property panel. Select the Parameters line, and then with the '+' button add the parameter and define it according to the following illustration.

Fig. The Diagram Parameter Declaration.

In the next step, select all diagram objects. In the properties panel, the properties common to all the four diagram objects will be only shown.

Fig. The Common Properties for Objects.

Change the Main Variable property to the %Variable property. The prefix % is the reference to the diagram parameter. Because the objects were parameterized in a way ensuring that the variable name will appear only in the Main Variable property, so after changing the definition, the objects are fully switched to show the variable specified under the diagram parameter. The diagram appearance and functioning should not change, the parameters default value is equal to Measurement1, i.e. the same data are still shown.

Let's return to the Menu diagram edition. Two buttons for switching the diagrams will be added. Because we want to keep a uniform style, select the The End button and press twice the ctrl-d keys to create two copies of the object. Modify the On Text property of the two new objects. Also, change the actions specified in the Button On event handling. The action for the first button should look as follow:

^OpenWindow(null,Info,Measurement,"Variable=Measurement1")

The action Interpretation is as follows: in the current (null) window in the Info panel open the Measurement diagram by setting the Variable parameter value to Measurement1.

Analogically, modify the action for the second button.

The application is ready, it can be run in full or test mode. The effect should look similar to the one shown below.

Please note how the objects adjust to the parameters loaded from the variable definition database (variable range and description).

zoom in

Fig. The View of Diagram with the Possibility of Switching Between Options for Two Variables.


3.4.5. Entering Templates

We will make one more change in the application. Moreover, we want to show a collective diagram with all measurements. Only a gauge and numeric measurement value will be shown on this diagram. Because each measurement has to look identically, but we do not want to copy objects repeatedly, we use the template mechanism.

Let's start editing the Measurement diagram, select the gauge objects and the measurement value, and then press the ctrl-p keys. This will result in creating a complex template from the selected objects.

zoom in

Fig. Object Composition Template: Gauge and Text.

In the properties panel, change the template name to MeasurementTemplate. It can be noted that the template has already automatically added parameter. This follows from the fact that the diagram from which the objects were loaded, had also such a parameter. Although it is not necessary, remove this parameter (with the - button), and then create a new one with a different name. Select all the template objects with the Ctrl-a keys. In the properties panel, change the main variable name to %WVariable. Because this parameter does not exist yet, the application will ask whether to create one, set the default value to Measurement1 and confirm the parameter creation. To complete the procedure, save the template to a file (e.g. with the Save command from the context menu of the Template TemplateMeasurement tab).

Let's return to the Measurement diagram editing. Remove the gauge objects and the measurement values, replace them with a template. In the Tools panel, select the Templates tab, select the MeasurementTemplate template, and within the diagram area show the template location place. After clicking on any fragment of the embedded template, it can be noted in the properties panel that only the embedment properties can be changed, the objects located inside the template cannot be accessed. To end the procedure, set the parameter value of the WVariable template. In the edit field enter %Variable. This will result in transmitting from the template object (through the WVariable parameter) the measurement variable name from the diagram Variable parameter. After change, the diagram should function identically as the previous version.

Now we will create the new diagram called All. Insert into the diagram two instances of the TemplateMeasurement template. As the WVariable parameter value specify the Measurement2 and Measurement1 variable names respectively. In the Info panel properties of the Start window, set the All diagram as the default diagram. Finally, add one more button which will execute the ^OpenWindow(null,Info,All,null) action to the Menu diagram.

In the run mode, the application should look similar to the one shown below.

zoom in

Fig. The Diagram Edition - Effect of Object Replication Using a Template.

Let's try again to check how the application is function after changing a template. In the template, move the measurement text value to available space within the gauge area. After saving the template all diagrams automatically adjust to its new form.


3.5. Adding Terminal Workstation

When creating our application, only a single workstation was created. This is sufficient in the case of simple applications which run on a single computer. However, now we will upgrade the project to network version, in which a single computer is a data server for the group of terminal workstations.

The workstation which was used until now, will act as the server. To set this, it is sufficient to create an additional terminal workstation. Open the Stations panel and in the context menu create a new workstation in the TERMINALS area using the New station command.

Fig. Creating a New Terminal Workstation.

It is important to set the workstation type to Terminal in the Communication settings box.

The workstation has been created. To complete the procedure, several settings, in particular the archives and communication channels handling method need to be configured. Let's start from the Communication tab in the Global Settings panel.

Fig. Global Settings for a Workstation.

All the parameters should be already set correctly. But the following settings need to be verified:

  1. Is the workstation type set correctly? For the workstation that will be sharing data, the Server type must be selected.

  2. Are the correct values inserted in the Station Address column? This address is used to locate the workstation in the network. In the case of a server, it must be a system computer name or its IP address. This parameter is not relevant to the terminal workstations. The terminals are never directly addressed. Moreover, in the context of the terminal workstation, any number of computers may be run.

The panel shows the TCP port number that will be used for communication between the workstations. It is important to enable this port in the system firewall.

Now, switch to the Stations panel and select the TERMINALS area. All the further settings will be specified for this area. The Terminal workstation will inherit all the settings due to the assignment to the area.

Choose the Stations Settings panel and make the following changes in the configuration:

  1. In the Startup options tab select the Start window as the application start window.

  2. In the Variable sources tab select the AsixVarbase database as an active database.

  3. In the Data sources tab, in the Source of process data settings box select Do not use.

  4. In the Security tab, select the Administrator user as the default user. This setting will facilitate the test application handling. Standard utility application should have a fully configured security system with added user login interface.

The next step is the correct parameterization of communication channels. In the Application Explorer panel, select the Channels node.

Fig. Parameterization of Communication Channels for a Terminal Workstation.

In the left section of the Channels panel, a list of all the application communication channels is located. In the right section, the communication drivers associated with a selected channel are shown. The association applies to the workstation/area selected in the Stations panel. The currently selected workstation/area is also displayed in the description of the Channels tab panel as well as in the status bar of the application main window. In the TERMINALS area context, add the Network type communication channel (provided that such a driver has not been already added) to the MEASUR__S channel. It is executed with the navigation bar '+' button, located at the bottom of the channels section. Setting the Stations property is very important element of driver parameters. This is a list of server-type stations from which the terminal workstation will be able to load data. Select the name of the application single server workstation.

Similarly, the historical data readout method in the Archives panel has to be set.

Fig. Archives Parameterization for the Terminal Workstation.

Select the network type archive, and select the server workstation as the data readout source.

The configuration of terminal workstations has been completed. The functional test may be started now. To do this, run the server workstation and one or several terminal workstations. It needs to be noted that when creating a start-up shortcuts for the terminal workstations, the Start as option should be set to the Terminal version in the wizard.

When the applications runs in a network configuration, the system status can be controlled via the Connections panel available from the Application Explorer panel - the Diagnostics/Connections node.

Fig. Preview Panel for Active Connections of the Workstation.

In the panel, all the active connections and basic information on individual workstations can be seen.


4. Application with Alarm Handling

In this section, our previous application will be upgraded with the alarm event handling. The section describes the alarm system parameterization (alarm definitions and strategies), and adding the visual elements used to the presentation of the alarm states into the application.


4.1. Alarm System Parameterization

In the Application Explorer panel, select the Alarms System node and open the panel of the alarm system configuration.

Fig. The Panel of Alarm System Configuration.

The panel consists of two sections. In the left one, the list of so-called alarm domains is located. The right section is used for system parameterization for the selected domain.

First, add (using the '+' button) the domain called AlarmsDemo. Each of the alarm domain is a sort of separate alarm system. The domains are completely independent of each other. In a typical application it is sufficient to establish a single domain. Adding additional domains is useful only if we want to combine alarms form several completely independent installations in one application.

After creating a domain, determine the role for each individual workstation to be performed in the alarm system. Each of the domain requires at least one Controller. This is the workstation which coordinates the operation of all the other workstations. The Controller should operate 24 hours a day, and in terms of communication must be the Server type workstation. It is possible to have several controllers. Generally, this applies to the configurations with redundant pair of operator workstations. The workstations assigned to the Terminal role have all the functions related to the operator tasks and viewing the alarms. However, they can not operate independently. The information about detected alarms, they receive from the controller workstations. In our demo application, the server workstation will act as a controller and the Terminal workstation will be assigned to the terminal role.

The next step is to determine which strategies of alarm detection will be used in the application. The strategy is similar solution to communication channels, but relates to alarm detection process. Its task is to control the alarm statuses and to provide the information on events of the alarm beginning and end. Several types of strategies detecting alarms via various methods are available. In each domain, any number of the alarm strategies, also of the same type, can be configured.

Select the Strategies tab and with the '+' button create the new strategy called Conditions.

Fig. The Alarm Strategy Declaration.

Select the Conditional type for the strategy. The conditional strategy detects alarms based on the occurrence of freely defined logical conditions. The conditions will be determined while the alarm database is defined.

In the Controllers property, the list of all domain controllers at which the strategy can be run should be specified. Typically, the list of all controllers is specified. The list can be limited, if the strategy operational specification (mainly the communication conditions) determines that some controller workstations should not run the specific strategy. When the application is in run mode, the strategy can not be performed on more then one workstation simultaneously.

Now, in the Alarms tab, define two alarms which will be used in the application. This is presented in the following illustration.

Fig. Alarm Declaration.

Each alarm has a unique (within the domain) ID. The basic properties of an alarm are: Strategy and Detection parameters. In the Strategy property, indicate one of the alarm detection strategies defined previously. The Detection parameters property format depends on the selected strategy type. For the condition strategy it is a boolean type arithmetic expression. The change of the expression value from the false to true, indicates on alarm beginning events. The Asix6Limit function, used in the example, compares the value of the selected variable with the value of the attribute selected. The function interprets the limit attribute in several ways: it may be a numerical limit or variable name, value of which is determined by the limit. If a large number of alarms needs to be defined, instead of manual edition, an import from the Excel application files can be used. The import functions are available from the Sources tab.

Let's switch to the Settings, History, Alerter tabs which are used to specify the other parameters of the alarm system operation.

Fig. Settings/History/Alerter Parameters of the Alarm System Operation.

In the Finished alarms removing box, determine the active alarm log response on the event of an alarm end detection. In our configuration, an alarm terminated will be stored in the log for another 5 minutes or until it is confirmed. Immediate removal can be also set, but then the short duration alarms may not be noticed by the operator.

The alarm event archiving method is specified in the Historical alarms box. Two historical alarm logs can be used in the application. The first one, controlled by the Write historical logs file option, is the basic archive used for handling the alarms. The SQL type archives are optional. They are created only for the AsAlarm application and the Reporting System.

Save all the changes. From this moment, the alarm system should operate.


Welcome

Home > Visualization Elements

>> Help for Asix

www.asix.com.pl

Asix.Evo - Visualization Elements


1 Visualization component hierarchy

Each Asix.Evo Application is displayed inside the so-called visualization windows. The number of windows used is arbitrary, but at least one window must be used. This is the start window of the Application. The visualization windows are Windows system objects and have typical properties of windows, such as the header line, system buttons, system menu, frame. In addition to these typical components of the operating system, the visualization window consists of an optional menu and one or more panels. The following illustration shows the window with menu and two panels in the edit mode.

Fig. The Application Window in the Edit Mode.

The window panels are the containers for displaying a synoptic diagrams. During window displaying the diagrams inside the panels can be replaced by using the operator actions.

The synoptic diagram is the application main visualization component used to present the state and handle the controlled process. The diagram consists of the objects and templates embedded in it.

Fig. The Diagram with the Objects Embedded.

An object is a single component of the diagram. The presentation method and behaviour of an object depends on its type. Simple graphic objects and a very complex objects for the presentation of large amount of information, e.g. objects of the alarm table, are available.

The templates are the pre-parameterized groups of objects. They accelerate the process of an application development by multiple embedment of the visualization parts (created previously) on the diagrams.

All visualization components are parameterised by the sets of properties and events. The available sets of properties and events, and the possible methods of their parameterization depend on the type of a component. The so-called 'global properties' are the additional element facilitating the parameterization. They are centrally defined properties which are not associated with any particular application component. The application designer may refer to the global property in the definitions of various components. This facilitates modification of the application appearance or behaviour without changing the definition of properties of many subcomponents.


2 Properties and Events of Visualization Components

The properties and events of visualization components are defined in the Properties panel. After selecting a component a relevant set of properties and events is displayed inside the panel.

The compact panel only shows the elements of the definition selected using the tabs and selection lists. The panel is wider, but it allows you to easily search for the desired elements, especially in the case of complex multi-state facilities. In addition, in the lower left corner of the panel, there is a preview field of the result value for the selected property.

Fig. The Panel of Visualization Component Properties.

The properties of components are responsible for its appearance and way of operation. A typical example are the properties used to define the color used to display the component. The events, on the other hand, are used to execute the actions defined by the designer in response to the occurrence of certain events during the application runtime. A typical example is a mouse click event in the area of an object.

Both properties and events may be parametrised in such a way, that their value changes during the application runtime. These changes may depend on the changes in the controlled process state, component opening method or on the logged user permissions and its activities.

The property or event definition is a text that is interpreted depending on the first symbol of a definition and the context of use. Definitions can be entered manually or using the boxes available in the Properties panel.


Property definition prefixes

Home > Visualization Elements > 2 Properties and Events of Visualization Components > 2.1. Property definition prefixes

2.1. Property definition prefixes

The table below describes interpretation method for the properties definition depending on the used prefix symbol.

Prefix

Meaning

Description

~ or none

Direct value

The property value is specified directly and does not change while using the component. The value specification method depends on the property type.

Examples:

Red

The properties defining the color accept the color name.

True

The boolean properties accept True and False texts.

Flat

The special properties may feature their own set of allowed values.

10

A large part of the properties accepts numeric values.

#

Main variable

Depending on the usage context, the notation with the # prefix allows you to refer to the name or value of the main variable. The name of the main variable is defined in the object property Main variable. References to the main variable can only be used in the context of the object.

For properties that represent the name of a variable (e.g., Control Variable), the notation syntax is as follows:

# [suffix]

Using only the # character means directly the name of the main variable. Adding a suffix allows you to create a name created from the combination of the name and the main variable and suffix.

Example:

#_limit

If the main variable has the name Z1, then the name Z1_limit will be created.

For properties that do not have the character of a variable name, the prefix # denotes the reference to the variable value. In this case, the syntax of the notation is as follows:

# [suffix] [. numer_bitu [r]]

If the suffix is not given, the current value of the main variable of the object is retrieved. If a suffix is given, the process variable value with the name consisting of the main variable name and the given suffix is taken.

The optional use of the bit number clause allows instead of the variable value, return the value of the selected bit as the value of logical type true / false. The r tag allows you to reverse the logic: true is returned when the bit value is 0.

The value returned by the expression with the # prefix must be compatible with the type of property in the context of which it was used.

Examples:

#

Returns the value of the main variable. Using the Text property of the Text object would display the value of the variable converted into a text form.

#_limit

If the main variable has the name Z1, then the value of variable Z1_limit will be taken.

.0 #

Returns the boolean value calculated based on the status of the youngest bit of the main variable value.

&

Process variable

Downloading the value of any process variable. The variable name should be given after the prefix symbol. The full syntax of the notation is as follows:

& variable_name [. bit_number[r]]

The optional use of the bit number clause allows instead of the variable value, return the value of the selected bit as the value of logical type true / false. The r tag allows you to reverse the logic: true is returned when the bit value is 0.

The value returned by the expression with the # prefix must be compatible with the type of property in the context of which it was used.

Example:

& z1

Get the value of the variable z1.

@

Variable Attribute

Loading of the attribute value of the process variable from the variable definition database. The name of the process variable and attribute should be specified following the prefix symbol. If the variable name is not specified, then the object main variable is used. If the variable name is not specified, then the property default attribute is loaded.

The attribute value must be compatible with the type of property in the context of which it was used.

Example:

@

Loads the main variable default attribute. This form can be used only if the property has a defined default attribute.

@Description

Loads object main variable description.

@Z1.Description

Loads the Z1 variable description.

%

Parameter

Loading of parameter value of template or diagram. The parameter name should be specified after the prefix symbol. The parameters provide the mechanism that allows creating templates and diagrams, the functioning of which depends on the parameters provided only when the component is used.

The parameter value must be compatible with the type of property in the context of which it was used.

Example:

% variable

Loading the diagram or template parameter zmienna value.

$

Multilingual text

A reference to a multilingual text defined in the Application texts work panel (opened via the application explorer panel > Multilanguage applications). The text identifier should be given after the prefix symbol.

The $ prefix can only be used in text-based properties. During the application operation, the text in the current language of the application will be displayed at the place of use.

!

Global property

Loading the global property value. The property name should be specified after the prefix symbol.

The global property value must be compatible with the type of property in the context of which it was used.

Example:

!KolorLowLow

Loading the global property KolorLowLow value.

=

Expression

The calculation of an arithmetic expression value. The expression contents should be specified after the prefix symbol.

The expression result may depend on many factors (e.g. process variables values). It is calculated in on a real time basis during the application runtime.

See: Expressions and Functions.

The expression calculation result must be compatible with the type of property in the context of which it was used.

Example:

= "Temperature =" + Variable (t1)

The expression result is a text combining the text: "Temperature =" with the t1 variable value.

^

Operator action

Defines the contents of the operator action which will be executed when the event occurs. The action contents should be given after the prefix symbol.

Expressions can be used internally in the action parameters. This creates the possibility of executing actions which operation depends on factors such as process variable etc.

See: Operator Actions.

Example:

^ SetVariable ("#", Variable()+1)

The action increases the current value of the object main variable by 1.

NOTE:

Not all prefixes are permitted in every context of use. In the event definitions only the operator action prefix can be used. Some parameters can be entered directly only - this relates mainly to the window and panel parameters.


3 Windows and Panels

A window is a key component of the application inside which diagrams (used for presentation of the controlled process status) are displayed. Most of the window parameters is used to determine its appearance and available system functions.

A window may have its own menu, which name is specified in the Menu property. Depending on the menu definition, it can be displayed along any edge of the window.

Each window consists of panels inside which, during the operation, the diagrams are inserted. Diagrams to be displayed inside individual panels may be selected:

  • at the stage of the panel definition process, in the Default Diagram property.

  • when the application is running, in the OpenWindow operator action contents.

When defining the panels, it is important to determine their size, especially if the designed window is permitted to resize. The panels can match their size to the window being resized. Dock Style and Anchor panel properties are used for this purpose. It is recommended to check the functioning of these parameters experimentally. For the docked panels the sequence of defining panels is of key importance.

The window may be opened by:

  • selecting the window as start-up window in the station settings - in this case the window is opened along with the application start-up.

  • Use of the OpenWindow action

  • Use of the OpenDiagram action - in this case a temporary window consisting of a single panel, covering the entire window, of the size matched to the diagram size is created.


3.1 Window properties

Name | Value Type | Description
Window Name | Name | Name identifying the window. The first character must be a letter, and the next one can be a letter, a number or character _.
Window Title | Text | Description of the window contents displayed in the title bar
Background Color | Color | Color used to display the window background. It is important in the edit mode or when the window area is not completely covered by panels.
X | Number | The X coordinate for the window opening in the runtime mode, expressed in pixels. The opening coordinate may be changed in the operator action that opens a window or may result from the opening mode specified in the Window Initial State property.
Y | Number | The Y coordinate for the window opening in the runtime mode, expressed in pixels. The opening coordinate may be changed in the Operator action that opens a window or may result from the opening mode specified in the Window Initial State property.
Width | Number | Window width in pixels.
Height | Number | Window height in pixels.
Menu | Menu name | Optional menu name used in the window.
Show Title Bar | Logical | Specifies whether the window title bar is to be displayed.
Show Frame | Logical | Specifies whether the window frame is to be displayed. Some other settings can also force the frame to be displayed.
Fixed Position | Logical | Specifies whether the user can change the position of a window.
Fixed Size | Logical | Specifies whether the user can change the size of a window. Even if the size is locked, it can be changed with the SetWindowSize operator action.
Tool Window | Logical | It changes the title bar appearance and at the same time blocks the system buttons displaying.
Show Bar Buttons | Logical | It blocks the system buttons displaying on the title bar.
Show Maximize Button | Logical | Specifies whether the maximize button is to be displayed on the title bar.
Show Minimize Button | Logical | Specifies whether the minimise button is to be displayed on the title bar.
Background Window | Logical | Specifies whether the window is to be always displayed underneath other windows (of the Asix.Evo applications and others). Usually used for large start-up windows of the application. It reduces the use of the Top Most mode.
Top Most | Logical | Specifies whether the window is to be always displayed above the other windows. This causes the inactive window will not be covered. This mode should not be used for large windows because they can cover other windows completely. An alternative method is to use the Background Window mode for the start-up windows.
Window Initial State | Enumerated type: Normal, Minimized, Maximized, Screen center, Parent center | Specifies the window opening mode. Normal mode opens in accordance with the properties X, Y, Width and Height. The minimized mode minimizes the window and maximized maximizes it enlarges (or reduces) the window to the size of the screen. This option is especially useful when the application should automatically adjust to different screen resolutions. The Screen center option displays the window in the center of the screen, preserving the original size, and the option Parent center displays the window in relation to the parent window.
Auto Fit to Screen | Logical | The property is used when running applications on different computers with different sized monitors. A window with auto-adjustment will automatically reduce its size if it is opened on a monitor where it will not fit completely.
Keep Aspect Ratio | Logical | The value Yes means that when you change the size of the window by the user, the original proportions of sizes will be kept.
Opacity | Number <0.1> | Specify the windows transparency level in the range from 0 to 1 The value 1 means an untransparent window, a value of 0 means a completely transparent window.
Show in Taskbar | Logical | Specifies whether information about the open window is to be displayed on the taskbar.
Closable | Logical | Prevents the user from closing the window. Blocked window can be closed only through the CloseWindow action.


3.2 Panel Parameters

Name | Value Type | Description
Panel Name | Name | Name identifying the panel. The first character must be a letter, and the next one can be a letter, a number or character _.
Default Diagram | Diagram name | The name of diagram which should be automatically opened inside the panel. Used when the window is a start-up window of the application or when the diagram name was not specified in the OpenWindow action.
Default Diagram Parameters | Text | Default parameters of the opened diagram. The set of allowed parameters depends on the diagram definition. Parameters are given as a sequence of parameter_name = parameter_value separated by a semicolon, e.g. Color = Red; variable = v1
Background Color | Color | Color used to display the panel background. It is of significance only in the edit mode. In the runtime mode it is used only when the diagram is not connected to the panel.
Dock Style | Enumerated type: None, Top, Right, Fill, Left, Right | Specifies the panel dock mode. The Fill mode means that the whole space available will be occupied. The dock to the edge mode means the space at the selected edge will be occupied - the panel size is then specified by the Width or Height properties.
Anchor | Multiple enumerated type: None, Top, Bottom, Left, Right | Specifies the method for calculation the panel size when a window is being resized. Anchoring to the selected edge means that the constant distance between a window and this edge is kept. A panel can be anchored to several edges simultaneously.
X | Number | The X coordinate of the panel position expressed in pixels and calculated with reference to the upper-left corner of the window. It is of no significance for docked panels.
Y | Number | The Y coordinate of the panel position expressed in pixels and calculated with reference to the upper-left corner of the window. It is of no significance for docked panels.
Width | Number | The initial panel width in pixels. It can be changed when the window is resized while using the dock or anchor modes.
Height | Number | The initial height of the panel in pixels. It can be changed when the window is resized while using the dock or anchor modes.
Visible on Start | Logical | Specifies whether the panel is visible by default when the window is started.


4 Diagrams

The diagrams are the main visualization components of the application and are used to present the state and to handle the controlled process. The diagrams are always displayed inside the window panel. The window can be opened by:

  • declaring the diagram as the panel default diagram - in this case when the window is opened (if there are no other dispositions available), the diagram will be displayed automatically,

  • using the diagram name in the OpenWindow action contents - the diagram will be opened in the indicated window panel; the action may relate to the newly opened window or to the one opened previously (diagram replacement),

  • using the diagram name in the OpenDiagram action contents - the diagram will be opened in an automatically created temporary window.

An important aspect of the diagram definition is to determine how the diagram size is adjusted to the panel size. The Fixed Sizes parameter is used to perform this function. If it is set to False, the diagram size and the panel size are always identical - if the panel is resized, location and dimensions of all diagram components are rescaled. If the fixed sizes mode has been selected, the diagram will not be scaled, it is displayed in its original size, and if necessary, panel is completed with a sliders allowing to choose a part of the diagram to be visible. The fixed size mode does not exclude the manual scaling of the diagram. Setting the Allow zooming property to the True value allows the user to scale the diagram size with the mouse wheel (while holding down the Control key), but still the panel size change does not affect the way the window is displayed.

The diagram consists of objects, groups of objects and templates embedded in it. The object groups allow to connect several objects localised on the diagram together. It facilitates the objects editing (in particular the selection, moving and copying objects of the group). In addition, the motion animation of the object groups by handling the Animation event is easier. Moreover, the objects of the group behave identically as ungrouped objects. Different situation is in the case of embedded template. The template similarly as a group, consists of a set of objects. However, in this case, the definitions of these objects are not included in the definition of the diagram. The templates are a separately defined components of the application. Only the information on a template embedment method is stored in the diagram. This information consists of the properties which define the size and position of the template and the parameters that were used in the template.

Fig. Template Properties Panel.

Similarly to the group, the template has the Animation event, which allows for animation of the template motion.

The diagram can be of a parametrised type. This allows using the same diagram to display information from various sources or to modify the appearance without changing the diagram definition. The correct use of parameters consists of two steps:

  • At the stage of the diagram defining process, the diagram parameters are defined. The definition consists of the parameter name and its default value. The default value is used during the diagram edition and when, in the diagram opening action other parameter values have not been specified. On completion the parameter defining process, the parameter may be called from the object properties with the suffix notation %name or by calling the Parameter function.

  • In the application runtime mode the parameter values should be specified in the diagram opening actions called OpenWindow and OpenDiagram. This parameters are specified as a sequence of pairs: parameter_name = parameter_value separated by a semicolon, e.g., Color= Red;Variable=v1.

The diagram supports events which allow performing of any operator actions at the time of the diagram opening and closing.


4.1 Diagram Properties

Name | Value Type | Description
Diagram Name | Name | Name identifying the diagram. The first character must be a letter, and the next one can be a letter, a number or character _.
Description | Text | Diagram description of the information importance only.
Background Color | Color | Color used to fill the diagram background
Background Picture | Image Name | The image name, which will be used as the diagram background.
Background Picture Fill Mode | Enumerated type: Tile, Stretch, Center, Original | How to display the background image. The Original type means that the picture will be displayed in original dimensions in the upper left corner of the diagram. In the Tile type, the picture is displayed in multiple instances, in order to cover the entire diagram area. In the centring mode the picture is displayed in original size in the middle of the diagram. In the stretching mode, picture size is adjusted to the diagram size.
Fixed Width | Number | The initial diagram width, expressed in pixels, in the Fixed Sized mode.
Fixed Height | Number | The initial diagram height, expressed in pixels, in the Fixed Sized mode.
Fixed Sized | Logical | Determines whether the diagram size is independent of the panel size, inside which the diagram is displayed. False value means that the diagram is always the same as the panel size - the panel resizing results in the diagram rescaling. The True means that the diagram is displayed according to the dimensions specified in the Fixed Height and Fixed Width properties. If the panel size is smaller than the diagram size, the sliders will be displayed.
Allow zooming | Logical | Determines whether the user can scale the diagram size with the use of a mouse wheel (while holding down the Control key) in the Fixed Sized mode.


Registers

Home > Visualization Elements > 4 Diagrams > 4.2. Registers

4.2. Registers

Each diagram also has a separate group of general purpose properties called registers. Registers do not have a predefined meaning. They are intended for the central calculation of expressions whose values are then used in other elements of the diagram. Access to the register values is performed via the Reg and RegStatus functions.

The use of registers makes sense when the same expressions are used in a large number of places. This simplifies the construction and efficiency of the diagram and reduces the time of loading diagrams.

10 registers are available as standard. However, their number can be increased in the Global Settings panel in the Settings tab.


4.2 The Diagram Events

Home > Visualization Elements > 4 Diagrams > 4.3 The Diagram Events

4.3 The Diagram Events

Name | Description
Diagram Opened | The event triggered when the diagram is opened. A typical example of use is an establishment of the connection with AsBase through the AsbaseOpen action.
Diagram Closed | The event triggered when the diagram is closed. A typical example of use is a termination of the connection with AsBase through the AsbaseClose action.


4.3 Group Properties

Home > Visualization Elements > 4 Diagrams > 4.4 Group Properties

4.4 Group Properties

Name | Value Type | Description
Element Name | Name | The name identifying the object group.
X | Number | The X coordinate of the object group position expressed in pixels and calculated with reference to the upper-left corner of the diagram.
Y | Number | The Y coordinate of the object group position expressed in pixels and calculated with reference to the upper-left corner of the diagram.
Visible | Logical | Specifies whether the object group is to be visible.


4.4 Group Events

Home > Visualization Elements > 4 Diagrams > 4.5 Group Events

4.5 Group Events

Name | Description
Animation | The event run periodically. Designed for the animation of an object groups motion.


4.5 The Properties of the Embedded Templates

Home > Visualization Elements > 4 Diagrams > 4.6 The Properties of the Embedded Templates

4.6 The Properties of the Embedded Templates

Name | Value Type | Description
Element Name | Name | The name identifying the embedded template.
X | Number | The X coordinate of the template position expressed in pixels and calculated with reference to the upper-left corner of the diagram.
Y | Number | The Y coordinate of the template position expressed in pixels and calculated with reference to the upper-left corner of the diagram.
Width | Number | The width of template embedding area
Height | Number | The height of template embedding area
Layer | Number | The base layer number, in reference to which the number of the template component objects layer is calculated - the template layer number is added to the layer number of the object. Objects with a higher number of layers cover the objects with a lower number. The way the objects with the same number are displayed results from the order in which they have been defined.
Custom Data | Logical | The property has no meaning. It can be used by the diagram designer for any purpose. You can refer to the value of the auxiliary data in the expressions of parameters of the embedding pattern using the LocalProperty(CustomData) construct.
Visible | Logical | Specifies whether the object group is to be visible.


4.6 The Events of the Embedded Templates

Home > Visualization Elements > 4 Diagrams > 4.7 The Events of the Embedded Templates

4.7 The Events of the Embedded Templates

Name | Description
Animation | The event run periodically. Designed for the animation of a template motion.


5 Menu

The menus of two types may be used in the Asix.Evo applications. The first type menu is a menu associated with a window. The menu structure and appearance may be freely defined. The menu is connected to the window via the window Menu property. The Dock Style property determines how the menu is connected to the window.

Fig. Example of a Menu Associated with the Application Window.

The second type menu is a context menu, usually connected to objects. The context menu is opened on the ShowMenu operator action execution.

Fig. An Example of a Context Menu Associated with an Object.

The context menu may be of parameterized type. This allows to use the same menu in many places and make its operation dependent on parameters transmitted in the menu opening action. General rules for the use of the properties are the same as for the diagrams properties.

The menu appearance can depend on the state of the application. In particular, the Visible property of a menu item allows to hide unwanted elements, and the Active property controls the ability to execute the action associated with the menu item. The menu functioning may be interlocked with the user permissions:

HasRole(superoperator)

, or with the process state:

Variable(v1)==0


Parameters and control of menu items

Home > Visualization Elements > 5 Menu > 5.1. Parameters and Control of Menu Items

5.1. Parameters and Control of Menu Items

Menu kontekstowe może być menu parametryzowanym. Pozwala to używać tego samego menu w wielu miejscach i uzależniać jego działanie od parametrów przekazanych do menu. Ogólne zasady użycia parametrów są identyczne jak dla parametrów diagramów.

W przypadku menu kontekstowego, parametry są do niego przekazywane w momencie wykonania akcji otwarcia menu ShowMenu.

W przypadku menu powiązanego z oknem, przekazanie parametrów odbywa się w momencie każdorazowego wykonania akcji otwarcia diagramu w oknie OpenWindow. Parametry podane w akcji są w pierwszym kroku przekazywane do diagramu, ale jeżeli zachodzi zgodność nazwy dowolnego parametru z nazwą parametru menu powiązanego z oknem, to jest on również przekazywany do menu.

Wygląd menu może być uzależniany od stanu aplikacji. W szczególności właściwość Widoczny elementu menu pozwala na ukrywanie zbędnych elementów, a właściwość Aktywny kontroluje możliwość wykonania akcji powiązanej z elementem menu. Działanie menu można uzależnić od uprawnień użytkownika:

HasRole(superoperator)

, lub od stanu procesu:

Variable(v1)==0


5.1 Menu Properties

Home > Visualization Elements > 5 Menu > 5.2. Menu Properties

5.2. Menu Properties

Name | Value Type | Description
Menu Name | Name | The name that identifies the menu. The first character must be a letter, and the next one can be a letter, a number or character _.
Font Color | Color | Color used to display the text of the menu items.
Background Color | Color | The background color of menu items.
Border Color | Color | Border color around the menu items.
Background Highlight Color | Color | The background color of the menu items being selected.
Background Highlight Color | Color | Border color around the menu items being selected.
Font | Font Name | The system font name used to display menu items.
Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Determines the used font style. Multiple styles can be used simultaneously.
Font Size | Number | Determines the used font size.
Dock Style | Enumerated type: None, Top, Bottom, Fill, Left, Right | Determines at which edge of the window the menu is to be located. The None mode should be used for the context menu of the objects.


5.2 Menu Items Properties

Home > Visualization Elements > 5 Menu > 5.3. Menu Items Properties

5.3. Menu Items Properties

Name | Value Type | Description
Caption | Text | The text displayed in the menu item
Picture Name | Name of the picture | The name of the image displayed next to the text in the menu item.
Place on Right Side | Logical | Specifies whether the menu item should be displayed on the right side of the menu (bottom for menus docked to the vertical edge of the window). The property is relevant only to the first level elements in the menu associated with the window.
Visible | Logical | Determines whether the menu item is to be visible. As a rule, the option is calculated with the expression taking into account the logged user permissions or the process variable values.
Enabled | Logical | Specifies whether the menu item is to be active. Inactive elements are displayed as shaded and will not run any operator action. As a rule, the option is calculated with the expression taking into account the logged user permissions or the process variable values.
Separator | Logical | Specifies whether the menu item is to be a separator. If yes, in the item position only the line separating the remaining menu items is displayed.
Action | Operator action | The operator action performed in response to selection of a menu item by the user.


6 Objects

The objects are the basic visualization components. They are placed on the diagrams and inside the template. The appearance and functionality of the objects depend on the object class. There following object classes are available:

  • Log Viewer - displays the system messages table

  • Flap - displaying the flap symbol with the signaling of the degree of opening

  • Keyboard - on-screen keyboard

  • Messages - displays the text loaded from the message definition file

  • Vector image controller - control of the appearance of displayed images in the SVG vector format

  • Chart Controller - an object used to control the operation of objects of Chart class.

  • Shape - displays shapes based on the rectangle and ellipse

  • Line - a line displaying, also these ones of multisegment type

  • Gauge - a gauge displaying

  • Picture - a graphical picture displaying

  • Authorization box - a user login control

  • Web Browser - web pages and document contents displaying

  • Button - various styles of buttons displaying

  • Work point - shows the position of the point as a function of two variables defining the X and Y coordinates

  • Pipe - pipeline type object

  • Bar - displays any value in the form of bar with an optional control slider

  • Active Alarms Viewer - displays a table with active alarms

  • Historical Alarms Viewer - displays a table with historical alarms

  • AsBase table - displays the table for viewing data from the AsBase module database

  • Variable table - displays the values ​​of process variables in a tabular form

  • Conveyor - a conveyor type object

  • Text - displays information in a text form

  • Polygon - displays any polygon shape

  • Chart - displays a characteristics of archival variables or model trends

  • Tank - a tank type object

There is the possibility to add own object classes to the application by expanding the system with a properly coded software modules.

The basic functionality of the object results from its class. However, the application designer has a great freedom concerning details of objects functioning. The vast majority of the object properties may be dynamically changed during the application runtime. This allows getting virtually any animation effects.

Some object classes have built-in interactive functions (such as Text , Bar, Button objects, alarm tables). For non-interactive objects (e.g. Line, Shape, Pipe), the designer may add this functionality via the event handling. For example, each object can handle the event of a mouse click and execute any operator action at that moment.

Object classes are divided into two types:

  • Graphic - a basic type

  • Control - objects based on the use of standard system controls. The control type objects are: Log Viewer, Chart Controller, Authorisation Box, Web Browser, Active Alarms Viewer, Historical Alarms Viewer, Variable Table, Chart.

The most significant limitation for the control type objects is that they cannot be overlayed. Graphical objects can be placed in the same area with the mutual overlaying control.

Objects are parameterized by sets of properties and events. There are the sets of so-called standard properties and events that are present virtually in all classes. Each class can introduce its specific additional properties and events.


6.1 Properties Groups

Objects properties are always placed in some group. There are three types of the property groups described in the following chapters.


6.1.1 Basic Properties

Group of properties that occur once. The Main variable is the most important property of this group. It sets out the context of the object. With the correct definition of the object (using a function in the contextual versions, e.g. Variable (), or suffix notation of variable names), the property allows creating the objects which after copying may be switched to show other data by changing only the main variable name.

The property values ​​may be dynamically changed by using in their definitions expressions and references to the elements which value changes.

Example:

Property: Active

Definition: = HasRole (DIR)

Activity state of the object changes depending on the logged user.

Property: Hint

Definition: @Description

The text displayed in a hint will be a description of the main variable of the object

Property: Value of the Gauge object

Definition: #

The pointer position of the Gauge object will depend on the value of the object main variable.

Property: Layer

Definition: = Variable (r1)> 0? 10:0

If the variable r1 value is greater than 0, the layer number is set to 10. Otherwise it is equal to 0. The above expression allows controlling the mutual overlaying of the objects in a dynamic manner.


6.1.2 Multiple Groups

Properties multiple groups are available only in a certain object classes, e.g. Chart, Variable Table. They are always used in a cases, where some repetitive elements are created within an object. The classic example are definitions of displayed trends in the Chart object.

Fig. Multiple Groups of the Object Properties.

The designer can create just as many properties groups as needed. Each group is independent of the others. The rules for calculating the values ​​are the same as for the properties of the basic group.


6.1.3 State Properties

The state properties are special properties that allow easy creation of an objects which change their appearance depending on the application and controlled process state. It is possible to achieve similar results without the use of state groups, but this requires much more complicated expressions.

The idea of the state properties is to create many groups of identical properties. In each of these groups the properties can be defined in different ways. Moreover, the group feature an additional boolean property called State Condition that determines whether the group is taken into account when calculating the effective value of the property used for the object displaying.

The algorithm for calculating the property value is as follows:

  • The group whose state condition is True, and the definition of property is not blank.

  • If there is only one such group, the value of property results from the definition used in this group.

  • If there are more such groups, then the property value is loaded from the definition of the last group.

  • If none of the group is active, or in none of the active groups the property is defined, then the value is determined on the basis of the definitions in the basic (primary) group.

Example:

Fig. Example of a State Properties for the Picture Object.

In the presented fragment of the definition of the Chart class object, it is shown how the object appearance depends on the variable value and its status. The state group number 1 is active when the value of the main object variable is set to 0. The state group number 2 is active when the status of the main variable is incorrect. The property value specification method is as follows:

The value of the main variable is not equal to 1, and the variable state is correct | The values ​​of all properties are loaded from the basic group.
The value of the main variable is equal to 1, variable state is correct | The displayed picture is bt2_rad_green, the picture is rotated by 180 degrees and its brightness is changed with the 0.1 ratio. All the other properties are loaded from the basic group.
The value of the main variable is not equal to 1, variable state is correct | The picture is crossed out and its brightness is changed with the 0.3 ratio. The other settings are loaded from the basic group, in particular, the picture ibt2_rad_red is displayed.
The value of the main variable is equal to 1, variable state is incorrect | The displayed picture is bt2_rad_green, the picture is rotated by 180 degrees, is crossed out and its brightness is changed with the 0.3 ratio. The brightness ratio has been loaded from the group controlling the variable state since it has been defined later.


6.2 Object Standard Properties

Name

Value Type

Description

Element Name

Name

The name of the embedded object. It allows to identify the object and change its properties using the SetProperty action.

X

Number

The X coordinate of the object position expressed in pixels and calculated with reference to the upper-left corner of the diagram.

Y

Number

The Y coordinate of the object position expressed in pixels and calculated with reference to the upper-left corner of the diagram.

Width

Number

The width of the object embedment area expressed in pixels.

Height

Number

The hight of the object embedment area expressed in pixels.

Layer

Number

The layer number on which the object is displayed. Objects with a higher number of layers cover the objects with a lower number. The way the objects with the same number are displayed results from the order in which they have been defined.

Main Variable

Variable name

The object main variable name. This property allows central entering of the name of variable which value and definition determine the object functioning. In other properties of the object the main variable can be called via contextual function of Variable and Attribute type, brief calls to the name and value of the main variable in the form of #, or derivative names of the variables may be created by using the suffix notation # suffix.

Control Variable

Variable name

The variable name that is saved as a result of the use of the object control functions (for objects with built-in control functions e.g Text).

Example:

#

The controlled variable is identical to the main variable of the object. This is the only case when the use of notation # indicates the main variable name and not its value.

#_s

The controlled variable name is created by combining the main variable name and the suffix _s.

@ControlVariable

The controlled variable name loaded from the attribute of the main variable.

Custom data

Logical

The property has no meaning. It can be used by the diagram designer for any purpose. You can reference to the value of the auxiliary data by the expression LocalProperty(CustomData). An exemplary application is one-time enumeration of an expression that should be used in many other places.

Active

Logical

Specifies whether the object is active. In the case of objects with built-in control functions, the False value blocks this functionality. For objects without a standard interactive functions (e.g. Shape), the property value is of no direct significance, however, may be controlled in the actions and functions used in the object properties and events - the activity state can be loaded via the IsActive function.

Minimum Visible Width

Number

The minimum width of the object in pixels at which the object is displayed. If as a result of a diagram scaling the object width falls below the limit value, the object is automatically hidden.

Minimum Visible Height

Number

The minimum height of the object in pixels at which the object is displayed. If as a result of a diagram scaling the object height falls below the limit value, the object is automatically hidden.

Hint

Text

A definition of the text displayed in the hint. The hint contents may depend on the values of attributes from the variable definition database or on the process variable values.

Example:

@Description

Displays a description of the object main variable

=Format(”{0} = {1}”, Attribute(Name),Variable())

Displays the name and value of the object main variable.

Cursor

Cursor Name

The system name of the cursor type used when the cursor hovers over an object. This way the object readiness to execute interactive operations can be signalled, e.g. execution of an action on a mouse click.

Position Lock

Logical

Specifies whether a change of the object position is possible. It applies only to the diagram edit mode.

Size Lock

Logical

Specifies whether a change of the object size is possible. It applies only to the diagram edit mode.

State condition

Logical

A property in the state properties group that determines whether group settings should be included in the calculation of the effective values of state properties.

State description

Text

Specifies the text description of the state property group.

Visible

Logical

Specifies whether the object is to be displayed. In the edit mode, the property value is ignored - the object is always visible.

Opacity

Number <0.1>

Specifies the object transparency level in the range from 0 to 1. The value 1 means an opaque object, the value of 0 means a completely transparent object.


6.3 The Standard Object Events

Name | Description
Animation | The event run periodically. Designed for animation of an object motion.
Control Send Event | This event is triggered upon the SendControls operator action execution. It applies only to the active objects.
Control Cancel Event | This event is triggered upon the CancelControls operator action execution. It applies only to the active objects.
Left Button Down | This event is triggered when the left mouse button is pressed while the cursor is within the object area.
Right Button Down | This event is triggered when the right mouse button is pressed while the cursor is within the object area.
Middle Button Down | This event is triggered when the middle mouse button is pressed while the cursor is within the object area.
Left Button Up | This event is triggered when the left mouse button is released while the cursor is within the object area.
Right Button Up | This event is triggered when the right mouse button is released while the cursor is within the object area.
Middle Button Up | This event is triggered when the middle mouse button is released while the cursor is within the object area.
Left Button Click | This event is triggered when the left mouse button is clicked (pressed and released) while the cursor is within the object area.
Right Button Click | This event is triggered when the right mouse button is clicked while the cursor is within the object area.
Middle Button Click | This event is triggered when the middle mouse button is clicked while the cursor is within the object area.
Left Button Double Click | This event is triggered when the left mouse button is double clicked while the cursor is within the object area.
Right Button Double Click | This event is triggered when the right mouse button is double clicked while the cursor is within the object area.
Middle Button Double Click | This event is triggered when the middle mouse button is double clicked while the cursor is within the object area.
Left Button Hold | This event is triggered when the mouse cursor is within the object area and the left mouse button is held down.
Right Button Hold | This event is triggered periodically when the mouse cursor is within the object area and the right mouse button is held down.
Middle Button Hold | This event is triggered periodically when the mouse cursor is within the object area and the middle mouse button is held down.
Mouse Enter | This event is triggered when the mouse cursor is moved into the object area.
Mouse Leave | This event is triggered when the mouse cursor is moved outside the object area.
Mouse Move | This event is triggered when the mouse cursor moves within the object area.
Key Press | This event is triggered when the keyboard key is pressed and the object is selected. The last key pressed may be checked with the function LastKeyPressed. Example: Perform ( LastKeyPressed()==q, SetVariable ( v1, 1), Nothing()) The variable v1 is set to 1 if the q key has been pressed.
Select Object | This event is triggered when the object is selected. It applies only to the active objects.


7 Templates

The templates are the pre-parameterized groups of objects. The templates are identified by a name. The template, after it was created, may be embedded on the diagrams repeatedly. If the definition of any template component is changed, it will automatically affect all diagrams using the template.

The diagram can also consist of a single object. This allows to prepare the objects that implement certain action scheme. Change of this scheme does not require the change of diagrams.

An embedded template can be converted into ordinary objects. This creates a copy of all template objects on the diagram. From this moment the objects from the template are treated as any other object of the diagram.

The key element of the template definition are the parameters. This allows to embed a template repeatedly with entering the data on which the template will operate, in particular, the names of process variables.

The template parameters are defined at the stage of the diagram definition. The definition consists of the parameter name and its default value. The default value is used when editing the template, and also when the other parameter values are not entered at the template embedment place. On completion of the parameter defining process, the parameter may be called from the template object properties with the suffix notation %name or by calling the Parameter function.

Fig. Template Basic Properties.

In the place of the template embedment correct values of the properties should be entered.

Fig. Template Properties.


8 Global Properties

The global properties are centrally-defined properties not associated with any particular component of the application. The application designer may create multilinks to the global property in the definitions of various components, e.g. in the object properties. This facilitates the application appearance/behaviour modification without changing the definition of properties of many subcomponents. The global properties are defined in the Global Properties panel.

Fig. Global Properties Panel.

The global property is defined by its name, optional description, property type and value definition. The type is only of secondary importance and is used to select the appropriate editor of the direct mode. The actual interpretation of the property values definition depends on the location of its use. If an example property Text Color is used in the Text object in the Color property, it will change the color of the text displayed. If the Text Color property is used in the Text property, the AliceBlue text will be displayed.

The Local Value column is a read-only column. It shows the current property value if it was changed in the application execution mode by using the SetGlobalProperty action.

References to the global property are executed with the Property function or with the prefix notation !property_name.

The definition of the property values is usually entered directly. Other methods may be used, e.g references to the variable attributes or expressions. In these cases the calculation of the property values is carried out at the location and context of its use.

Example:

The Limit property is defined as:

= Attribute (LimitHi) * 1.1

If the Limit property is used in the Text object in the Text property, by the !Limit reference, the high limit value of the object main variable multiplied by 1.1 will be displayed.

It should be noted that in this case, the use of the =Property(Limit) expression is not equivalent. The Limit property value would be displayed in the text form of Attribute(LimitHi) * 1.1.. The correct use has the following form: =Evaluate (Property (Limit)).


Changing the property value in the application execution mode

Home > Visualization Elements > 8 Global Properties > 8.1. Changing the Property Value in the Application Execution Mode

8.1. Changing the Property Value in the Application Execution Mode

There are two mechanisms for changing the global property in the application execution mode. The first of these is to change the property definition in the program start command. This mechanism allows, for example, to make the operation of the application dependent on the location of the application.

Changing the properties in the start command consists in placing the declaration in the form of:

&property_name=definition

Example:

AsixEvo.exe &Department = KJ HotelNo=04 -as =Terminal -run "c:\asixapp\app1"

In the above example, the application is run on the Terminal. In addition, the Department global property is set to KJ.

The second mechanism for changing the property value is the use of the SetGlobalProperty operator action. All changes in values ​​made with its help are remembered. After restarting the application, the property value will be automatically set based on the last execution of the SetGlobalProperty action. Return to the original property value defined in the application requires the ResetGlobalProperty action. Changes made using the SetGlobalProperty action are limited only to the station on which the action was performed.


Welcome

Home > Techniques of Diagram Creation

>> Help for Asix

www.asix.com.pl

Asix.Evo - Techniques of Diagram Creation


1 Universal Object Creation Methods

Easy copying of the objects created as well as easy and fast modification implementation for the entire application should be the goal of diagram creation. This chapter describes the available mechanisms and techniques aiming to achieve this goal. In subsequent chapters, these techniques will be consequently used in the described examples.


1.1. Suffix Notation of Variable Names

A well-designed object for monitoring the process variable status may be copied and switched to monitoring other variable by changing just a single property. The first of the mechanisms facilitating such a structure is the Main variable property and suffix notation of variable names.

Case 1

State Properties, primary group
 | Text | =VarStringValue(V1)
 | Color | =Variable(V1)>50?Red:Black

Case 2

Basic Properties
 | Main Variable | V1
State Properties, primary group
 | Text | #
 | Color | =Variable()>50?Red:Black

These fragments of Text object parameterization function the same way. In the first example the variable name is used twice. Making a copy and changing variable would require manual edition of the two properties. In the second case, the variable name is used only once. Using the main variable allows using Variable parameterless function and # short notation, indicating on the reference to the formatted value of the main variable. Copying of the object is very simple, moreover, also the Group replacement of variables editor function may be used.

Basic Properties
 | Main Variable | V1
 | Control Variable | #Control
State Properties, primary group
 | Text | =VarStringValue(”#Value”)

Another example demonstrates the use of suffix notation based on the main variable name. The # symbol used in the context of the variable name means that object main variable name will be used directly. In conjunction with additional text it creates a variable name which is a combination of main variable name and the specified text. In this example, the controlled variable name is V1Control, and the text displayed is the V1Value variable value. Because there is no direct reference to the main variable, it is even not required from V1 to be the existing variable.


1.2. Using Variable Attributes

Another mechanism enabling creation of universal objects is provided by process variable attributes.

Basic Properties
 | Main Variable | V1
State Properties, primary group
 | Text | #
 | Color | =Variable()>Attribute(LimitHi)?Red:Black

Generally, each variable will have its own critical limit level. Entering its value directly would require the Color property do be modified each time. The Attribute function takes a LimitHi attribute of object main variable. After changing main variable name new limit value is retrieved automatically. The additional benefit of using the attributes of a variable is that a subsequent change in the limits of the variable definition database will not require modification of diagrams.

Any attributes from a predefined set may be placed in the variable definition database. It is also possible to add custom attributes of any significance.


1.3. Global Properties

The global properties are defined in the separate operating panel which is opened via the Application Explorer panel. The global properties allow creating a set of parameters that define the behaviour and appearance of objects on all diagrams. Change of the global property value is immediately visible in all objects that refer to this property.

State Properties, primary group
 | Text | #
 | Color | !NormalColor

In the above example the text is displayed in the colour specified in the NormalColor global property. The subsequent colour change will not require change in the object.

The global value may be referenced also via the Property function.

The global properties are defined directly as usual. There are also other ways, such as the use of the expression.

=Color(Variable(),0,0)

This expression above when used in the global property of a colour type calculates a colour value based on the main variable value of the object, which refers to the property. The calculating algorithm may be changed at any time, without changing objects.

If the global property is not defined directly, the reference to it should be done by the ! notation.


1.4. Templates and Parameterized Diagrams

Templates and parameterized diagrams enable creating complete, predefined object sets for multiple use. The templates can be embedded on the diagrams, while the diagrams itself make an independent entity. The parameterized diagrams, by using appropriate opening function can be used to display various data (box of "control window" type).

In both of these mechanisms, the designer defines certain set of parameters that control the operation of objects in the embedded template or opened diagram. However, most of the properties is defined directly in the template. Subsequent modification of the template (diagram) is immediately reflected in the place of occurrence.


2 Displaying Process Variable Values in Text Form

This section describes method of displaying the process variable in a text form. The displayed text formatting and display attributes changing depending on the different conditions will be discussed. In particular, multi-state object creation process will be presented.

The Text class object is used in the Asix.Evo applications to display texts of any type, both static and dynamic.

Note:

If displaying the values of multiple variables in tabular form is required the Variable table class object may be used.


2.1. Displaying Formatted Value

Variant A

Basic Properties
 | Main Variable | VA001
State Properties, primary group
 | Text | #

Variant B

Basic Properties, primary group

Text

&VA001

Both of these parameterization variants cause the VA001 variable displaying. A variable value will be converted into text based on Format attribute stored in the variable definition database. For example, if the format is f2, the value of the variable will be displayed as a number with two decimal places. If the format is not defined in the variable definition database, the conversion into text is performed in a standard way, depending on the value type.

The variable name in the variant A is specified in the Main Variable property, and the text was determined by a short notation #, indicating that the object main variable value is downloaded as a text.

In the variant B only short notation &variable_name was used. It means that the specified variable value will be downloaded as a text. For reasons that will be described later, it is recommended to use the standard procedure of the variant A. The variant B should be used only in the simplest parameterizations.

Variant C

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | =VarStringValue()

This variant functioning is identical to the variant A. Instead of the short notation the VarStringValue function was used that returns the object main variable value as a text.

Variant D

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | =Variable()

The difference between the variant D and the previous one is the use of the Variable function. This function returns the main variable value as a number. Conversion into text will be made ​​automatically, the Format attribute will be negligible.

Variant E

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | =”Temperature = ” + VarStringValue()

The text displayed will combine Temperature = text and formatted value of the VA001 variable.

Variant F

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | =Format("Temperatura = {0} \u00b0C", VarStringValue())

Formatted VA001 variable value is inserted into the text Temperatura = °C, replacing the {0} tag. The Format function enables free creation of text strings based on the formatting text. The formatting text content shows method of insertion of the sign specified in the Unicode (\u00b0) into the text string.

Variant G

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | =Format("Temperatura = {0:f3} {1}", Variable(), Attribute(Unit))

This variant functioning is similar to the previous one, except the two following differences. The numerical value of the main variable is transferred to the Format function, and the conversion method is specified by the {0:f3} tag. This allows for formatting other than those specified in the variable definition database. In addition, the unit description is taken from the variable definition database, from the Unit attribute by calling the Attribute function. This example shows one of the benefits of the Main Variable property use. Without this, the analogous expression would look like this:

=Format("Temperatura = {0:f2} {1}", Variable(VA001),Attribute(VA001,Unit))

The variable name would be used twice. Much more difficult is switching the object to monitor the values of another variable.


2.2. Making the Text Dependent on the Value

In many cases, in addition to displaying the variable value, it is necessary to control display attributes. A typical case is the control of limit overreaching states, measurement errors, etc.


2.2.1. Use of Conditional Expressions

Variant A

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | =Variable()>50?Red:Black

The conditional expression has been used in the Color property. If the main variable value exceeds 50, then the variable value is displayed in red.

Variant B

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | =Variable()>50?Red:Black
 | Font style | =Variable()>50?Bold:””

In the variant B, a text colour and font style is changed when the value of 50 is exceeded. Despite the use of the main variable mechanism, the solution is still inefficient because of the double use of the identical logical condition. Changing of this condition requires a lot of efforts and increases the possibility of errors. This problem may be solved with the object state mechanism.


2.2.2. Using Multi-State Method

Variant C

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state number 1
 | State Condition | =Variable()>50
 | Color | Red
 | Font Style | Bold

Each additionally created state, in addition to a full set of basic state properties, has an additional State Condition property. Its value specifies whether the state is taken into account when determining the property value. In the example, if the value of main variable exceeds 50, state definitions of the Color and Font Style properties will have priority over definitions of the primary state. As a result, there will be obtained the effect as in option B, but without unnecessary iteration of condition and conditional expressions.


2.3. Using Warning Limits for the Variable Value

Another common problem is the need to signalling the alarm limit exceeding. The alarm limit values of measurement are sometimes stored in the other process variables. They can also be stored in the variable definition database.


2.3.1. The Use of Suffix Notation

In the following example, it is assumed that the limits are stored in variables. Where, the following naming convention is maintained: variable names of the limits are created by adding suffixes _lolo, _lo, _hi, _hihi to the name of the measurement variable.

Variant A

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state number 1
 | State Condition | =Variable()<Variable(“#_lo”)
 | Color | Aqua
State Properties, state number 2
 | State Condition | =Variable()<Variable(“#_lolo”)
 | Color | Blue
State Properties, state no. 3
 | State Condition | =Variable()>Variable(“#_hi”)
 | Color | Red
State Properties, state no. 4
 | State Condition | =Variable()<Variable(“#_hihi”)
 | Color | Yellow

There were created 4 states which controls the exceeding of 4 limits. In the state expressions, the main variable value is compared with the limit variable value. Variable names as #_lolo are the suffix notation in which the # represents the main variable name.

Object dependency of variable names is minimal, switching the object to monitoring other variable requires only change of the main variable name.

Each of the states has its own definition of the Color property. The value defined for active state will be used to display. If there is more than one active state, then the value from the state with higher number will be taken. Therefore, the sequence of defining the states is essential. The state _lolo must be defined after the state _lo, and the state _hihi must be defined after the state _hi.


2.3.2. Application of Variable Attributes

The following example assumes that the limit values ​are stored in the attributes of variable definition database.

Variant B

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state no. 1
 | State Condition | =Variable()<Attribute(LimitLo)
 | Color | Aqua
State Properties, state no. 2
 | State Condition | =Variable()<Attribute(LimitLoLo)
 | Color | Blue
State Properties, state no. 3
 | State Condition | =Variable()>Attribute(LimitHi)
 | Color | Red
State Properties, state no. 4
 | State Condition | =Variable()<Attribute(LimitHiHi)
 | Color | Yellow

The state conditions compare the variable value with the value of the specific limit loaded from a database. The limit values must be stored in a database as a numerical values.

Variant C

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state number 1
 | State Condition | =Variable()<Variable(Attribute(LimitLo))
 | Color | Aqua
State Properties, state number 2
 | State Condition | =Variable()<Variable(Attribute(LimitLoLo))
 | Color | Blue
State Properties, state number 3
 | State Condition | =Variable()>Variable(Attribute(LimitHi))
 | Color | Red
State Properties, state number 4
 | State Condition | =Variable()<Variable(Attribute(LimitHiHi))
 | Color | Yellow

The state conditions compare the variable value with the value of the specific limit loaded from a database. However, in this case, the limit values stored in the database are the variable names (limit attribute value is passed to the Variable function).

Variant D

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state number 1
 | State Condition | =Variable()<Asix6Attribute(LimitLo)
 | Color | Aqua
State Properties, state number 2
 | State Condition | =Variable()<Asix6Attribute(LimitLoLo)
 | Color | Blue
State Properties, state number 3
 | State Condition | =Variable()>Asix6Attribute(LimitHi)
 | Color | Red
State Properties, state number 4
 | State Condition | =Variable()<Asix6Attribute(LimitHiHi)
 | Color | Yellow

This example is a combination of options B and C. The Asix6Atrribute function accept both numerical limits (returned directly) and limits in a form of the variable names (returned value of the variable). In more complex cases, the Asix6Limit function can also be used.


2.4. Handling Monitored Variable Status

In addition to limit signalling, the indication of problems with the reading out of process variables is also often required.

Variant A

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Text | #
 | Color | Black
State Properties, state number 1
 | State Condition | =Variable()<Asix6Attribute(LimitLo)
 | Color | Aqua
State Properties, state no. 2
 | State Condition | =Variable()<Asix6Attribute(LimitLoLo)
 | Color | Blue
State Properties, state number 3
 | State Condition | =Variable()>Asix6Attribute(LimitHi)
 | Color | Red
State Properties, state number 4
 | State Condition | =Variable()<Asix6Attribute(LimitHiHi)
 | Color | Yellow
State Properties, state number 5
 | State Condition | =VarIsNotGood()
 | Text | =VarStringValue() + “ ?”
 | Cross out color | Violet

State no. 5 controls the status of the main variable. When it is incorrect, a question mark is added to the value and displayed text is crossed out. Regardless of variable state, the overreaching control is done in a normal way.


3 Formatting Numerical Values

Section 2.1. Displaying Formatted Value is an overview of basic rules for conversion numerical values into texts. This section describes in detail a form of the formatting strings that control a method of conversion.

The formatting strings are used in two positions. First of them is the Format attribute of the variable definition database. It is used in the case of default conversion into text (use of the references #, &name or the VarStringValue function). The second position is a formatting parameter of the Format function.

The form of the formatting strings is compatible with the format used in the .NET Framework libraries. Full description of the format can be found in the .NET Framework documentation available in the Internet.

The format string used to call the Format function has the following structure:

{index, field_lenght: field_format}

The field_format element is to be used only in the Format attribute of variable definition database.

The index element specifies the parameter number of the Format function call which relates to the given format string. The first parameter has an index of 0.

The field_length element specifies the minimum length of text being created. If the length of formatted text will be shorter than declared, then it will be filled up with suitable number of spaces. Blank spaces are added to the left side, when the field assumes a positive value or otherwise to the right side.

The field_format element defines the way of converting a number into a text. The method of using it will be demonstrated on examples.


3.1. Conversion of Numerical Values

In a case of the numerical value conversion, the field format consists of the one-character type specifier and the numerical precision field. An interpretation of the precision field depends on type used.

Type specifier | Description | Example
D , d | Formatting integers. It can be used for floating point values, but in this case rounding to integer will be done. The precision field specifies the minimum number of digits. Leading zeros will be added if necessary. | ”D” 1234 -> 1234 ”D” 1234,56 -> 1235 ”D6” 1234 -> 001234
E , e | Formatting floating point value in exponential form. The precision field specifies the number of fractional digits. | ”E” 1234,56 -> 1,234560E+003 ”e2” 1234,56 -> 1,23e+003
F , f | Formatting floating point value in the total and fractional parts separated by the system separator. The precision field specifies the number of fractional digits. | ”F” 1234,567 ->1234,57 ”F4” 1234,567 ->1234,5670 ”F1” 1234,567 ->1234,6
N , n | Formatting floating point value in the total and fractional parts separated by the system separator. In addition, a group of digits are separated by separator. The precision field specifies the number of fractional digits. | ”N” 1234,567 ->1 234,57 ”N0” 1234,567 ->1 235
P , p | Formatting integers and floating point values in percentage form with a percent sign (%) added. The value will be multiplied by 100 before formatting. The precision field specifies the number of fractional digits. | ”P” 0,567 ->56,70% ”P1” 0,567 ->56,7%
X , x | Formatting integers in hexadecimal form. It can be used for floating point values, but in this case rounding to integer will be done. The precision field specifies the minimum number of digits. Leading zeros will be added if necessary. | ”X” 1234 ->4D3 ”x4” 1234 ->04d3

The Custom Numeric Format Strings can be used in addition to the formatting described above. The detailed description can be found in the .NET Framework documentation.


3.2. Conversion of Values of the DateTime Type

The standard predefined formats or freely created custom formats may be used in case of conversion of the DateTime value.

The following table shows an example of standard formatting.

Type specifier | Description | Example
d | Short date | 2012-02-16
D | Long date | February 16, 2012
f | Long date + short time | February 16, 2012 16: 33
F | Long date + short time | February 16, 2012 16:33:48
g | Full date + short time | 2012-02-06 16:33
G | Full date + long time | 2012-02-06 16:33:48
M, m | Month + day | February 16
t | Short time | 16:33
T | Long time | 16:33:48
Y, y | Year + month | February 2012

If these methods of formatting are insufficient, custom formats may be used. This format is defined by a sequence of specifiers that describe each field of the text being created. For example „dddd dd MMMM yyyy HH:mm:ss.fff” format creates a text "Thursday 16 February 2012 16:33:48.240”.

The following table describes the basic component specifiers of custom formats.

Type specifier | Description
d | Day of the month in one- or two-digit format
dd | Day of the month in two-digit format
ddd | Abbreviated weekday name
dddd | Full weekday name
f | Fractional part of the second, depending on the number of specifiers f a various time accuracy can be obtained.
H | Hour in one- or two-digit format
HH | Hour, two-digit (upper-case H - 24-hour format, lower-case h - 12-hour format)
m | Minute in one- or two-digit format
mm | Minute, two-digit
M | Month number in one- or two-digit format
MM | Month number, two-digit
MMM | Abbreviated name of month
MMMM | Full name of month
s | Second in one- or two-digit format
ss | Second, two-digit
yy | Last two digits of the year
yyyy | Number of year
Neutral characters | Copied directly into the output text
Characters inside the apostrophes ‘ ’ | Copied directly into the output text


Conversion of Values of the TimeSpan Type

Home > Techniques of Diagram Creation > 3 Formatting Numerical Values > 3.3. Conversion of Values of the TimeSpan Type

3.3. Conversion of Values of the TimeSpan Type

When converting TimeSpan values, you can use standard pre-defined formats or freely created custom formats.

The following table shows an example of standard formatting.

Type specifier | Description | Example
c | Short date ([-][d’.’]hh’:’mm’:’ss[‘.’fffffff]) | 3.07.25:30
g | Short general format ([-][d’:’]h’:’mm’:’ss[.FFFFFFF]) | 3.7.25:30
G | Long general format ([-]d’:’hh’:’mm’:’ss.fffffff) | 3.07.25.:30.0000000

If the above formatting methods are insufficient, then you can use your own formats. Such a format is defined by a sequence of specifiers describing individual fields of the created text. The following table describes the custom format components.

Type specifier | Description
d | The number of full days over a period of time
dd - dddddddd | The number of full days over a period of time with the appropriate number of starting zeros added
h | The number of full hours in a period of time not included in the number of days
hh | Always a two-digit number of full hours over a period of time not included in the number of days
m | The number of minutes over a period of time not included in the number of days and hours
mm | Always a two-digit number of minutes over a period of time not included in the number of days and hours
S | The number of seconds in a time period not included in the number of days, hours and minutes
ss | Always a two-digit number of seconds in a time period not included in the number of days, hours and minutes
f - fffffff | Part of an incomplete second with adequate accuracy
F - FFFFFFF | Part of an incomplete second with adequate accuracy, final zeros are not displayed
\ | The character after \ is copied to the output text
MMM | Abbreviated name of month
Characters inside apostrophes ' ' | Copied directly to the output text


4 Object Appearance Animation

In many applications, there is a need to present the impression of movement of selected elements or dynamic signalling of certain states on the diagrams. The following section describes how to implement these functionality.


4.1. Animated Images

The simplest method is to use an animated GIF images. The only thing needed to be done is to use an animated image in the Picture Name property of the Picture class object.

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Image Name | NoFire
State Properties, state number 1
 | State Condition | =Variable()&1
 | Picture Name | Fire

If the least significant bit of the main variable is set, then the state no. 1 will become active and as a result the Fire animated image will be displayed.


4.2. Animation of Pipes, Conveyors and Lines

Some of the object classes are initially prepared for animation of their movement. Motion parameterization consist of appropriate setting of properties corresponding to appearance of object and dynamic change of property modifying the move of the displayed shape. In general, the Counter internal variable is used for animation, this variable is automatically incremented on the basis of regular cycle.


4.2.1. Pipe

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Stripes Color | Blue
 | Fill Offset | 0
State Properties, state number 1
 | State Condition | =Variable()&1
 | Fill Offset | =Variable(Counter)
State Properties, state number 2
 | State Condition | =Variable()&2
 | Fill Offset | =-Variable(Counter)*2
State Properties, state number 3
 | State Condition | =Variable()&4
 | Fill Offset | =-Variable(Counter)
State Properties, state number 4
 | State Condition | =Variable()&8
 | Fill Offset | =-Variable(Counter)*2

Setting the Stripes Color property causes that the pipe will be displayed in the striped form. Changing the Fill Offset property causes shift of the stripes which allows to achieve the flow effect in the pipe. Depending on the bit set for the main variable, the Fill Offset property is changed in different ways: multiplication (or alternatively division) of the Counter variable value controls the speed of motion, while the change of the expression sign controls the motion direction.


4.2.2. Conveyor

Basic Properties
 | Main Variable | VA001
 | Begin roller style | Drive
 | End roller style | Drive
 | Harrow Conveyor | True
State Properties, primary state
 | Conveyor offset | 0
 | Begin drive rotation | 0
 | End drive rotation | 0
State Properties, state number 1
 | State Condition | =Variable()&1
 | Conveyor offset | =Variable(Counter)
 | Begin drive rotation | =Variable(Counter)
 | End drive rotation | =Variable(Counter)

Setting the Roller style … and Harrow conveyor properties causes that the conveyor is displayed in a way which allows to animate the rotation of end rollers and the conveyor belt movement. If the least significant bit of the main variable is set, then the state no. 1 in which the motion animation is executed becomes active. Changing the Conveyor offset property gives a conveyor movement effect. Changing the drive rotation … property allows for the rotation animation of appropriate end roller.


4.2.3. Line

Basic Properties
 | Main Variable | Speed
 | Dash style | Dash
State Properties, primary state
 | Stripes Color | Blue
 | Fill Offset | =Variable()

Setting the Dash style and Stripes Color properties results in displaying the line in the striped form. Fill Offset is taken from the Speed variable value. Shift speed of strips depends directly on the rate of change of the variable - the controller programme can smoothly control the speed of motion. The absence of the Speed variable stops the motion.


4.3. Implementation of Blinking Effect by Changing Object

Home > Techniques of Diagram Creation > 4 Object Appearance Animation > 4.3. Implementation of Blinking Effect by Changing Object Properties

4.3. Implementation of Blinking Effect by Changing Object Properties

The most universal method of animation is the cyclic change of selected property of object. This method can be applied to the object of any class and any property responsible for object appearance may be used. Typically, the change of the property is synchronised by value of the IsBlinkOff function. This function returns cyclically the true and false value. The standard transition period is 500 ms, but it can be changed in the application settings. Application of the IsBlinkOff function provides the same blinking rate for all object.

Some of the blinking function implementation variants are shown below.

Variant A

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Visible | True
State Properties, state number 1
 | State Condition | =Variable()==3
 | Visible | =IsBlinkOff()

This scheme may be applied to the object of any class. If the main variable assumes value of 3, then the active state no. 1 by changing the Visible property will cyclically display and hide the entire object.

Variant B

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Color | Blue
 | Text | #
State Properties, state number 1
 | State Condition | =IsAlarm("A_"+Attribute(Name))
 | Color | =IsBlinkOff()?Red:Green

In the example B, the colour of the text is modified in the Text object. In the normal state, the value of main variable is displayed in a blue. If the alarm of A_VA001 ID is active (created on the basis of the name of the main variable), then the variable value is displayed alternately in a red and green. The conditional expression which uses the IsBlinkOff function, controls the colour choice.

Variant C

Basic Properties
 | Main Variable | VA001
State Properties, primary state
 | Picture Name | wizard
 | Brightness | 0
State Properties, state number 1
 | State Condition | =Variable()==3 && IsBlinkOff()
 | Brightness | -0.5

In the example C, the blinking is performed by changing the brightness of the image in the Picture class object. In this example the IsBlinkOff function is placed in the state condition expression along with verification of main variable value. If the value of main variable is equal to 3, then the brightness of the picture is taken from the primary state or state no. 1, depending on the current value of the IsBlinkOff function.


5 Rules for Opening and Closing Synoptic Windows

One of the key elements of each application is the structure of the navigation system enabling switching between individual diagrams of the application. The OpenWindow, OpenDiagram and CloseWindow operator actions are used to open and close windows and diagrams. Selected windows may also be automatically open during the start-up of the application.

The operator actions can be associated with the events related to mouse handling, e.g. the Button On event of the Button class object or the Left Button Click events etc. for the other classes. The window and diagram switching actions may also be used in the definitions of the application menus and global keys.


5.1.1. Opening Window at the Application Start-up.

Windows selected can be launched at the start-up of the application. To do this:

  1. Using the Startup options tab of the Stations Settings edit panel, select the windows which are to be opened at the application start-up. The start-up window setting is specific for the workstation. The window selection should be performed individually for each workstation or should be set on the area level.

  2. In the settings of all panels constituting the start-up windows, set the Default Diagram property accordingly.

  3. If the default diagrams have parameters, then their initial values should be specified as the default values. It is not possible to explicitly declare the parameters for the start-up window.

In a typical case, a single start-up window is opened on each available monitor at the Application start-up.


5.1.2. Opening Window and Diagram with OpenWindow Action.

The OpenWindow action is used to open a new predefined synoptic window or to swap the diagram in the selected panel of already opened window. It can also be used to activate previously opened window without changing the diagrams displayed. For detailed algorithm of the action functioning, see description of the action (Asix.Evo_Operator_Actions.CHM/PDF).

Example 1

OpenWindow(window1,null,null,null)

This action opens the window1 window with default diagrams in the panels. If window1 is already open, then it is activated without change of the displayed diagrams. The operation of this action is similar to running the start-up windows.

Example 2

OpenWindow(window1,info,machine,”mid=8”)

This action is supposed to open the window1 window with the machine diagram in the Info panel and the mid parameter of 8 or to swap the diagram in the previously opened window1 window. If there are several opened window1 windows, first it is checked if there is any window opened with the machine diagram in the Info panel and if the window have compatible parameters. If so, then the action will be limited only to activate the already opened window.

The action is used to swap the diagrams in the main windows of the application or to open the windows, the so-called stations, when there is a need to open only one station.

Example 3

OpenWindow(window1,info,machine,”mid=8”,true)

The operation of the action is similar as in the previous example. The difference is that the previously opened window will be used (activated) only if there is a full compliance of the name of window, diagram and parameters.

The action used to open windows of so-called stations, when there is a need to open any number of the station (but each with a different diagram or parameters).

Example 4

OpenWindow(null,info,machine,”mid=8”)

This action is supposed to exchange the diagram and parameters in the info panel in the context window of the operator action. The context window results from the location where the action being executed has been defined, for example, location of the Button object, which when pressed, executes the action.


5.1.3. Opening Diagram Without Use of Predefined Synoptic Window

It is also possible to open directly the synoptic diagram without prior definition of the window. This is achieved with the OpenDiagram action. As a result of its execution, temporary window displaying required diagram is internally created.

Example 1

OpenDiagram(machine,”mid=8”,control_window,$Normal, &CursorLocation, &CursorLocation,”FixedSize”, $None)

The action opens the machine diagram with the mid parameter equals to 8 in the automatically created window. The window size is consistent with the diagram size, and its location results from the cursor position. The window title, its appearance and behaviour are defined directly in the action contents. In this case the window title is the control_window text, the window is of fixed size and other appearance parameter are set to default. As with the OpenWindow action, there is a check performed if the diagram with the specified parameters is already open, before opening a new window.

The action functioning is similar to the OpenWindow(window1,info,machine,”mid=8”,true) action and allows simultaneously opening of multiple stations.

The main difference between the OpenWindow and OpenDiagram actions depends on location where the appearance and set of available window system operations are defined. In the first case, it is specified in the parameters of the predefined window, in the second case, in the action contents. The definition in the action contents allows dynamically adapting the window appearance - in particular, the window title.

Example 2

OpenDiagram(machine,”varname=”+Attribute(Name),”Variable “+Attribute(Name),$Normal, &CursorLocation, &CursorLocation,”FixedSize”, $None)

In this case, the object main variable name (in the context of which the action is executed) is passed to the parameters of the diagram (”varname=”+Attribute(Name) parameter). Simulatnously the variable name is added to the station title (”Variable “+Attribute(Name) parameter).

An additional advantage of the OpenDiagram action is the ability to define the operating mode. As shown previously in the $Normal mode, the window behaves like any other predefined application window. In the $Dialog mode, there is created a dialogue station - it is not possible to switch to the other window until the station is closed. In the $Temp mode, the window is automatically closed when selecting the other application window.


5.2. Controlling the Location and Size of Windows

The location of the new opened window is declared directly in the OpenWindow and OpenDiagram actions. The position can be declared in four ways:

  1. The coordinates given directly

  2. The coordinates resulting from the definition of window – $Default constant

  3. The coordinates resulting from the current mouse position – $CursorLocation constant

  4. The coordinates resulting from the location of window from which the opening action was executed – $ActiveLocation constant

In all variants of calling the opening action, if it comes to detection of situation that the appropriate window is already open, then the correction of the existing window position according to the specified parameters will follow.

Example 1

OpenDiagram(machine,”mid=8”,control_window,$Normal, $ActiveLocation, $ActiveLocation,”FixedSize”, $Closable)

The action opens the machine diagram in the location of the window from which the action was initiated. In addition the $Closable parameter will close the window. Such use of the action allows achieving the self-switching windows effect - even if the user has changed the position of the first window, the second window will be opened in the first window position. A similar effect can be achieved using the diagram switching in the panel of the permanently open window.

Both $CursorLocation and $ActiveLocation modes in a natural way open the window on the currently used screen. The $Default mode uses a predetermined monitor. The correct position can be dynamically calculated in the direct coordinates mode.

Example 2

OpenWindow(window1,info,machine,”mid=8”,false,XOnScreen(0,0),YOnScreen(100,0),$None)

Using the XOnScreen and YOnScreen functions allows calculating the position according to selected monitor. The second parameter of both functions specifies the monitor number (0 indicates monitor indicated by the mouse cursor). The presented action opens the window on the monitor indicated by the mouse cursor at the left edge of the screen, from the line no. 100.

The size of the windows being opened follows from the size of the window predefined (OpenWindow) or size of the diagram (OpenDiagram). However, the size can be changed using the SetWindowSize action after the window opening operation.


5.3. Closing Window and Diagram

The windows can be closed in several ways. These are:

  1. Closing the window by standard system methods such as the closing button on the window frame.

  2. The automatic closing as a result of diagram opening by the OpenDiagram action in the $Temp mode.

  3. The use of a switching mode different than the $None mode in the OpenDiagram and OpenWindow actions.

  4. Use of CloseWindow action.

Example 1

OpenWindow(window1,info,machine,”mid=8”,false,$CursorLocation,$CursorLocation,$Closable)

The action opens the window1 window and then close all windows without the closing lock, which are located on the screen, where the window has been opened (in this case the screen indicated by the mouse cursor). The $ExceptCurrent constant also can be used. Its functioning is similar, but the window from which the action was performed will not be closed.

The locked windows are those which have the Closable property set to False.

Example 2

CloseWindow(null,false)

The action closes the window in the context of which it was executed (the current window).

Example 3

CloseWindow(”ST*”,true,-1)

The action closes all windows, which names start with “ST”, on all monitors. The windows only on the selected monitor or the monitor indicated by the mouse cursor can also be closed (last parameter equals to 0).


5.4. Mutual Overlaying Control of Synoptic Windows

Another important element of window designing process is the control of their mutual overlaying. In a typical case, the active window is displayed in front of all other application windows. In some cases, it may be disadvantageous. For example, if there is a need to display a several windows of station type on a background of large start-up window, the standard operating rules are insufficient.

The mutual overlaying can be explicitly controlled using the Background Window and Top Most window properties. The TopMost attribute can also be used in the OpenDiagram action. The "on top" windows are always displayed in front of the normal windows, even if they are inactive. The "underneath" windows are always below all other windows.

The above remarks apply also to all other windows opened on a computer, which are not necessarily the Asix.Evo application windows. Therefore, great caution is advised when using the "on top" masks. They can overlay other important windows. Do not open large windows in this mode. The safer solution is to open the star-up windows of the application in the "underneath" mode rather than using the "on top" windows.


6 Organization of Control Operations

An important element of almost any application is to implement a mechanisms used to perform the operations that control the monitored object. Some objects have integrated some control mechanisms, for example Text, Button, Bar. The other objects can be extended with control function using the events handling and the SetVariable function. Examples of such parameterization are described in other sections of the documentation.

This section concerns the general organization rules for control operations of the application.


6.1. Immediate Control

The immediate control mode is the simplest mode of control operation execution. The appropriate value is sent to controlled variable immediately after selecting or entering a new setting, without any additional confirmation.

The parameterization of the immediate mode is restricted to determine the controlled variable name and selection of mode.

Basic Properties
 | Avtive | True
 | Main Variable | Level
 | Control Variable | LevelSet
 | Immediate Control | True

The Active property set to True enables the interactive functions of the objects, especially the controlling ones. The Immediate Control property equals to False forces the operation in the immediate mode without confirmation.

In the presented example, the controlled variable name is given directly in the Control Variable property. This is correct parameterization but due to the general recommendation to control the object parameterization only via the main variable name and its parameters, the following structures are rather recommended.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | #Set
 | Immediate Control | True

The controlled variable name is created as a result of combining the main variable name with the Set suffix. In particular, the use of only the # symbol would imply that the name of the controlled variable is the same as the name of the main variable.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | @ControlVariable
 | Immediate Control | True

The controlled variable name is taken from the ControlSetVariable attribute of the variable database, from the row describing the definition of the Level variable. The ControlSetVariable attribute is not included in the standard attribute set - it must be added on the stage of database creation.


6.2. Delayed Control Operations (with Confirmation)

The delayed control mode is activated by setting the Immediate Control property to the False value. This mode is used in order to avoid coincidental initiation of operation or when the entire group of control operations is to be executed simultaneously.

The parameterization of the delayed control operations consists of two elements: indication of control operation execution pending and initiation of data transfer operation.

The indication of the pending state is based on the HasWaitingControl function. The object which waits for a send signal should modify its properties determining its appearance.

State Properties, primary state
 | Text | Unrecognised state
 | Color | =HasWaitingControl()?Red:Black

In this example, the Text object change a colour in the waiting mode. Here, the conditional expression was used. This is the simplest form, but it can be only used if the object has no other states changing the colour property. It is also inconvenient if there is a need to change more than one property.

State Properties, state x
 | State Condition | =HasWaitingControl()
 | Color | Cyan

It is easier to use the additional state with the HasWaitngControl condition. This state must be set as the last state of the object (or at least after all the states modifying the same properties).

Executing pending control operations is initiated with the SendControls action. Depending on the action parameter used, the button (or other object) executing the action may cause controls sending from all diagrams ($All), from current window ($Window), from current diagram ($Diagram) or from the objects of specified name.

Basic Properties
 | Active | True
 | Cursor | Hand
 | Button Kind | Rectangular 3d Butoon
 | Switch Mode | False
State Properties, primary state
 | On | False
 | Off Color | =HasWaitingControl(”*”)?LightCoral:LightGray
 | Off Text | Send
Events
 | Button Off | ^SendControls($Diagram)

The presented fragment of the Button object parameterization initiates the sending of controls from the diagram on which it was located. Additionally, the state indicating on pending controls is signalled. The call of the HasWaitingControl function with the parameter of the object name template allows checking if there are objects of compatible name pending for execution of control operation. The * parameter identifies all objects regardless of their name. This mechanism applies only to the objects located on the same diagram. It can not be used in case of the global initiation of the controls from the other diagrams.

The cancellation mechanism for pending controls is also available. The CancelControls action is used for this purpose, applied in a similar way to the SendControls action.


6.3. Control by Using SetVariableOperator Action

Home > Techniques of Diagram Creation > 6 Organization of Control Operations > 6.3. Control by Using SetVariable Operator Action

6.3. Control by Using SetVariable Operator Action

If the method of sending the settings not based on the built-in object mechanisms is applied, then it is necessary to use the SetVariable operator action. This function is available in two variants.

SetVariable(Alfa,1)

This variant sets the Alfa variable directly to the value of 1.

SetVariable(Alfa,1,0xf)

This variant sets/executes the bit modification of the Alfa variable. The four least significant bits are set to the value of 0001. Please note that the bit controls are highly inefficient in terms of execution time and bandwidth usage.

Although the direct entering of the variable name is correct, the context convention should be used whenever it is possible.

SetVariable(””,1)

SetVariable(”#”,1)

SetVariable(”#Set”,1)

The following examples use: name of object controlled variable, name of object main variable, name consisting of name of main variable and the Set suffix. It is also worth to define the main variable for the objects which are used only for control and use it in the SetVariable action.


6.4. Control Validity Check

In case of controls with delay, it is important to define how long the entered setting is valid. The button executing the CancelControls action may be added to the application. This will allow the operator to withdraw the control operation without closing the diagram. There is also an automatic method. The validity time for the controls can be specified in the Control Timeout field, in the Stations Settings panel, in the Settings tab. If it is set, the setting values will be invalid when the time specified expires.

There also could be a problem when the setting selected on the diagram of the station type remains valid but the station itself was overlaid by another window (i.e. the user cannot see the control signalling). The solution is to use the SendControls action with the $AllVisible parameter. This causes that the send signal applies only to objects on the windows that are not overlaid in any way by other window.


6.5. Controlling Permissions

The authority control for currently logged in user is very important in many applications when it goes to execute the control operations. The security system features the Right to send control commands privilege. The user must perform a role for which that privilege is active. Otherwise, every control operation executed by the user will fail.

From the perspective of the security it is enough to adequately parameterize the security system. However, it is better to take focus on the authority control before it comes to attempt to execute the control operations. The objects feature two properties that can be used for this purpose: Active and Visible. Both properties are of boolean type. The built-in object control functions as well as responses to the mouse click are blocked by setting the Active property to false (NO). The unwanted object may be completely hidden with the Visible property.

The proper procedure involves defining the role in which the Control send right permission is active and then adjoining to it all users who should have the ability to execute the controls. Then, that will be enough to use the expression using the HasRole function in the Active or Visible properties of the objects associated with the control operation.

Basic Properties
 | Active | =HasRole(SuperOperator)
 | Main Variable | AlarmLimit
 | Control Variable | #
State Properties, primary state
 | Text | #

The example above shows a part of the Text object parameterization. If the logged user does not perform the role of the SuperOperator, the object will be displayed the setting value but will not allow changing it.

The same mechanism may be used as well in a slightly different scheme of operation. Let's assume, that the standard operator has the control permissions. However, we want to make some control operations available only for some operators. To do this, the additional role is to be created (it is not required to feature any active privileges) and assigned to the appropriate users, then, using the HasRole function the critical objects should be blocked.


6.5.1. Double Confirmation of Control Operations

Occasionally, a different operating mode in which the operator controls the process but the execution of some operations requires additional confirmation of another person, is needed. However, we don't want to change the logged in user. The ConfirmRole operator action will be used for this purpose.

Basic Properties
 | Active | True
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
State Properties, primary state
 | On | False
 | Off Text | Send
Events
 | Button Off | ^Actions(ConfirmRole(Manager,$Always), SendControls($All))

The example above is the modification of the button which sends the signal of the delayed controls. In this case, the executed action is a combination of the ConfirmRole and SendControls actions. The use of the ConfirmRole action results in opening the login window. The check, whether the user performs the role specified in the call, will follow after the authorisation. If so, the further combination actions are executed in the context of the new user. After completion of all actions the user context will be restored to the state it had before the operation. Invalid authorisation or incorrect role causes an interruption of performing the combination actions. The mechanism of the action sets initiated by the ActionSet call may also be used instead of the Actions action.

Such method of use of the SendControls action allows the objects to be protected by built-in control mechanisms, for example Text, or Bar. The objects executing the controls (or other task) by using the immediate action execution are protected in a similar way.

Basic Properties
 | Active | True
 | Switch Mode | False
State Properties, primary state
 | On | False
 | Off Text | Enable
 | On Text |
Events
 | Button Off | ^Actions(ConfirmRole(Manager,$Always), SendControls($Diagram))

In this case the button object requests verification of the user role as the part of the Button Off event handling.

The ConfirmRole action may also be used in other ways. It can be used if the logged in operator is to be authorized again before executing the operation. This avoids the situation in which unauthorized person takes control over the computer when the operator has left position for a while.


7 Parameterization of Interactive Functions of Passive Objects

A large part of the available object classes do not feature any built-in mechanisms of interaction with the user. Their standard functionality is limited to displaying an information. However, it is possible to add the custom interactive functions to the objects of any type. The interactive functionality of the objects that are already provided with these kind of functions may also be extended (for example the Buttons).

Adding interactive functions to an object is mainly based on handling events associated with the mouse operations (e.g. right-click) and pressing the keys. The supplementation is the set of functions which returns the state of the mouse and keyboard (for example IsMouseOver and IsShiftPressed), that when used in the definitions of the object properties allow an object appearance to be linked with the operator operations.


7.1. Navigation Through Text Links

The effect that will be achieved in this example is the use of the text links (similar to the links used in a browser) on diagrams. The object of the Text class displaying a static text will be used as a base object. Clicking on the text executes the action. At same time we want to visually present the link activity.

Basic Properties
 | Active | True
 | Cursor | Hand
State Properties, primary state
 | Text | Fan scheme
State Properties, state number 1
 | State Condition | =IsMouseOver()
 | Color | Blue
 | Font Style | Underline
Events
 | Left Button Click | ^OpenWindow(null,Info,Fan,null)

Setting the Active property to True enables full support of the interactive functions. Otherwise, only the mouse click event handling would be functional.

The Cursor property specifies the form of mouse cursor when it hovers over the area occupied by the object.

The state group controlled by the =IsMouseOver() conditional expression is activated when the cursor hovers over the object area. As a result, the text colour is changed into blue and the text is displayed as underlined.

The OpenWindow action in the handling of the Left Button Click event will open the Fan diagram in the Info panel of the current window.


7.2. Connecting Context Menu to Object

We want to obtain the commonly used mechanism of so-called context menu. Pressing the right mouse button when the cursor is in the area of the object should display the context menu.

The object of any class may be used as the base object (excluding the control objects, for example Web Browser, which take over the mouse handling process). We start with creating and defining the context menu. Using the menu in the object requires only using the ShowMenu action in the Right Button Down event handling.

Basic Properties
 | Main Variable | P1000
Events
 | Right Button Down | ^ShowMenu(MenuCtx,"v="+Attribute(Name))

The ShowMenu action opens the menu of the MenuCtx name transferring into it the name of the main variable (as parameter) of the object in the context of which the menu has been opened.


7.3. Diagram Activity Zones

In another example we want to create a mechanism based on the fact that clicking on a selected area of the diagram will execute the appropriate operator action. Any set of objects may be located in the diagram active area. The active area is to be visible only when the mouse cursor hovers over this area. The following illustration shows the activity area over the large picture.

Fig. The Activity Area Over The Large Picture.

The object of the Shape class will be used as the object on which the activity zone will be created.

Basic Properties
 | Active | True
 | Cursor | Hand
 | Shape Kind | Rectangle
 | Rounding Radius | 15
State Properties, primary state
 | Color | Transparent
State Properties, state number 1
 | State Condition | =IsMouseOver()
 | Color | Turquoise
 | Opacity | 0.4
Events
 | Left button Click | ^OpenWindow(null,Info,Askom,null)

Setting the Active property to True enables full support of the interactive functions. Otherwise, only the mouse click event handling would be functional.

The Cursor property specifies the form of mouse cursor when it hovers over the area occupied by the object.

In the basic group, the Color property is set to Transparent. This results in that the object in normal state remains invisible. The state group controlled by the =IsMouseOver() conditional expression is activated when the cursor hovers over the object area. As a result, the colour of the object changes and the shape becomes visible. At the same time the transparency level setting makes visible the objects located under the shape.

The OpenWindow action in the handling of the Left Button Click event will open the Askom diagram in the Info panel of the current window when the mouse button is clicked within the object area.


7.4. Self-Repetitive Operations

Most of the events associated with mouse handling is of one-time type. However, the events set includes one pair of the Left Button Hold and Right Button Hold events which are called repeatedly for the time when the appropriate button is pressed and the mouse cursor is in the object area.

The Left Button Hold event will be used to increment the variable value executed when the button is pressed. The object of the Picture class will be used.

Basic Properties
 | Active | True
 | Curosr | UpArrow
 | Main Variable | P1000
State Properties, primary state
 | Picture | UpHand
Events
 | Left Button Hold | ^SetVariable("#",Variable()+1)

Setting the Active property to True enables full support of the interactive functions. The Cursor property specifies the form of mouse cursor when it hovers over the area occupied by the object.

The action being the part of the event handling changes a main variable value (abbreviated name "#" was used), by increasing its previous value, read out with the Variable() function, by one.

The period of the holding event is declared in a workstation settings.

An alternative to the method of the action iteration described herein is to use the object of the Button class which has the iteration mechanism built-in directly in its operation logic.


7.5. Keyboard Support

In addition to mouse related events handling, the definition of responses to the keyboard key presses is also possible. This example shows the object of the Picture class which increments the variable value every time the 'q' key is pressed, and decrements it every time the 'w' key is pressed.

Basic Properties
 | Active |  | True
 | Main Variable |  | P1000
State Properties, primary state
 | Picture |  | Arrows
State Properties, state number 1
 | State Condition | =IsSelected()
 | Opacity | 0.5
Events
 | Key Press |  | ^Actions( Perform(LastKeyPressed()==Q,SetVariable("#",Variable()+1),Nothing()), Perform(LastKeyPressed()==W,SetVariable("#",Variable()-1),Nothing()) )

Setting the Active property to True enables full support of the interactive functions. It allows the user to select the object.

The state group controlled by the =IsSelected() conditional expression is activated when the cursor hovers over the object area. As result of this, the appearance of the picture is changed via modification of the Colour property.

The Actions action being the part of the event handling is a combination of the two Perform conditional actions. On the other hand, each of the Perform actions checks whether the correct key has been pressed and, provided that the check is successful, increments or decrements the main variable value.

An alternative methods of the keyboard handling are so-called global keys declared for the entire application and the keyboard shortcuts of the Button class objects. The main difference in the operation of the Button object shortcuts is that these shortcuts function even if the object is not selected.


8 Use of Transparency Effect

One of the mechanisms that can be used while developing the application is the transparency of objects and windows. It allows to achieve an interesting graphic effects and to efficiently use the screen surface by displaying different information, one on top of the other.


8.1. Window Transparency

The window transparency level is declared in the Opacity property. It assumes the value from 0 to 1, where 0 means a completely transparent window and value of 1 means a window without the transparency effect. Setting the value lower than 1 makes that the entire window (frame and displayed diagram with objects on it) is transparent. The method of defining diagram objects is arbitrary.


8.2. Object Transparency

Each object may have the individually controlled transparency level. It is set in the Opacity property, included in the group of the state properties. It assumes the value from 0 to 1, where 0 means a completely transparent object and value of 1 means an object without the transparency effect. The transparency effect relates to all graphic elements of the object.

Basic Properties
 | Main Variable | TranspValue
State Properties, primary state
 | Opacity | #

The transparency level is controlled by the value of the TranspValue variable. When combined with the mechanism of variable setting (e.g. Bar object with a slider enabled) allows the user to control smoothly the object transparency level.


8.3. Hiding Objects

Sometimes it is necessary to completely hide an object. This can be done by two methods.

Basic Properties
 | Main Variable | P1000
State Properties, primary state
 | Visible | False
 | Text | Measurement error
State Properties, state number 1
 | State Condition | =VarIsNotGood()
 | Visible | True

In this example, a Text object usually remains invisible. Only when the controlled variable has an incorrect status, the value of the attribute Visible is changed and the object displays a warning message concerning reading the variable.

Basic Properties
 | Main Variable | P1000
State Properties, primary state
 | Text | Measurement error
 | Opacity | 0
State Properties, state number 1
 | State Condition | =VarIsNotGood()
 | Opacity | 1

The visual effect of this example is identical to the previous one. Transparency is used to conceal an object. The difference is that a transparent object (even completely) remains on the diagram and can respond to right mouse button clicks. The object with the Visible property set does not have this possibility.


8.4. Use of the Transparent Colour

Another element which influences the visibility of the object is the use of the Transparent colour. Choosing this colour in the property associated with a component of an object usually means that this element will not be displayed.

State Properties, primary state
 | Visible | True
 | Pointer Color | Red
 | Background Color | Transparent
 | Outline Color | Transparent
 | Calibration Color | Transparent
 | Font Color | Transparent
 | Opacity | 1

The parameter values of the Gauge object, which is shown above, causes only the pointer of the meter to be displayed. Putting such an object over another, fully visible meter, enables the two pointer meter.


9 Controlling the Behaviour of Objects

This chapter describes the methods of changing the appearance or behaviour of objects in response to the interactive activities of the operator. The methods described here enable customizing the appearance of the diagram when it is displayed in the application execution mode.


9.1. Using Virtual Variables

A common mechanism that may be used is to control the appearance or behaviour of objects by additional variables defined in the virtual channel (type None). The condition of controlled objects depends on such variables and the values of the variables are controlled through other objects. One of the features of this method is that the settings selected by the user are permanent - they remain unchanged after closing and returning to the diagram.

An important element of the virtual variables method is to correctly set the initial values. You can use the action SetVariable performed under the task scheduler which is executed when starting the application or when handling the event Diagram Opened.

Basic Properties
 | Main Variable | A1000
State Properties, primary state
 | Visible | =Variable(ShowNames)
 | Text | @Name

The visibility state of the fragment of a text object shown above depends on the value of the virtual variable ShowNames. If the value is other than zero, the name of the variable is displayed on the diagram.

Basic Properties
 | Active | True
 | Main Variable | ShowNames
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Value | 1
 | Off Text | Show names
State Properties, state 1
 | State Condition | =Variable()==0
 | Off Value | 0
 | Off Text | Hide names

The above Button class object is used to switch the values of the ShowNames variable from 0 to 1 or vice versa, which, as a result, allows or blocks the function of showing objects which display variable names on the diagram.


9.2. Modifying Object Properties

Another method of controlling objects in operation is using the operator action SetProperty. This action allows changing the value of any property in any of the named objects. The change only applies to property values. After closing and opening the diagram, the property values will be re-calculated on the basis of their definitions stored in the diagram file.

Basic Properties
 | Element Name | Chart
 | Show legend | False

The above fragment of the definition of the Chart class object shows the Chart object, which in the normal state does not display the legend.

Basic Properties
 | Active | True
 | Cursor | Hand
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Show Legend
Events
 | Button Off | ^SetProperty(Chart,ShowLegend,true)

Basic Properties
 | Active | True
 | Cursor | Hand
 | Buuton Kind | Standard Windows Button
 | Switch mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Hide the legend
Events
 | Button Off | ^SetProperty(Chart,ShowLegend,false)

The above pair of Button objects changes the value of the property ShowLegend for all objects with Chart names. As a result the buttons control the display of chart legend by the chart objects placed on the diagram.


10 Application of Button Class Objects

One of the most frequently used objects in the application is an object of the Button class. The scope of its application is very wide, from organizing the application window switching schema up to a variety of process variable controls.


10.1. Single-Position Button

The simplest and probably the most common case is to use the single-position mode. It then works in a manner similar to standard Windows buttons. The button stays pressed. When the mouse button is pressed it changes its state to pressed and the moment the mouse button is released it automatically returns to the depressed state. The action executing the function of the button is executed during this process.

This mode is used for simple one-off operations such as switching windows or control operations without additional conditions.


10.1.1. Single-Position Button Executing Operator Actions

Basic Properties
 | Active | True
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Flat | =!IsMouseOver()
 | Switch Mode | False
 | Shortcut | Alt+Q
State Properties, primary state
 | On | False
 | Off Color | LightGreen
 | Off Text | Scheme
 | On Text |
Events
 | Button Off | ^OpenWindow(null,Info,Schemat,null)

The Cursor property causes the mouse cursor to change when hovering over the button area to indicate the readiness to perform the operation. The Button Kind property determines the shape of a button. At the same time the expression used in the Flat property causes the button to be displayed in flat form until the mouse hovers over an object. Only after the hovering over an object is it displayed in full three-dimensional form. This effect of course does not have to be used and one may set the value of the property False to Flat.

Setting the Switch Mode to False causes the button to work in single-position mode. Indicating the keyboard short cut causes that apart from using the mouse the user can execute the operation with the keyboard.

The On property determines how to display the button. In the case of the single-position mode it should be set to False.

Most of the state properties determine the attributes of button display. These usually occur in pairs, one for pressed and one for depressed buttons. The provided example the Off Text specifies the description of the button. No such text for the On Text property causes that regardless of the state of the button the Off Text will always be displayed.

Using the Off Color property causes that when a button is momentarily pressed, its background colour changes to further indicate the execution of the operation. Setting the colour and any other attributes for the inclusion is of course not necessary.

The operator action specified in the Off Button event handling replaces the diagram in the Info panel of the current window. In the case of Button objects it is necessary to use the events dedicated for this class of objects, i.e. Button On and Button-Off. Although in some cases similar results can be achieved by using universal mouse events (Left Button Click, etc.), it is better to use dedicated events, which account for the state of a button.


10.1.2. Single-Position Button Executing Control Actions

If it is necessary to perform an operation associated with sending control values to process variables, parameter values based on the execution of the SetVariable operator action can be used. Generally it is however easier to use the functionality built into the button object, which is used to perform direct controls.

Basic Properties
 | Active | True
 | Control Variable | Command
 | Cursor | Hand
 | Buton Kind | Rectangular 3d Button
 | Switch Mode | False
State Properties, primary state
 | On | False
 | Off Value | 0x8
 | Off Text | Enable
 | On Text |

Defining the parameter Off Value means that during the button on/off cycle, a hexadecimal value of 0x8 (16) is sent to the controlled variable Command.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
State Properties, primary state
 | On | False
 | On Value | =Variable()+1
 | Off Text | Increase
 | On Text |

In another example the Off Value is created dynamically. It is equal to the current value of the main variable plus 1. Pressing and releasing the button will increase the value of the main variable by 1. The name of the controlled variable is defined by # - this means using the name of the main variable.


10.2. Single-Position Button with Repeat Function

The Button object also enables working in the auto operation repeat mode or operator action repeat mode.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
 | Repeatable | True
State Properties, primary state
 | On | False
 | On Value | =Variable()+1
 | End repeating Value | 0
 | Off Text | Increase
 | On Text |

The repeat mode is enabled by setting the Repeatable property. While holding down the button the value defined in On Value will be repeatedly sent to the controlled variable (which is identical with the main variable). As a result the value of the variable is incremented continuously. Upon releasing the button the value defined in the property End Repeating Value will be sent. A similar pattern applies to actions based on event handling. The Button On event is executed cyclically and the sequence is finished with the End repeating event.

The time of repetition of the control or action is defined in the positions parameters panel in the in the Settings tab.


10.3. Single-Position Button with Hold

In the case of important controls it may be important to prevent the button from being pressed accidentally. If the mechanism of delayed controls described further should not be used, pressing the button may be combined with the requirement of pressing a key on the keyboard simultaneously.

Basic Properties
 | Active | =IsAltPressed()
 | Main Variable | Level
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
State Properties, primary state
 | On | False
 | Off Value | =Variable()+1
 | Off Color | =IsAltPressed()?LightGreen:LightGray
 | Off Text | Increase
 | On Text |

This is a modification of the earlier example of a single-position simple button which increments the variable value. The Active property is set to true (YES) only if the user presses the Alt key. Only then the object enables pressing the button. Additionally Off Color is also modified according to the state of the Alt key in order to signal an activity of the button.


10.4. Two-Position Button

In the next example we shall build a two-position in which the pressed condition will be determined by the value of the process variable. When clicked the button changes to the opposite state, while performing the appropriate control operation.

Basic Properties
 | Active | True
 | Main Variable | Flag1
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | True
 | Immediate Control | True
State Properties, primary state
 | On | =Variable()
 | Off Value | 0
 | On Value | 1
 | Off Text | Off
 | On Text | On

All functionality is defined in a single state. Setting the property Switch Mode to True causes the button to move in one direction and perform a single control.

If the variable Flag1 is equal to 0, the button is depressed and the description Off is displayed. After pressing the mouse button, the button remains pressed and the description is changed to On. The moment the mouse button is released an On Value is sent to the Flag 1 variable. As a result the button remains pressed (turned on) because the value of the main variable Flag1 changes to a non-zero value. After the operation is executed the button may temporarily return temporarily to its original state Off until the new value of the main variable will be read back.


10.5. Two-Position Button with Delayed Control

A common case is that a two-position button has to be used, where the control operation is not performed immediately but requires a separate confirmation. The functional diagram is very similar to that of an ordinary two-position button.

Basic Properties
 | Active | True
 | Main Variable | Flag1
 | Control Variable | #Control
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | True
 | Immediate Control | False
State Properties, primary state
 | On | =Variable()
 | Off Value | 1
 | On Value | 2
 | On Color | =HasWaitingControl()?LightGreen:LightGray
 | Off Color | =HasWaitingControl()?LightCoral:LightGray
 | Off Text | Off
 | On Text | On

Immediate Control is set to False, which causes that clicking on the button only changes its state to the opposite. The Button is in this state until the control of the SendControls action is approved or cancelled by the CancelControls action. It is important to visually show that the object awaits confirmation of the operation. In the example the button changes colour. The conditional expression uses the function HasWatingControl, which takes the value true if the object is in waiting.

The example shows also that the control (command) is sent to a different variable than the underlying main variable which determines the state of a button. The name of the controlled variable is created by suffixation and in this example it is Flag1Control.

As in the previous example, after the operation is executed it may cause the button to momentarily return to the initial state for the time needed to execute the control, execute the command by the driver and read back the main variable.


10.6. Switch

This example will show the configuration of the Button object in a manner in which its function is in accordance with the function of the object Switch in the classic version of the Axis system. The button remains depressed and its description defines the operational current mode (stopped/started). After completing the control the button remains pressed until the operation is approved. At the same time the description of the button changes and shows which operation will be executed (start/stop).

Basic Properties
 | Active | True
 | Main Variable | MStatus
 | Control Variable | #Control
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
 | Immediate Control | False
State Properties, primary state
 | On | =HasWaitingControl()
 | Off Value | 1
 | On Color | LightGreen
 | Off Text | Started
 | On Text | Stop
State Properties, state 1
 | State Condition | =Variable()&1
 | Off Value | 2
 | Off Text | Stopped
 | On Text | Start

The object uses two variables. The main variable is used to determine the status of the device. Depending on its value the descriptions of the button and the values of the control command change. The object state was used. The control variable with the name composed of the combined main variable name and the Control suffix is used to send control commands (2 is the start command and 1 is the stop command for a device).

In the action diagram above it is important to use a HasWaitingControl expression in the On property. When the button is pressed an object enters a state where it has a valid control value. It remain in this state until the execution of the control (with the SendControls action) or its cancellation. During this time the value of the expression is true and will keep the button pressed. The condition of an important value is additionally indicated by the colour specified in the On Color property.


10.7. Bitwise Control

Sometimes the controls exercised may only change single bits of the controlled variable. In such cases it is necessary to use button objects in the bit control mode. The following example demonstrates a modified two-position button case.

Basic Properties
 | Active | True
 | Main Variable | Status
 | Bitwise control | True
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | True
 | Immediate Control | True
State Properties, primary state
 | On | =Variable()&1
 | Off Value | 1
 | On Value | 1
 | Off Text | Off
 | On Text | On

Setting the Bitwise Control property to True causes a change in the way of an executing the operation of sending a value to a controlled variable. The operation is performed in two steps. First the current value of the controlled variable is actively read, then it is calculated and a new variable value is sent. Keep in mind that this way of working is much less effective (in terms of communication with the driver) than regular controls.

The button state is controlled by the value of the first bit of the main variable. The expression Variable ()&1 delivers a logical product of the variable and the number 1. As a result the button is pressed when the first bit is set. In the transition from the off (depressed) condition to the on condition these bits, the value of which in the On Value property is equal to 1 (in this case, only the least significant bit), are set depending on the variable. In the transition from the on (pressed) condition to the off condition these bits in the controlled variable are set at 0, the value of which in the Off Value property is equal to 1 (in this case the least significant bit of the variable will be set to 0).

In more complicated cases of bit controls use the operator action SetVariable to handle Button On and Button Off events. For example the action SetVariable ("", 3, 0xf) will change the four least significant bits of the controlled variable. The two least significant bits are set to 1 and the remaining are set to 0.


10.8. Grouping Buttons

Sometimes it is necessary to use a group of buttons to perform contradictory operations. The following illustration shows the buttons that switch the device to move forward or backward.

These buttons should work after a confirmation. As a result the user can enter the two buttons into a state of an important control value. Performing the SendControls action would cause the execution of two control operations - the final result would depend on the order of defining objects.

However it is also possible to enable pushing only one button at a time. Groups of controls are used for this purpose.

Button 1

Basic Properties
 | Active | True
 | Main Variable | Move
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
 | Immediate Control | False
 | Control Group | G1
State Properties, primary state
 | On | =HasWaitingControl()
 | On Value | 1
 | On Color | LightGreen
 | Off Text | <<<

Button 2

Basic Properties
 | Active | True
 | Main Variable | Move
 | Control Variable | #
 | Cursor | Hand
 | Button Kind | Rectangular 3d Button
 | Switch Mode | False
 | Immediate Control | False
 | Control Group | G1
State Properties, primary state
 | On | =HasWaitingControl()
 | On Value | 2
 | On Color | LightGreen
 | Off Text | =”>>>”

In the presented set of parameter values the definition of the property Control Group is important. Property values are not important, it is only important for these to be identical for both buttons. At a given moment only one of the two buttons will remain pressed (that is the important control value checked by the HasWaitingControl function).


11 Control Operations in Text Class Objects

Text class objects offer two methods to perform the settings. In the first mode, which is used primarily in objects that show the numerical values of variables, the user enters the new variable value directly. In the second mode, which is used in objects providing text descriptions of bit states, the control consists in selecting a new setting from the list of proposed values.


11.1. Controlling the Numerical Value Entered by the User

In this mode it is important to clearly distinguish the different states of the object: the state showing the current value, the state of entering a new value and the state of awaiting the execution of a control.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | #
 | Minimum Control Value | @SteeringRangeFrom
 | Maximum Control Value | @SteeringRangeTo
 | State Selection Mode | False
 | Edit On Selection | False
 | Initial Edit Value | Empty
 | Immediate Control | False
State Properties, primary state
 | Text | #
 | Color | Black
 | Edit Color | Blue
State Properties, state 1
 | State Condition | =VarIsNotGood()
 | Text | =Variable() + ”?”
 | Color | Crimson
State Properties, state 2
 | State Condition | =HasWaitingControl()
 | Color | Cyan
 | Font Style | Italic

The Active property is set to True, which enables the control functions of the object. The name of the controlled variable and the main variable are identical. The limits for the control variable are also set - the limits are taken directly from the corresponding attributes of the main variable of the object. The property State Selection Mode equal to False means that the new value will be entered directly by the User. The Edit On Selection property defines how to start editing the set point. If False, if an object is selected, the Enter key needs to be pressed or a double-click of the mouse is necessary. For the True value editing will begin immediately after selecting an object. The property Initial Edit Value specifies the text displayed in the object after the start of editing. This may be an empty text, the text last entered or the current text to be displayed.

The property Immediate Control set to False means that after editing (with the Enter key) the new value of the set point will only be sent upon execution of the control action SendControls. The value True would mean sending immediately after editing is complete.

The basic condition properties determine the colour used to display variable values in the normal condition and the colour used when the user edits a new set point.

The property group number 1 describes the text display method when the status of the main variable is incorrect. The colour of the text is changed and the character '?' is added after the value of the variable. This condition is not necessary here, it only serves to illustrate the parameter values of the control in the multi-condition object.

Condition number 2 specifies how to display the new set point after the user finished editing and the operation execution order (action SendControls) have not yet been completed. The colour and font style are changed. The state controlling the waiting period for sending the value is usually placed at the end of the list of states, this way the settings take precedence. Reversing the order in our example would result in a situation, where, despite waiting for the control the text colour defined in the group controlling the variable status could be used.


11.2. Controls From The Selection List

An alternative method of performing controls through the Text object is the use of state selection mode. This mode is usually used in objects that display textual descriptions of the states. Control involves selecting the correct item from a list of possible operations.

Fig. Text Object - The Selection List.

The contents of the list of controls result from the definition of the object states.

Basic Properties
 | Active | True
 | Main Variable | LineState
 | Control Variable | #Control
 | Cursor | Hand
 | State selection by menu | True
 | State Selection Mode | True
 | Immediate Control | True
State Properties, primary state
 | Text | Unrecognised state
 | Color | Black
 | State Selectable | False
State Properties, state 1
 | State Condition | =Variable()&1
 | Text | Manual mode
 | State Value | 8
 | State BitMask | 8
 | State Selectable | =!(Variable()&1)
State Properties, state 2
 | State Condition | =Variable()&2
 | Text | Emergency mode
 | State Value | 4
 | State BitMask |
 | State Selectable | =!(Variable()&2)
State Properties, state 3
 | State Condition | =Variable()&4
 | Text | Automatic mode
 | State Value | 0
 | State BitMask | 8
 | State Selectable | =!(Variable()&4)

The Active property is set to True, which enables the control functions of the object. Controlled variable name is created based on the main variable name by adding the Control suffix. The property State Selection Mode chooses operation in selection mode and Immediate Control set to True causes the execution of the control to be effected immediately after selecting the state. Delayed control is of course possible. In this case it would be necessary to add waiting state signalling, e.g. by using the expression HasWaitingControl()?Red: Black in the definition of the property Colour or adding another state.

The basic state of an object defines the appearance of the object in case of an abnormal value​of the monitored variable. The next three states are used to decode the variable value to a text description, the condition of the state is a test of the settings for the selected bit. The property Selectable State determines whether the description of the state is to appear in the control operation selection list. The terms used cause the description to appear in the list if it is not the present state (the expressions are negations of the conditions of the state).

It is also possible to define states of the objects used only for control. To this end the State Condition should be set to False and the State Selectable should be set to True.

The properties State Value and State BitMask determine how are the controls executed. An undefined mask means the direct control of the state value. A defined mask means bit controls. In the example shown, the state no. 1 is the change of the fourth bit of the controlled variable to 1, the state no. 2 means sending the value of 4, and the state no. 3 is a fourth bit change to the value of 0.

An appearance of the state list (colours and font) is parametrised in the Stations Settings panel in the Settings tab of the States Menu Settings frame.

A similar functionality may be achieved by connecting a context menu to an object.

See also: 7.2. Connecting Context Menu to Object


12 Using Sliders in Bar Class Objects

The main task of the Bar class objects is displaying the process variables values in the form of bars (horizontal or vertical). They may also be used as static objects for displaying a numerical scale on a diagram.

This section deals with the rules of using sliders built in the Bar class object.


12.1. Using Slider to Control Set Point Values

In this application, the bar is used to show the current setting value, and simultaneously, it allows changing the value using a slider.

Basic Properties
 | Active | True
 | Main Variable | SliderSet
 | Control Variable | #
 | Minimum Control Value | @SteeringRangeFrom
 | Maximum Control Value | @SteeringRangeTo
 | Pointer Style | =IsMouseOver()?Holder:None
 | Use Limits | False
 | Bar Value | #
 | Pointer Value | #
 | Minimum Value | @SteeringRangeFrom
 | Maximum Value | @SteeringRangeTo
 | Immediate Control | True
State Properties, primary state
 | Pointer Color | Transparent

Since the bar size and slider position (pointer) depend on the same variable, the Control Variable is specified with the # short notation. The range of the slider variation depends on the range specified in the pair of properties Minimum Control Value and Maximum Control Value. The bar range depends on the pair of properties Minimum Value and Maximum Value. Since in our application the slider and bar show an identical value, both the ranges were identically set and are based on the settings of the SliderSet variable control range specified in the variable definition database. The current bar value is specified by the Bar Value property - using the # notation means that the main variable value was loaded. The slider position (pointer) in the Pointer Value property is specified in a similar way.

Using the IsMouseOver()?Holder:None conditional expression in the Pointer Style property causes that the slider in the normal state is not displayed, whereas when the cursor hovers over the object, the slider is displayed and allows the set point to be changed.

Using the Transparent colour in the Pointer Color property does not hide the slider, but only displays it in the semi-transparent form.


12.2. Using the Slider to Control Set Value With a New Set

Home > Techniques of Diagram Creation > 12 Using Sliders in Bar Class Objects > 12.2. Using the Slider to Control Set Value With a New Set Point Preview

12.2. Using the Slider to Control Set Value With a New Set Point Preview

The following example shows how to connect on the single Bar class object the presentation of a measurement current value and measurement set value with a setting change possibility. Simultaneously, while changing the set value (slider dragging), its value in the form of text will be shown on the separate Text class object.

Basic Properties
 | Active | True
 | Main Variable | Level
 | Control Variable | #Set
 | Preview Variable | #View
 | Minimum Control Value | =Attribute("#Set",SteeringRangeFrom)
 | Maximum Control Value | =Attribute("#Set",SteeringRangeTo)
 | Pointer Style | =IsMouseOver()?Holder:Triangles
 | Use Limits | True
 | Bar Value | #
 | Pointer Value | #Set
 | Minimum Value | @DisplayRangeFrom
 | Maximum Value | @DisplayRangeTo
 | Value LL | @LimitLoLo
 | Value L | @LimitLo
 | Value H | @LimitHi
 | Value HH | @LimitHiHi
 | Immediate Control | True

The bar height will depend on the Level variable value, and the slider (pointer) position will depend on the Level Set variable specified in the suffix notation. In the Minimum Control Value and Maximum Control Value properties, the slider value variation range needs to be specified in order to determine the slider position. The used expressions refer to the LevelSet variable attributes stored in the variable definition database. The bar height depends on the range specified in the Minimum Value and Maximum Value properties. In our example, this range is defined by the main variable displaying range attributes. Both the bar and slider variation ranges must be consistent, e.g. the bar size may depend on an absolute value and the set value (slider position) may be specified as percentage value.

Settings of the Use Limits, Value LL, Value L, Value H and Value HH properties change the bar colour when the individual warning limits are exceeded. The limit values are loaded from the Level main variable attributes.

Using the IsMouseOver()?Holder:Triangles conditional expression in the Pointer Style property causes that in a normal state the slider position is displayed in the form of two triangles on the background of the bar strip but when the cursor hovers over the object, the slider changes the shape indicating readiness to perform a new set point.

The Preview Variable # View property definition causes that when dragging the slider, the setting value corresponding to its temporary position will be set in the LevelView variable. Such a variable should be defined in a virtual channel, and its value may be displayed, e.g. by the Text class object.

Basic Properties
 | Main Variable | SliderView
State Properties, primary state
 | Visible | =Variable()>-1e200
 | Text | #

If the slider is not being dragged, the slider preview variable is set to the Double type minimum value. It is used in the Visible property definition of the Text object. The object is visible on a diagram, only when the slider new position is being selected.


13 Motion Animation and Object Resizing

The section presents the dynamic methods of changing an object position and size on a diagram. The specificity of this problem lies in the fact, that it is impossible to directly change the object properties responsible for its location and size. The X, Y, Width, Height properties are always entered directly.

To change the object position or size in the application run mode, the Animation event and the SetPosition, SetSize and SetBounds operator actions may be used. In the Animation event handling, one of the actions with appropriately calculated parameters of the object location and/or size should be used, as required.


13.1. Changing Position

In the following example, the position of the Picture type object will be changed. The position on the X-axis will be controlled by the CarPosX process variable of value ranging from 0 to 100 specifies the image shift in pixels measured from the start position.

Basic Properties
 | Main Variable | CarPosX
State Properties, primary state
 | Picture Name | Car
Events
 | Animation | ^SetPosition( RelToAbsX(100+Variable(),null)

The start position is set to 100 The CarPosX variable value is added to the start position value. The position calculated in pixels in this method, must be then converted into an absolute value using the RelToAbsX function. All the function parameters of the position and size change are transmitted in the absolute values ​​independent of the diagram size. The absolute value of 1 000 000 always corresponds to the right edge of diagram. The null value in the second parameter of the SetPosition action, indicates that the Y coordinate of an object is not a subject of change.

The object size change can be changed in a similar way, but in this case, the SetSize or SetBounds action should be used.

The action shown in the example above has one fundamental disadvantage - it only runs properly if the diagram has a fixed size. In the case of a scaled diagram, the position calculations must be based on the absolute coordinates.

Basic Properties
 | Main Variable | CarPosX
State Properties, primary state
 | Picture Name | Car
Events
 | Animation | ^SetPosition(500000+100000*(Variable()/100.0), null)

In the example above, the image base position is the diagram centre (absolute value of 500 000). With the CarPosX variable value of 100, the extreme right position is located at the 60% of diagram width.


13.2. Changing Position Within Area Defined by Another Object

The above problem of the coordinates conversion can be avoided using the object relative positioning method. The motion range is determined by a special object (it may be invisible) within which, a specific object is positioned.

State Properties, primary state
 | Picture Name | Car
Events
 | Animation | ^SetPosition( LocalProperty(area,X) + ( LocalProperty(area,Width) * (Variable(CarPosX)/100.0) ), LocalProperty(area,Y) + (LocalProperty(area,Height) * (Variable(CarPosY)/100.0)) )

This example assumes that the object named area is located on the diagram. It can be e.g. the Shape class rectangular object. To convert the image position, the coordinates of the area object are used, read out with the LocalProperty function. The variables controlling the position on both CarPosY and CarPosX axes are within the range from 0 to 100.

The advantage of this solution is that the change of motion range, only requires the area object position change; changing the positioning expression in the object image is not required.


13.3. Positioning Groups and Templates

The methods of handling the object groups and embedded templates are identical as in the case of single objects. The Animation event for groups and templates allows controlling their position and size.


14 Alarm State Indication and Handling

The Active Alarms Viewer and Historical Alarms Viewer objects are the basic mechanisms for viewing and handling alarms. They show the state of alarms in a tabular form and are provided with a toolbar.

See also:

- Getting Started > Application with Alarm Handling;

- Objects > Active Alarms Viewer Object, Historical Alarms Viewer Object;

- System of Alarms.

This section, however, deals with the methods of handling and signalling alarms directly on the synoptic diagrams, using universal objects.


14.1. Single Alarm State Monitoring and Handling

In the following example, a typical mechanism for alarm signalisation using the Picture class object will be shown. The object state will be controlled using the IsAlarm, IsAlarmUnaccepted and IsAlarmExcluded functions. An additional object will be used to acknowledge an alarm with the AcceptAlarm operator action. The other operator actions related to the alarm handling include: ExcludeAlarm and IncludeAlarm.

State Properties, primary state
 | Visible | False
 | Picture Name |
State Properties, state 1
 | State Condition | =IsAlarm(A1001)
 | Visible | =!IsAlarmExcluded(A1001)
 | Picture Name | AlrRed
State Properties, state 2
 | State Condition | =IsAlarmUnaccepted(A1001)
 | Visible | =!IsAlarmExcluded(A1001)
 | Picture Name | =IsBlinkOff()?AlrYellow:null
Events
 | Right Button Click | ^AcceptAlarm(null,A1001)

In the basic state, a picture is not visible. The state no. 1 is activated when an alarm of the A1001 ID changes its state to Active (initiated). The state no. 2 is activated when the alarm is not acknowledged. Because the state with a higher number takes precedence, in the period in which the alarm remains unacknowledged (terminated or not), the AlrYellow image is displayed. Additionally, the use of the conditional expression with the IsBlinkoff function causes the image blinking. If the alarm is Active but acknowledged, the AlrRed image is displayed. Please note that the terminated alarms state monitoring depends on the used active alarm log operation mode. If a terminated alarm is removed from the log (after the terminated alarm storage time elapses), the IsAlarmUnaccepted function will return the false value, even if the alarm is unacknowledged.

Since the IsAlarm and IsAlarmUnaccepted functions return an alarm actual state, regardless of whether it was excluded by the Operator from handling or not, it is necessary to use the IsAlarmExcluded function in the Visible property. If exclusions were not used in the application, using both the states of the True value in the Visible property would be sufficient.

The AcceptAlarm action used in the Right Button Click event handling, acknowledges the A1001 alarm.

The example assumes that only one alarm domain is defined in the application. Otherwise, the IsAlarm function variants and similar, should be used along with an explicit specification of the domain name.

The above example, although correct, has one major disadvantage. An attempt to use an object to control another alarm, requires modification of five properties. The recommended procedure is to convert an object into a template with the parameter that specify the alarm ID and the Parameter function call wherever the ID was used. The example below may be also followed.

Basic Properties
 | Main Variable | A1001
State Properties, primary state
 | Visible | False
 | Picture Name |
State Properties, state 1
 | State Condition | =IsAlarm(LocalProperty(MainVar))
 | Visible | =!IsAlarmExcluded(LocalProperty(MainVar))
 | Picture Name | AlrRed
State Properties, state 2
 | State Condition | =IsAlarmUnaccepted(LocalProperty(MainVar))
 | Visible | =!IsAlarmExcluded(LocalProperty(MainVar))
 | Picture Name | =IsBlinkOff()?AlrYellow:null
Events
 | Right Button Click | ^AcceptAlarm(null, LocalProperty(MainVar))

This variant works exactly the same way as the previous one. The alarm ID, however, was only specified in the Main Variable property. The fact that such a variable does not exist is of no significance. The context of use of the property is important. In this case, the property value is retrieved using the LocalPropert function and it is used as an alarm ID.


14.2. Indicating States of Alarm Group

When using the AlarmsGroupState function, it is possible to control alarm group state in the selected group, or even in the entire domain. In this example, the semi-transparent Shape class object will be used, to indicate alarms in a section of the controlled system.

Basic Properties
 | Layer | 10
State Properties, primary state
 | Visible | False
 | Opacity | 0.1
State Properties, state 1
 | State Condition | = AlarmsGroupState (Block1, "Zone = S1")&1
 | Visible | True
 | Color | Cyan
 | Outline Color | Blue
 | Opacity | 0.5
State Properties, state 2
 | State Condition | = AlarmsGroupState (Block1, "Zone = S1")&4
 | Visible | True
 | Color | Coral
 | Outline Color | Red
 | Opacity | 0.5

Create the Shape class object in such a location, so it overlays the relevant section of a diagram. For this purpose, changing the Layer property may be necessary. In the basic state, the object is to remain invisible. Because the Visible property value is ignored when editing the diagram, the Opacity property should be changed as well - it will facilitate the diagram editing, the objects underneath the Shape objects will be visible. Then, add the two states used for indicating the alarms. Each of them has the individually set colour attributes, the Visible property set to True, and the appropriate level of transparency set. In the state conditions, the AlarmsGroupState function was used. This function controls the alarm states of the Block1 domain for which the Zone grouping attribute is equal to S1. The value returned via the function, can be interpreted in different ways. In our case, a bitwise AND operator with the value of 1 (the least significant bit test) checks whether a group contains an unacknowledged alarm. Test with the value of 4 (number 2 bit test) checks whether a group contains at least one unacknowledged Active alarm. Due to the state definitions sequence, if a group contains the unacknowledged Active alarm, a "glass" in the Coral colour will be displayed. If the group does not contain such an alarm, but contains at least one terminated and acknowledged alarm, the "glass" will be in the Cyan colour.

For the alarm group state indication, the AlarmsCount function which returns the number of alarms in the selected group including the activity and acknowledgement states can be used as well


15 Controlling Chart Class Objects

The Chart class objects have their own built-in interfaces for the interoperability with the user. The alternative is also the Chart controller object which allows controlling the chart functions. In some operation scenarios, however, adding custom controlling mechanisms may be necessary.


15.1. Controlling Time Range of Chart

In the standard application, the chart objects upon opening a diagram show a defined period of time in the object, calculated from the current moment. The user can further select any other time range, provided that the function was not locked. However, additional mechanisms for selecting the time range by the user may be added, alternatively, the time range may be forced based on the data retrieved from various sources.


15.1.1. Modifying Chart Object Properties

The time range shown on the object depends on the three properties. The time range length is specified in the Time range [min] property. The range end (the right section) is defined by the Manual base time property. However, it is only of significance, if the Refresh mode property is additionally set to Manual, otherwise the chart end point will be defined by the current moment.

The chart time ranges can be changed using the SetProperty operator action.

Basic Properties
 | Element Name | Chart
 | Manual base time |
 | Time range [min] | 10
 | Refresh mode | Manual

The above fragment of the Chart class object definition shows the object named Chart which upon a diagram opening displays a chart for the last 10 minutes. It is important to name the object and select the refresh manual mode.

The following Button class objects are used for switching the time range.

Basic Properties
 | Active | True
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Last hour
Events
 | Button Off | ^Actions(SetProperty(Chart,ManualBaseTime,OPCTime("HOUR+1H")), SetProperty(Chart,TimeRange,60))

Basic Properties
 | Active | True
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Last 15 minutes
Events
 | Button Off | ^Actions(SetProperty(Chart,ManualBaseTime,OPCTime("Minute15+15M")), SetProperty(Chart,TimeRange,15))

The both objects use the multiply Actions action with the SetProperty component actions to modify the Manual base time property value (internal name ManualBaseTime) and the Time range [min] (internal name TimeRange). The Time range [min] property change is obvious. For the ManualBaseTime property, a new value must be converted into the DateTime format. It can be specified in a text form, loaded from the DateTime type variable, calculated using the FromAsix6Date function. In the examples, the OPCTime function which in an easy way allows specifying the period of time calculated on the basis of the current moment is used. The OPCTime("HOUR+1H") expression calculates the end of current hour (e.g. for the 13:20 current moment, returns the 14:00 value), i.e. the chart will show the period from the beginning of the current hour to its end). The OPCTime("Minute15+15 M") expression which displays the current, full 15-minute period, function in a similar way.


15.1.2. Controlling Via Virtual Variable

It is also possible to control the time range via the DateTime type variables, as an alternative to setting the chart property values directly. This allows full operation automation.

Basic Properties
 | Manual base time | =Variable(TimeMax)
 | Time range [min] | 10
 | Refresh mode | Manual

In the above case, the base time (the range end) results form the TimeMax variable value. The variable should be of the DateTime type value. Alternatively, a relevant conversion should be performed, e.g. using the ToDateTime function. Each change of the TimeMax variable value automatically alters the chart range accordingly.

The TimeMax variable value can be set using a script, loaded directly from a controller (with appropriate conversions) or entered using the Text object.

Basic Properties
 | Active | True
 | Main Variable | TimeMax
 | Control Variable | #
 | Initial Edit Value | Current
 | Immediate Control | True
State Properties, primary state
 | Text | #

If the TimeMax variable type was defined as DateTime, a new value should be specified in accordance with any system date and time text format. After verifying the correctness of the new value form, it will be converted into the DateTime type and stored in the TimeMax variable, thus affecting the time range displayed in the chart.


15.2. Controlling Trend Patterns Displaying

The Chart objects can also display the so-called trend patterns. Specifying the correct anchor point of the trend pattern is then critical.

Basic Properties
 | Customizable trend patterns | False
Trend patterns, series # 1
 | Pattern Name | Trend1
 | Pattern Anchor | &PatternTime

The Customizable trend patterns property determines, whether the user can change a pattern curve and its anchor point (using the commands from the object context menu). If controlling the object operation with custom mechanisms is preferred, it is recommended to disable the User support.

For the pattern curve selection the Pattern Name property is responsible, and for its anchor point the Anchor Pattern property is responsible. In our example, the anchor point is set based on the PatternTime variable value which should be of DateTime type.

Basic Properties
 | Active | True
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Anchor pattern
Events
 | Button Off | ^SetVariable(PatternTime,OPCTime("NOW-5M"))

Basic Properties
 | Active | True
 | Button Kind | Standard Windows Button
 | Switch Mode | False
 | Immediate Control | True
State Properties, primary state
 | On | False
 | Off Text | Hide pattern
Events
 | Button Off | ^SetVariable(PatternTime,"2000-1-1")

The first of the Button objects sets the PatternTime to the value of 5 minutes before the current moment. This will display the pattern curve from this moment.

The second button hides the pattern trend by moving it outside the time range visible on the Chart object. An alternative method of removing pattern curve is to change the trend name to an empty name (the trend name can be also specified via a virtual variable).


16 Using Templates

The objects templates facilitate the application development. They allow creating "blocks" from which the application is built. A template can combine object groups, or in simpler cases, can contain a single object, but with the pre-set properties. Templates can have parameters which are used to specify the template functioning in its embedment place on a diagram.

In the example, the structure of a single object template based on the Gauge class object will be dealt with. The template will indicate when two alarm limits are exceeded, and the limit values and value ranges will be loaded from the variable definition database.

Table: Template parameters.

Template parameters
EndAngle |  |
 | Default value | 405
StartAngle |  |
 | Default value | 135
Variable |  |
 | Default value |

The template will have 3 parameters. StartAngle and EndAngle determine the extreme angles of the gauge scale. They have specific default values; in the template embedment place, the value of these parameters will need to be specified, provided that they are different from the default values. The Variable parameter is used to transmit the process variable name which value will be shown on the gauge.

When preparing (editing) the pattern, the parameters test values may be specified. This allows checking whether the template functions, as it was expected.

The partial parameterization of the Gauge object which constitutes the template contents is shown in the table below.

Table: Gauge object example parameters.

Basic Properties
 | Main Variable | %Variable
 | Background Picture | !GaugeBkImage
 | Show Limits | True
 | Value | #
 | Minimum Value | @DisplayRangeFrom
 | Maximum Value | @DisplayRangeTo
 | Value LL | @DisplayRangeFrom
 | Value L | @LimitLo
 | Value H | @LimitHi
 | Value HH | @DisplayRangeTo
 | From Angle | %StartAngle
 | To Angle | %EndAngle
 | Proper Value Color | !GaugeProperColor
 | L Color | Yellow
 | H Color | Yellow
State Properties, primary state
 | Pointer Color | !GaugePointerColor
 | Background Color | !GaugeBkColor
 | Outline Color | =Property(GaugeBkImage) == "" ? Property(GaugeOutlineColor) : Transparent
 | Calibration Color | !GaugeScaleColor
 | Font Color | !GaugeFontColor

The main variable of the object is defined as %Variable. This means a reference to the template parameter named Variable. The variable name will be forwarded to the template, in its embedment place on the diagram. The From Angle and To Angle properties are defined in a similar way.

Some of the properties, among others Background Picture, are defined with a reference to a global property. References of such type are defined by the ! prefix. As a result, the template appearance may be modified by changing the global property value. This method of parameterization is of special importance when the global properties are shared by many templates and objects - it allows changing the entire Application appearance.

The =Property(GaugeBkImage) == "" ? expression Property(GaugeOutlineColor) : The Transparent value used in the Outline Color property shows the conditional colour setting, depending on the global variable value (loaded by the Property function). If the GaugeBkImage global property is not defined (is blank), the outline colour determines the value of the GaugeOutlineColor global property. Otherwise, the outline is hidden by selecting the transparent colour.

The Value property is specified in a typical way, the # notation means the main variable value. Since a main variable is determined by a template parameter, the position of gauge pointer will result from a variable value of the name transmitted in via template parameter. The alarm range and limit properties definitions refer to the variable attributes (the @ prefix). Here, the indirect reference to a variable attribute specified by a template parameter, also occurs.

The L Color and H Color properties are defined directly. If it is necessary to use other colours, two strategies are available. An identical template, with different colours set for alarm trigger limits, can be created, or two additional colour parameters can be added and thus a single universal template created.


Welcome

Home > Application Parameterization

>> Help for Asix

www.asix.com.pl

Asix.Evo - Application Parameterization


1 Configuration of the Application Workstations

When configuring the Evo type application within a single project, the parameters for all workstations which will participate in the application need to be defined. Generally, each server workstation or stand-alone workstation is explicitly declared, while terminal workstations are parameterized altogether.

When creating the application using the wizard, a basic set of workstations can be created at once. A workstation of name compatible with the computer name is created in each case. The primary objective of this workstation is to edit the application (although it can also be used as a production workstation).


1.1 'Stations' Operating Panel

Stations is the main panel used for managing the application workstations.

Fig. 'Stations' Operating Panel.

The illustration presents the configuration of workstations for a typical, small application. In the Serwers area, the following are defined: single engineering workstation (for developing and testing the applications) and a single production operator workstation. In addition, there is a single terminal workstation defined as well. While the application is running within the context of this station, the number of terminals which may be launched is arbitrary.

Stations panel provides two functions. Firstly, it allows to switch between workstations while the station-dependent parameters are edited. Secondly, the panel is used to create and manage new workstations. Workstation management commands are available through the panel context menu. Additionally, the workstation may be moved between the areas using the 'drag and drop' method.

Locating a few workstations in a single area allows for hierarchical parameterization. The parameters defined in the context of the area apply to all the workstations of the area, if not defined otherwise in the workstation itself.


1.1.1 Creating New Workstation

To create a new workstation, the New Station ... command from the panel context menu must be selected.

The workstation parameters are described in the table below:

Figure. Window to Create a New Workstation.

Table: Workstation Parameters.

Parameter

Meaning

Workstation name

Workstation identifying name. In the case of server workstations it is preferable to use the name that matches the computer system name on which the workstation will be run.

Field

The name of the area where the workstation is to be located. It will inherit the area settings. It is also possible to create a workstation outside any area.

Copy settings from

The name of another workstation or area from where the settings are to be copied. Used for creating twin workstations.

Station type

A key parameter determining the intended use of the workstation. Depending on the type chosen, the range of possible functions of the workstation may differ. The following types are available:

  • Server - the workstation may share its data with other workstations and it can perform the function of a network controller in the alarm system.

  • Terminal - a window type terminal which performs exclusively the function of data retrieving client in the network system.

  • WWW Terminal - web terminal which collects all data from server workstations by means of a network mechanism.

  • Standalone - the workstation used in configurations without network communication.

Outgoing protocol

The protocol used for the communication of a data client type. The following protocol types are available:

  • DuplexTcp - the primary mode of communication in the local networks. It can also be used in wide area networks if the transmission is not blocked by a firewall.

  • Tcp - a protocol similar to DuplexTCP but slightly less efficient.

  • Http - a protocol intended mainly for the WWW (web) terminals. However, the WWW Terminal may also use the DuplexTcp protocol if the communication is not blocked by a firewall.

Server address

The address of a server that uniquely identifies the workstation in the network. It may be a system name or an IP address. The box may be left blank if the name of the workstation is consistent with the computer name.

Server protocols

The protocols used by a server workstation for communication with clients. A set of selected protocols must comply with the protocols used by other workstations which will connect to the server.


1.2 Setting the Parameters Depending on a Workstation

The application configuration data set contains elements common to all workstations (windows, charts, menus, images, etc.) as well as the parameters separately defined for each workstation. The workstation parameters refer to the configuration of communication channels and data archives, Action scheduler and the so-called Stations Settings. The operating panels for all of these setting groups can be opened through Application Explorer panel nodes.

The characteristic feature of the operating panels of particular workstations is that the name of the tab displays the name of the workstation (area) to which the displayed settings refer. Switching the operating panel to another workstation is done by clicking on the appropriate workstation panel node.

Fig. Editing Panel for Workstation Settings.

Editing panels for workstation parameters always show the current settings of the workstation. The values ​​of these parameters result from the default settings, settings introduced to the parent area or custom settings. If a given workstation setting has been explicitly modified, it is specially indicated in the operating panel. For example, as the above illustration presents, some values ​​(modified) are displayed in bold. Sometimes there are parameters that cannot be changed. It may occur when the parameter has been defined in the parent area. Such parameters can be changed only in the context of the area in which they have been defined.

The workstation settings can be found in other operating panels, common to all workstations. In such a case, the tables with the parameters for all workstations are displayed. It may be, for example, a table specifying the roles which each of the workstation performs in the alarm management system. Another example is a table of workstation communication settings.


1.3 Configuration of Workstation Communication Parameters

The operating panel of workstation communication parameters is opened by selecting the Global Settings node in the Application Explorer panel and then selecting the Communication tab.

Fig. Workstations Communication Global Settings.

The panel shows the settings of all the application workstations and several global parameters. The global parameters define the port numbers used for the communication between workstations as well as the text identifier used to distinguish the workstations of the various applications running in the shared network.

The workstations shown in the table correspond in a large part to the workstations form the Stations operating panel. The parameters are derived from the settings specified during the creation of workstations.

A special type workstation may be added to the list of workstations using the + button. These workstations are not displayed in the Stations panel and the application cannot be run in the context of these workstations.


1.3.1 Server Aliases

Server aliases are used when a standard server workstation can be identified in the network by several addresses, e.g.: is equipped with two network cards. Depending on the location of terminal workstations in the network, the server can be accessed via different addresses.

When an alias is added, the name of the server and its alternative address needs to be specified.


1.3.2 Foreign Workstations

Foreign workstations are used when there is a necessity to connect to the server from another Asix.Evo application. Only communication between workstations which are defined within the same application is possible as standard. Foreign workstation mechanism allows for the data exchange between different Asix.Evo applications.

When defining a foreign workstation, the network ID of the application to which the foreign server belongs as well as this server address have to be specified.

Fig. Adding Foreign Workstation.


1.4 Running the Application in the Context of the Selected

Home > Application Parameterization > 1 Configuration of the Application Workstations > 1.4 Running the Application in the Context of the Selected Workstation

1.4 Running the Application in the Context of the Selected Workstation

When running the Asix.Evo program, the name of the workstation in the context of which the program is to be run must be specified. By default, if the name is not specified, the program will attempt to run with the computer name. If the workstation of the name compatible with the computer name is not defined, the user will have to select the workstation from the list of all workstations. However, the workstation name can be forced in the command line using the as option.

AsixEvo -as=ST-OP2 "C:\AsixApp\Aplication1"

The example uses the ST-OP2 workstation. The short-cuts that launch the application may be created by means of the short-cut creator run by a command from the Tools menu.

The workstation name, in the context of which the program runs, is displayed in the window title bar of the program.

Fig. Displaying Workstation Name in the window title bar of the Asix.Evo program.

The run mode allows to display the workstation name on the diagram using the integrated virtual variable called StationName.


1.5 Connection Diagnostics

While the program is running, the communication system state may be monitored by a special diagnostic panel. It is possible to view the status of each active workstation of the application. The basic system information on workstations and the list of active connections is displayed as well.

When the architect mode is active, the panel is opened in the explorer panel of the application, using the Diagnostics / Connections node. In the run mode the communication diagnostic panel is available through the control panel window.


2 Current and Historical Data Access Configuration

A key element of any application is to define a set of process variables and the way they can be captured and archived. Parameterization of the access to the process data is performed independently for each workstation of the application. The only exception is the variable definition database which is identical for all workstations, although workstations may use different databases of variable definitions.


2.1 Data Server Configuration

The key decision to be made is the way of collecting the data. To read the variable values from the drivers and to archive them, the Evo type applications use Asmen and Aspad modules, which are also used in the applications of previous type (classic type). These modules are run under the so-called data server.

In the application explorer panel, select the Stations Settings node and then Data Sources tab.

Fig. Workstation Process Data Source Settings.

The name of the workstation which is being parameterized is displayed in the title tab. The workstation may be switched in the Station panel.

It is possible to operate using one of the three strategies:

  1. Do not use

    In this mode, the data server is not used, and thus direct reading of data from the controllers and their archiving is not possible. As a rule, the mode is used only on the window terminal workstations and WWW workstations - the workstation loads all the data form another application workstation which operates in the server mode.

  2. Connect Directly with local Asix application

    Occasionally used mode which allows accessing the data via the Asix application in the previous type, running on the same computer. Typically used to create the browser version of the application of previous type. Such application is converted into the Evo version, and the Asix.Evo server workstation is launched on the same computer as the original server and is used as a data source for the browser workstations.

    In this option, the Asix.Evo data server is initialised within the classic Asix process. To do this, the use of the server in the Architect program should be enabled: the Programs/Asix.Evo tab in the Start parameters panel.

  3. Connect via Data Server

This is the basic operation mode. Virtually in every application, at least one workstation operates in this mode. The data server reads the data from the controllers which control the process and can archive them. The data server can also be used for the two-way data exchange between the Asix.Evo application and the application of previous type. The data server parameterization requires the configuration file name and the operation mode. It is the same file which is used in the applications of previous type. The Architect program is used to edit the file - program operation is described in the accompanying documentation. The data server configuration file can be created with the wizard, while developing the new Asix.Evo application. The file used in the applications of previous type may be used as well. With the [image] button, the Architect program may be run with the relevant configuration file loaded. In a case of the Asix.Evo Application, the Architect functioning is limited to the communication channels and archives configuration and to the variable definition database creation.


2.2 Process Variable Definition Database

In the variable definition database, the information on all the process variables used in the application is stored. This applies to both variables read from the controllers and virtual variables. General rules for the variable definition database use have not changed compared to the previous program versions.

In the Asix.Evo applications, the definition database in the MDB or XML format may be used. The MDB type databases come from the previous program versions. The Architect program is used to edit and generate this type of databases. A detailed description of the rules for the MDB use can be found in the manuals describing the classic application constructions.

The XML databases are used only in the Asix.Evo applications. They are of secondary importance. They are essentially used to define the virtual variables.


2.2.1 Creating a New Database

In the Application Explorer panel in the context menu of the Variable Definitions node, execute the Create Variables Definition Base command.

Fig. The Window for Creating a New Variable Definition Database.

Enter the database name and use the Create button. The new XML type database with a standard set of attributes will be created.

The MDB type databases are created using the Architect program. If the application has been created using the wizard, the MDB database has been created and added during the wizard operation.


2.2.2 Importing the Previously Created Database

In the Application Explorer panel in the context menu of the Variable Definitions node, execute the Import Variable Definition Database form file... command. The databases in the MDB and XML formats can be imported.

Fig. The Window for Importing the Variable Definition Database.

Enter the existing database name and use the OK button. When the variable definition database file is imported, it is copied to the VariableSources subdirectory of the application definition directory.

In the import window, various options controlling the import process are available. They apply mainly to the automatic detection and configuration methods of the channels and archives used in the variable definitions. The default settings are usually optimal. With these, the manual definition process for the channels and archives can be avoided. The channel and archive types are described in the subsequent sections.

If you append a database of SQL variables, you must execute the Append SQL Variable Definition Database... command. In the import window, specify the name of the SQL server and the name of the variable database. Optionally, you can specify the name of the mirror server that is used when the variable database can not be read from the standard location. The other import options are the same as for XML and MDB databases.

Fig. Import window of variable definition database.

A specific feature of the SQL variable databases is that the variable definitions are not copied to the definition directory - they are always read directly from the SQL server. This also applies to browser terminals - they must have access to the server. Therefore, in applications based on work in the browser mode, if they are not limited to the local network, it is recommended to use file definitions databases.


2.2.3 Editing and Browsing the Variable Definition Database

In the Application Explorer panel, double-click on the selected database in the Variable Definitions node. The below operating panel of the variable definition database will open. In the case of the MDB type databases, only browsing the database contents is possible. For the XML databases, the variable editing functions are available.

Fig. The Variable Set Panel for the Variable Definition Database.

In the Variables tab, editing of the variable attributes is performed. Adding or removing a variable is performed with the integrated toolbar buttons or with the context menu commands.

The XML databases are created with a standard set of variable attributes. This set can be changed in the Attributes tab.

Fig. The Panel of Variable Attributes.

The panel displays the descriptions of all the attributes currently used in the variable definition database. Each attribute is defined by:

  1. Attribute Name - attribute name independent of the language used during the parameterization of diagrams in the Attribute function and in the @ abbreviated notation.

  2. Localized Name - multilingual descriptive name used in the variable selection window and in the variable definition panel.

  3. Grouping Attribute - the option marking the attribute as a grouping attribute, i.e. used to crate a hierarchy tree in the variable selection window.

  4. Value Type - specifying the attribute type, allows selecting the appropriate field editor.

The custom attribute of any significance can be added to the existing database using the toolbar [image] button. Typically, it is used to add grouping attributes. Predefined attributes can also be added using the [image] button.

The Languages tab allows declaring in which languages the attribute and variable descriptive properties are given.

The MDB database editing and generating is performed with the Architect program. If the MDB database is modified while developing the Asix.Evo application, it can be reloaded with the Reload Active Databases command from the context menu in the Application Explorer panel.


2.2.4 Variable Attributes

Most of the attributes used in the variable definition databases of the Asix.Evo application are identical as in the case of classic applications. The list below describes only the differences in the attributes interpretation. A complete list of the variable attributes can be found in the Architect.pdf/chm documentation, in Appendix 1.

Name

Description

Value Type

Specifies the variable value type in the Net. Convention. If the MDB database without this attribute is used, it is virtually created based on the converting function used in the variable definition and based on the format.

Format

The value text formatting method in the .Net Convention. A brief description of the .Net format can be found in the Techniques of Diagram Creation part.

In the case of MDB databases, the attribute is virtually created according to the following principles:

  1. If the database has the FormatEvo attribute, it is directly treated as the Asix.Evo Format attribute definition.

  2. If the database does not have the FormatEvo attribute, the Format attribute of the MDB database (specified in the convention of classic application formats) is translated into the corresponding .Net format when loaded.

Readout conversion function

The attribute has the form of an expression that pre-calculates the variable raw value loaded from a driver. The reference to the raw value ​​is performed in the expression contents using the RawValue function.

If the data server (Asix6 channel) is used, regardless of the attribute definition of the function converting a readout, the variable value is subject to the Asmen standard conversion, based on the ConversionFunction attribute.

If the MDB database without the ReadConvertingFunction attribute is used, it is virtually created based on the format used in the variable definition.

Record conversion function

The attribute has the form of an expression that calculates the control value before sending it to the driver.

The rest of the rules are the same as for the ReadConvertingFunction attribute.

Initial value

Specifies the initial value of the variable to be assigned to the variable when the application is started.

Other usage rules are the same as for the Reading conversion function attribute.


2.2.5 Setting the Database Activity Status

Not all the variable definition databases defined in the application must be used on every workstation. In the Application Explorer panel, double-click on the Stations Settings node, and then select the Variable Sources tab. In the Stations panel select an area or workstation.

Fig. Setting the Database Activity Status in the Workstation Settings.

In the open operating panel, the variable definition databases which are to be used on a selected workstation (loaded at the start-up) may be selected.


2.3 Communication Channels

Each communication channel used in the process variable definitions should be parameterized in terms of communication drivers used by the channel. Operating panel used for parameterization of the channel is opened by double-clicking on the Channels node of the Application Explorer panel.

Fig. Panel for Parameterization of Communication Channels.

The channel panel consists of two parts. In the left one, the list of all the application channels is shown. This list can be created while the application is being created using the wizard or when importing the variable definition database, based on the database contents scanning. It is also possible to, at any time, execute the Import channels and archives function from the context menu of the variable definition database node in the Application Explorer panel in order to update the channel list. Regardless of the automatic methods, the channels may be manually added, deleted, and copied using the toolbar buttons and context menu commands.

In the right side of the panel, the list of drivers along with parameters associated with the selected channel is located. One driver of each type can be added to each channel. During the application runtime, the first driver from the list which has an activity option set and was correctly activated will be used. If the active driver is not of the highest priority and during its operation the system detects that one of the drivers of the higher priority may operate, switching to that driver will occur. Adding and removing the drivers as well as reordering them can be performed with the toolbar buttons or the context menu commands.

Letters A and C displayed in the driver abbreviated description indicate respectively: the driver activity status and the control permission. If the driver card are grayed out, it means that the parameterization has been inherited from the superior area.

In the alternative version of the panel, the so-called view of positions, the configuration of channels is shown from the point of view of defined positions. The general rules of conduct are the same as for the channel view.


2.3.1 Communication Drivers

Each of the drivers features standard parameters and an optional set of parameters specific to it.

Fig. Standard Parameter Window of the Communication Driver.

The standard parameters are described in the table below.

Table: Description of the Communication Driver Standard Parameters.

Name | Description
Driver Type | Specifies the type of used communication driver.
Control Allowed | Specifies whether it is possible to perform control functions using defined driver on the selected workstation (within the selected area).
Active | Specifies whether the parameter which allows disabling the driver without removing its definition should be used.


2.3.1.1 NONE driver

The NONE driver is a virtual driver that does not perform any communication operations. It is used only to store the variables whose values are set using the scripts or the operator actions. If no active driver is defined in the channel, the NONE implicit driver will be used.

Tab .: None custom parameters of the driver.

Name | Description
Initialization of variables | Setting the option causes that all variables in the channel have zero initial value and Good status at the start of the application. Otherwise, the variables are set to Null and Bad status.


2.3.1.2 Network Driver

The Network driver is used for the network data exchange between the Asix.Evo application workstations. It is used on terminal type workstations to read the data from server type workstations. (The servers can also retrieve the data from other servers).

Table: Network Driver Non-Standard Parameters.

Name | Description
Stations | The list of server type workstations of the Asix.Evo application to which the driver can connect to obtain the data.


2.3.1.3 Asix6 Driver

The Asix6 driver should be selected for all the channels whose variables are handled via a data server, i.e. in practice, all the physical channels. The actual channel type is specified in the data server configuration file. This file is parameterized in the Architect program. Rules of its parameterization are the same as for the classic application and are described in the Architect program manual.

See also: 2.1. Data server configuration

The driver does not have any non-standard parameters.


Random Driver

Home > Application Parameterization > 2 Current and Historical Data Access Configuration > 2.3 Communication Channels > 2.3.1 Communication Drivers > 2.3.1.4 Random Driver

2.3.1.4. Random Driver

The Random type driver is intended for use in the application launch phase without access to real data sources. The output of the driver is the simulation of random values of variables in the range resulting from the attributes of the minimum and maximum display values and the frequency specified in the refreshing frequency attribute.

The driver does not have any custom parameters.


2.3.2 Types of Virtual Channels

The declaration method for virtual channels of None type requires some further explanation. This can be done by three methods. The table below describes features specific to each declaration method.

Table: The None Type Virtual Channel Declaration Methods.

Declaration Method | Description
Variable without specifying the communication channel name | Variables without the channel name are automatically assigned to a default virtual channel. A variable type can be any .Net type. These variables, however, can not be stored in the Aspad long-term archive. The variable visibility range is limited to a local workstation - they can not be shared via network mechanisms.
Variables in the channels with the None type driver or without explicitly defined driver. | A variable type can be any .Net type. These variables can not be stored in the Aspad long-term archive. It is possible to share the variable values with the other workstations with the Asix.Evo application running.
The variables in the channels with the Asix6 driver and Asmen None type channel | A variable type can be any of Asmen type. The variable values can be stored in the Aspad long-term archive. It is possible to share the variable values with the other workstations with the classic type or Asix.Evo application running.


2.4 Declaration of the Process Variable Value Archives

Each archive used in the definitions of process variables should be parameterized in terms of the archive type. The operating panel used for the archive parameterization is opened by double-clicking on the Archives node of the Application Explorer panel.

Fig. Panel for Declaration of the Process Variable Value Archives.

The archive panel shows the parameterization in the context of a particular workstation or area whose name is shown in the panel title tab. The workstation can be switched via the Stations panel.

The archive panel consists of two parts. In the left one, the list of all the archives used in the application is shown. This list can be created while the application is being created using the wizard or when importing the variable definition database, based on the database contents scanning. It is also possible to, at any time, execute the Import channels and archives functions from the context menu of the variable definition database node in the Application Explorer panel in order to update the archive list. Regardless of the automatic methods, the archives may be manually added, deleted, and copied using the toolbar buttons and context menu commands.

The right part of the panel is used to select the archive type and to define its operating parameters. Please note that in addition to the archive parameters, each variable has individual archiving parameters specified in the ArchivingParameters attribute.

Inherit settings from the field - it is used to set archive parameters according to the settings of the parent area. If the button is grayed out, the current settings are in accordance with the settings of the parent area.


2.4.1.1 Memory Archive

An auxiliary archive in which the variable values are stored only in the operating memory, without saving it into the disk file. The archive stores data only from the moment the application is started.

The archive does not feature any configuration parameters.

The archive horizon defined as a number of minutes should be defined in the ArchivingParameters attribute of the variable.


2.4.1.2 Network Archive

Network Archive is used to read the archive data from the other workstations of the Asix.Evo application. It is used on terminal type workstations to read the data from server type workstations.

The server workstations from which the archive data are to be retrieved should be specified in the archive parameters.

The variable ArchivingParameters attribute contents is of no significance for the network archive.


2.4.1.3 Asix6 Archive

The Asix6 archive is designated for long-term variable value archiving ​​in a file or database archives. The Asix6 archives are handled through the data server. Detailed parameters of the archive operation mode are defined in the data server configuration file. This file is parameterised in the Architect program. Rules of its parameterization are the same as for the classic application and are described in the Architect program manual.

See also: 2.1. Data Server Configuration

The archive does not feature any configuration parameters.

The variable ArchivingParameters attribute is interpreted identically as for the classic applications - it should be defined using the Architect program.


2.4.1.4 Random Data Archive

An auxiliary archive which creates a simulated variable value trends. Designated to demonstrate or test the application operation, without creating the actual value archive.

The archive does not feature any configuration parameters.

Three integers separated by spaces constitute the ArchivingParameters variable attribute contents. The first one specifies the time intervals between return samples [s], the second one specifies the low limit of the value, and the third one the high limit of the value.


3 Scheduler Configuration

The Scheduler mechanism allows for automatic execution of the operator actions. The actions can be executed in a specified time cycle, in response to the occurrence of freely defined conditions or when certain system events take place.

The scheduler tasks are defined in the operating panel that is opened via the Scheduler node in the Application Explorer panel.

Fig. Scheduler Panel.

The scheduler tasks belong to the settings linked to a workstation. Each workstation can have its own set of tasks. The post can also inherit tasks from the parent area. Inheritance is active when there is no self-defined task in the workstation or the option Perform also tasks from field of the station even if the station has own task is selected ...

A new task is added to the scheduler with the toolbar '+' button or with the context menu command.

The following properties are responsible for selection of the execution time for the operator action defined in the task: Execute Mode, Time, Condition and Check condition states.

The values of the Execute Mode property specified in the table below are available.

Table: The Values ​​of the Operator Action Execution Mode Defined in the Task.

Value | Meaning
Always | There are no restrictions, the execution time is determined by the Time and Condition property settings.
Run mode only | The action is only executed when the application is in the full run mode, and the execution time is determined by the Time and Condition properties.
Always except architect mode | The action is only executed when the application is in the full run mode or simplified edit mode, and the execution time is determined by the Time and Condition properties.
Once at application start | The action is executed once, at the time of the application loading, regardless of the start-up mode. This mode is often used to start the so-called resident scripts of the application.
At application start in run mode | The action is executed once, at the start of the application in the run mode (with the run parameter). This mode is often used to start the so-called resident scripts of the application.
At current user change | The action is executed whenever the logged user is changed.

The Time property is used to determine the operator action execution cycle.

Fig. The Operator Action Execution Cycle Declaration.

In addition to the basic execution cycle, expressed in any time unit, a start point offset is also declared. In the example presented, the action will be executed every hour, at 5 minutes past each full hour (0:05, 1:05, etc.). The property value will be saved as: Every 1 Hour Offset: M(5).

Examples of use:

Every 15 Minute - every 15 minutes (every 0, 15, 30 and 45 minute of an hour)

Every 1 Hour - every hour, exactly at full hour

Every 8 Hour Offset: H(6) - every 8 hours, at 6:00, 14:00 and 22:00

Every 1 Week Offset: H(8)D(Monday) - every week, on Monday at 8:00

In the time definition window, the Execute outstanding command may be selected as well. In consequence, at the time of the application start it is verified if the previously planned execution was performed. If not, the single outstanding execution is performed, out of normal sequence.

The Condition property allows defining a task the execution of which depends on meeting the specific condition. The property is in the standard Asix.Evo expression form and should return the boolean true / false value (or eventually not equal to zero/equal to zero). The interdependence of the Time and Condition properties is explained in the table below.

Table: Interdependence of the Time and Condition Properties.

Definition method | Meaning
Only the Time property is defined | An action executed in accordance with the specified time cycle
Only the Condition property is defined | An action performed when the condition value is changed from the false (equal to zero) to true (non-zero) value
Defining the Time and Condition properties | The action is executed in accordance with the specified time cycle, provided that at the time of the planned execution the condition expression is of true (non-zero) value


3.1 Other Methods of the Operator Action Automatic Execution

In addition to the scheduler mechanism, the operator action automatic execution is also possible through:

  • executing the operator action with the ExecuteAction method in the application script code.

  • the operator actions of the Diagram Opened and Closed Diagram events, declared in the diagrams properties - the actions executed at the diagram opening / closing.


4 Parameterization of Multilingual Applications

Asix.Evo allows for a simple creation of multilingual applications, i.e. applications which during their runtime, at the request of a user, switch the language of all the displayed text information. Since the texts are saved in the Unicode standard, it is possible to use all the languages supporting that standard.


4.1 Application Languages Declaration

The first operation to be executed while creating the multilingual application is to determine the languages ​​that will be used. This can be performed when the application is being created, using the wizard. Alternatively, it is possible to use the Language settings operating panel which is opened via the Global Settings node of the Application Explorer panel.

Fig. The Application Languages Declaration Panel.

In the language setting panel, the check box in the Use in application column should be checked - for each language which will be used in the application. In addition, the program language should be specified for the languages used. The program language specifies the fixed texts embedded in the program code, e.g. descriptions of fields in dialogue boxes, text of messages and commands in the menu. Generally, the two predefined program languages may be used: Polish and English. The designer, however, can define the program texts in other languages as well.

The Use formatting column determines whether data formatting according to the local settings should be used when switching the application to the specific language. This applies mainly to displaying of dates. In the Default language column it should be determined which language of the application will be used when it is started.


4.2 Switching the Operating Language

When editing the application, the current language may be switched using the Select Language ... command from the Tools menu.

Fig. Program and Application Language Switching Window.

Using the displayed window, both the application and program language can be freely set.

In the application run mode, the language can be changed using the control panel window. A custom language switching system integrated with the application diagram can be developed. To do this, the SwitchLanguage operator action should be used. The action requires specifying a parameter in the form of a two-letter language code. The language codes are displayed in the language settings panel in the Language column.


4.3 Program Texts

As mentioned previously, Asix.Evo supports two working environment languages: Polish and English. However, other languages can be used, but it requires an explicit determination of the program texts in these languages. To this end, the Program texts work panel opened through the Multilanguage Applications / Application Texts node of the Application Explorer panel should be used.

Fig. Operating Panel for Declaration of Program Texts.

The panel displays all the texts of the program. In the Text Id column, the fixed text ID is specified, and in the Definitions column, a specific text contents in the language selected in the Preview language box is given. After entering the text edit mode, a window for defining text in all the program languages used is displayed.

Providing translations for all the program texts is not required. If the text is not translated, and it needs to be used, the default form will be used: Polish or English (depending on the system settings or selected settings in the SelectLanguage program of the Asix package).


4.4 Application Texts

The application texts are the texts of any types, used in the components of the application being developed. These types include: text displayed on diagrams, alarm definitions, process variable attributes, application menu commands. Each of these components is defined in a manner specific to it, but in general, texts are entered in the multilingual text window which was already shown in the example of the program text definition. In the case of variable and alarm definition database creation based on the Excel spreadsheets, texts are inserted in appropriately named separate columns of the sheets. The details for sheet handling are enclosed in the alarm system manual and in the Architect program user's manual.

In any case, in the application runtime, the selection of a text version compatible with the current application working environment language is entirely automatic.


4.4.1 General Purpose Texts

When displaying multilanguage texts on a diagram or creating a multilanguage application menu is necessary, the application text mechanism should be used. Its operation is similar to the program text mechanism described earlier.

The Application Texts operating panel is opened through the Multilanguage Applications / Application Texts node of the Application Explorer panel.

Fig. The Operating Panel for Declaration of the Application Texts.

For application text in the Text Id column, any unique, language-independent text ID should be specified. All the text language versions should be entered in the Definitions column using the standard multilingual text window.

In order to use the application text in its location of use (e.g. in the Text property of the menu item or in the Off text property of the Button object) the reference to the text should be made using the expression with the Text function, e.g. = Text (AllOff). The parameter of the Text function is the ID of the application text created.

The multilingual application text can also be created while editing the properties of diagrams and objects. The use of the prefix $ property in the definition with an unknown so-far identifier will open a window that allows you to add a new string.

In the script it is possible to reference to the application text, using the ApplicationText method of the IApplication interface.


5 Security System

The Asix.Evo authorization system is based on the user role system. Each application user is assigned to one or several roles. The specific user privileges results from the fact of the assignment to a particular role. In other words, the user can execute a protected operation, if at least in one of its role, this operation is permitted. The action scheme is possible in which the mere fact of being assigned to the role, allows for execution of certain operations.

The operating panel for permissions parameterization is opened through the Security node of the Application Explorer panel.


5.1 Defining Users

The list of currently defined users is displayed on the Users tab of the security panel.

Fig. The Defining Panel of Application Users.

When the application is created, a user of the Administrator identifier which is assigned to the Administrator role is created as well. The user has full privileges and cannot be deleted. With the toolbar '+' button, additional users can be added.

The user is provided with a text identifier which is used in the login process, and with the name performing just an informative function. The login and password should be also defined as well as it should be selected whether the user will have the rights to change the password independently. The Administrator user, initially has a blank password. In the Active column it is possible to disable the user login privilege without deleting it completely. The check box in the Hidden column should be checked if the user ID is not to be shown on the suggestions list in the login window - it increases the level of security. In addition to these parameters, the roles to which the user is assigned in the application should be specified.

The Domain user column is used to determine if the user should be authorized in the Windows domain. The rules for the use of domains are described in the chapter Integration with the Windows domain. At the bottom of the panel you should indicate which roles the selected user has (and what will be his options). The Copy role selection from user button allows you to set the roles of the selected user in the same way as for another previously defined user.

The list of users can be exported and imported into an Excel spreadsheet file. These functions are available through the context menu commands. The functionality is limited only to the basic definition of users - it is not possible to import passwords and belong to groups.


5.2 Defining Roles

The role management is performed in the Roles tab.

Fig. The Application Users' Role Management Panel.

By default, the Administrator role with all the detailed permissions is created. This role can not be changed. With the toolbar '+' button, additional roles can be added.

Each role has the text ID which is used e.g. in the HasRole function and in the CofirmRole action, and the name performing just an informative function. In the Active column, it is possible to disable the role without deleting it completely. At the bottom of the panel, the list of all the detailed permissions is located - the permissions to be assigned to the role should be checked.

The Domain group column is used to determine whether a role is associated with a user's membership in an identically named group in the Windows domain. The rules for the use of domains are described in the chapter Integration with the Windows domain.

At the bottom of the panel there are tabs used to parameterize the role. The Users tab lets you choose the users assigned to the role. There is a list of all the specific standard permissions in the System privileges tab - select the permissions that a role should have. In the Application privileges tab there is a list of all application rights defined by the application designer - you should select those permissions that the role should have.

The Other settings tab allows you to set other application-specific application parameters, but not directly related to the permission control in the application.

In addition to specifying permissions in the Roles tab, the scope of the role possibilities also depends on the parameterization of the access rights to files and the control rights of the selected variables. These rights are set in separate tabs.


5.2.1 The "Runtime Administration Right" Permission

The permission specifies whether the communication diagnostic and script windows, as well as the variable preview window in the application run mode (accessed via the control panel window) can be opened.


5.2.2 The "Control Send Right" Permission

The permission specifies whether the user can execute control commands (values recording into the process variables). In a case of control commands executed through the communication channel of the Network type, an additional control lock, set up at the driver level is possible - it allows locking the control operations on the selected work stations. The control operations lock in the network channel has priority over the users' permissions.


5.2.3 The "Alarms Acceptation Right" Permission

The permission specifies whether the alarms can be acknowledged. Irrespective of this permission, in the alarm system configuration, the right to execute acknowledgement on the selected workstations can be blocked - this lock is of the highest priority.


5.2.4 The "Desktop Is Enabled" Permission

The permission specifies whether the user assigned to the role has full access to all the system functions. Lack of the permission blocks functions such as the Windows taskbar, Windows buttons, Ctrl-Esc, Ctr-Alt-Del etc. However, the locks are used only when the application was run with the dynamic security measures option specified in the program start-up command line.

The protections controlled dynamically by the permission are supplement by the additional protections configured with the StaticPolicies program included in the package.


Privileges

Home > Application Parameterization > 5 Security System > 5.3 Privileges

5.3. Privileges

There are two types of permissions in the Asix.Evo application permission system. System permissions are predefined and are used to control selected functions. The program automatically blocks the functionalities depending on these rights. No additional application designer actions are required. Application privileges are freely defined by the designer in the Application privileges tab. The definition of such a license consists of an identifier and description. The designer must also implement the use of application rights. For this purpose, in places dependent on the selected permission, you can use the HasPrivilege function to check whether the user has permission (he has a role that has this permission assigned).

The names of system permissions usually explain their meaning well. The following sub-chapters provide additional information about certain rights.


Users managing right

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.1. Users managing right

5.3.1. Users managing right

The permission determines whether the logged-in user can manage the list of defined users in the application execution mode. The management window is opened with the SecurityManager action.


Runtime Administration Right

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.2. Runtime Administration Right

5.3.2. Runtime Administration Right

The permission determines whether it is possible to open communication windows and scripts and the variable preview window during application operation (via the control panel window).


Variable Control Right

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.3. Variable Control Right

5.3.3. Variable Control Right

The permission determines whether the user can perform control operations (write values to process variables). In the case of controls performed via the Network communication channel, an additional control block is assumed at the driver level - it allows blocking control operations at selected stations. The control block in the network channel is more important than the users' rights.


Alarms Acknowledge Right

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.4. Alarms Acknowledge Right

5.3.4. Alarms Acknowledge Right

The permission determines whether alarms can be acknowledged. Regardless of this permission in the configuration of the alarm system you can block the possibility of making confirmations at selected positions - this blockade takes precedence.


Desktop Is Enabled

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.5. Desktop Is Enabled

5.3.5. Desktop Is Enabled

The permission determines whether the user taking the role should have full access to all system functions. Lack of permissions blocks such functions as Windows taskbar, Windows buttons, Ctrl-Esc, Ctr-Alt-Del etc. However, locks are only applied when the application has been started giving the option of using dynamic security in the start command line.

Additional protections set by the Static Policies program included in the package are supplementary to the protections dynamically controlled by the permission.


No Automatic Logging Off

Home > Application Parameterization > 5 Security System > 5.3 Privileges > 5.3.6. No Automatic Logging Off

5.3.6. No Automatic Logging Off

Having this permission means that even if automatic logout mechanisms are enabled, the user will not be logged out. This is the only permission that the Administrator user does not have.


File usage protection

Home > Application Parameterization > 5 Security System > 5.4. File Usage Protection

5.4. File Usage Protection

In addition to the privileges related to the control of the execution of specific actions, the protection at the level of access to files included in the application definition is also possible. The effect of such security depends on the type of files. For diagram definition files, you can control the attempts to display specific diagrams. For menu definition files, you can control the display of the context menu. File protection does not always make sense. For example, you can not protect variable definitions database files - they will be loaded regardless of the permissions.

File protection is parameterized in the Protected files tab.

Fig. Security System Settings Panel - Management of Application Protected Files.

In the upper part of the panel there is a list of all files in the application definition directories. Using the commands from the table header line context menu, you can limit the number of displayed files or change their order.

In the Protected column there is the option defining whether the file is currently protected.

At the bottom of the panel there is a list of defined roles. It should be noted which roles have the right to use the indicated file. The file is protected if at least one role (in addition to the Administrator role) has the right to use the file. Otherwise, the file is not protected and is available to all users.


Protection of Control Write to Process Variables

Home > Application Parameterization > 5 Security System > 5.5. Protection of Control Write to Process Variables

5.5. Protection of Control Write to Process Variables

Another element that can be controlled individually is the write control for individual process variables. Typically, the write right is controlled together for all variables by the right to send controls. Irrespective of this, individual permissions can be set in the Protected variables tab.

Fig. Security System Settings Panel - Management of Application Protected Variables.

In the upper part of the panel there is a list of all variables used in the application. Using commands from the table header line context menu, you can limit the number of displayed variables or change their order.

In the Write protection column, there is the option defining whether the entry to a given variable is currently subject to individual protection.

At the bottom of the panel there is a list of defined roles. It should be noted which roles have the right to control the indicated variable. The variable is protected if at least one role (in addition to the Administrator role) has the right to write.Otherwise, the variable is not subject to individual protection and a record is allowed for all users with the right to send controls.


5.3 The Security System Operating Mode

Home > Application Parameterization > 5 Security System > 5.6 The Security System Operating Mode

5.6 The Security System Operating Mode

The operating mode of the security system, can be selected in the Settings tab of the Security operating panel.


5.3.1 Standard Mode

Home > Application Parameterization > 5 Security System > 5.6 The Security System Operating Mode > 5.6.1 Standard Mode

5.6.1 Standard Mode

The standard mode is a simple system in which the complete parameterization of the system is stored in the security.xml file, located in the application definition directory. Therefore, the changes made on a single workstation require copying the file to the other application workstations. The application definition synchronization mechanism can be also used.

The standard mode should be used in single-station applications or when the permission parameters are set at the time of the application development and the subsequent changes occur occasionally.

Although the permissions parameters are stored in the XML file, its contents cannot be changed outside the control of the Asix.Evo program. The checksum is stored in the file - any unauthorized change to the contents will be detected.


5.3.2 Central Mode

Home > Application Parameterization > 5 Security System > 5.6 The Security System Operating Mode > 5.6.2 Central Mode

5.6.2 Central Mode

In the central mode, all the information concerning the permissions are stored in the Microsoft SQL Server database. All the changes to the permissions and users are immediately shown on all workstations. Additionally, the central register of all the events related with the authorization system operation is created.

The central mode operation is similar to the AsAudit module operation, in previous versions of the Asix applications.

Fig. The Parameterization Panel for the Security System Central Mode.

When configuring the central mode, the SQL Server name, authorization database name and authorization mode used should be specified. Since creating the new database requires administrative privileges to the SQL server, the login method to the SQL server with the administrative privileges should be specified in the Database server authorization frame.


5.4 Settings Specific for a Workstation

Home > Application Parameterization > 5 Security System > 5.7 Settings Specific for a Workstation

5.7 Settings Specific for a Workstation

Most of the security system parameters are defined globally for the entire application. However, there are several specific settings for individual workstations. To alter them, an appropriate workstation or area should be selected in the Stations panel, the Stations Settings operating panel should be opened via Application Explorer panel and then the Security tab selected.

Fig. The Panel for Defining Individual Security Settings for an Individual Workstation.

The Asix.Evo application may operate with no user logged in - all the unprotected functions are available, whereas the functions controlled by the security system are locked. If we want the permission level of general availability to be higher, the so-called default user should be defined. The role with a basic permission set should be defined and then the user who performs this role. This user is specified as a default user. In consequence, after starting the application the user will be automatically logged in - unless it had no password defined. In addition, if the other user is logged out, a return to the default user will occur.

In order for the user to be automatically logged in, he can not have a defined password. If he has the password and additionally the option Show login dialog at startup if default user has password is selected, when the default user has a password, the login window will be displayed at the application startup, allowing the user to enter the password.

Another option is to use the function of cooperating with the Windows domain and declaring the default user as <Current user of the Windows domain>. This is usually used at terminal and browser sites. In this case, the program will check at startup if the currently logged in Windows user is declared in the application settings as a domain user. If so, it will be logged in automatically in the application.

You can also specify the validity period of the login operation - after the specified time has passed since the user logged in, it will be automatically logged out. Period 00:00 means perpetual logging.

You can also specify the login start time, which allows you to define a login scheme enforced at specific points in time. For example, a login period of 08:00 and a start time of 6:00 means that you will log out at 6:00, 14:00 and 22:00.

Another option to automatically log off the user is to specify the maximum allowable inaction time. As inaction it is considered the lack of moving the mouse and using the keyboard.

The check boxes in the Windows Domain Authentication frame apply to the way you work with the domain. For each station, you can declare whether the cooperation is enabled.


Integration with the Windows Domain

Home > Application Parameterization > 5 Security System > 5.8. Integration with the Windows Domain

5.8. Integration with the Windows Domain

The Asix.Evo security system can use settings saved in the Windows domain. Cooperation takes place on two levels:

a) User login authorization.

b) Group membership mappings to security system roles.

The first step in configuring cooperation with the domain is entering the domain name in the security configuration panel in the Settings > Windows domain authentication tab.

Fig. Security System Settings Panel - Windows Domain Authentication Panel.

The next step is to mark users and application roles that are to be associated with the domain.

For users, select the check box in the Domain user column in the definition. For such a marked user, at the moment of his attempt to log in, the correctness of authorization is verified using the Windows domain - the user's password defined in the Asix.Evo application does not matter.

For roles, in the Domains group column, select whether the role is to be associated with belonging to the Windows group. This combination will allow the system to log in each user of the Windows domain (even if such user is not explicitly listed in the list of application users), if the user has been properly authorized in the domain and belongs to a group with the same name as the associated role. Such user will be assigned the permissions of all roles for which role and group names match.

The last step is to select in the security settings of individual stations, which positions will work with the domain and to what extent.


5.5.1 User Login

Home > Application Parameterization > 5 Security System > 5.9 Using the Security System in the Application > 5.9.1 User Login

5.9.1 User Login

Generally, users can login to the system via the control panel window. However, the application designer can directly add login mechanism to the synoptic diagrams. The first of these mechanisms is the Authorization box class object, which ensures a full support for the login, directly on the diagram. The alternative is to use the Login operator action, which displays the user login window. It is supplemented with the Logout action used to log off the user and the ChangePassword action which opens the window used for password change.

The information about the current authorization system status can be displayed on the diagram. The following predefined process variables provide this functionality:

  • CurrentUser - ID of the currently logged user.

  • CurrentUserName - name of the currently logged user.

  • UserRoles - identifiers of all the roles performed by the currently logged user.

  • UserRemainingTime - time remaining until an automatic logout of the user.

  • UserInactivityTime - time elapsed since the last activity of the user.

  • SecurityVersion - the version number of the security system parameterization. The security system number is incremented each time the modified settings are saved - this does not apply only to entries limited to changing passwords.

  • IntegrityVersion - the version number of the application. It is related to the application integrity control and allows mark the "approved" version The application number is saved in the message log at each start The number is incremented every time the checksum conversion function is called in the Integrity panel.


5.5.2 Verification of Permissions

Home > Application Parameterization > 5 Security System > 5.9 Using the Security System in the Application > 5.9.2 Verification of Permissions

5.9.2 Verification of Permissions

In the scope of standard permission control, the program operation is fully automatic. However, it is possible to extend the application with custom functions. This is provided with the ConfirmRole operator action and the HasRole function.

The ConfirmRole action allows for additional authorization of the user outside the standard logging system. It can be used in the action scheme, in which an execution of any operation requires authorization, or when an additional confirmation required from the user who is not logged currently, is necessary.

The HasRole function allows linking the object appearance or functioning on a diagram, depending on whether the user is assigned to the role specified in the call. It is also possible to check the possession of specific permissions using the HasPrivilege function. This applies to both system and application rights, but is usually used for applications.

Examples of use are included in the Techniques of Diagram Creation > Organization of Control Operations > Controlling Permissions section.


5.5.3 Changes in the Permission Parameters in the Application

Home > Application Parameterization > 5 Security System > 5.9 Using the Security System in the Application > 5.9.3 Changes in the Permission Parameters in the Application Run Mode

5.9.3 Changes in the Permission Parameters in the Application Run Mode

Typically, the authorization system is configured when the application is developed, during its operation in the edit mode. However, the full permission management (defining users and roles, changing permissions and passwords) in the run mode is possible as well. This is enabled by the SecurityManager action which opens the window below.

Fig. The Permission Parameterization Window in the Application Run Mode

Please note that the changes made on one workstation are immediately visible on the other workstations, only if the authorization system operates in the central mode. In the standard mode, the changes are visible only when the authorization file will be copied and synchronized.


5.5.4 Viewing the Login Event Log

Home > Application Parameterization > 5 Security System > 5.9 Using the Security System in the Application > 5.9.4 Viewing the Login Event Log

5.9.4 Viewing the Login Event Log

In the standard mode, the user login events are recorded only in the normal message Log. They only relate to the current workstation. In the central mode, a separate event log relating to the authorization system is created. Events from all the workstations are recorded in it.

The overview window with the authorization system event log can be opened with the SecurityBrowser($ MessagesLog) operator action.


Application work control (AsAudit)

Home > Application Parameterization > 6. Application work control (AsAudit)

6. Application work control (AsAudit)

Some applications (eg those working in the pharmaceutical field) require an increased level of control over its operation. The Asix.Evo system offers the following mechanisms in this regard:

a) Registration of control operations performed by system operators.

b) Registration of operators' activities.

c) Checking the integrity of the application definition.

The above mechanisms in classic Asix applications were supported by the optional AsAudit module. In the case of the Asix.Evo application, the control mechanisms are part of the security system.

The control mechanisms require fulfillment of two prerequisites:

• The application security system must work in the central mode - the collected data is saved in the database used also in the security system.

• It is required to have an Asix system license with the AsAudit extension.


6 Recording Control Operation

Home > Application Parameterization > 6. Application work control (AsAudit) > 6.1. Recording Control Operation

6.1. Recording Control Operation

It is possible to record the control operations (the process variable recording) within the Asix.Evo application. In order to initiate the recording, the two preconditions have to be met:

  • The application security system must operate in the central mode - the control operations are stored in the database used also in the security system.

  • The Asix system license with the AsAudit extension is required.

The variables for which all the executed control operations are to be recorded can be selected in the variable definition database. The database must feature the ControlLogging attribute. All the variables, for which the value of this attribute is not equal to zero, are registered. The other settings are not required.

For each registered control operation, the following information are recorded: who, when and on which workstation has executed the operation. The variable value before the control operation, and the new variable value are also recorded.

The overview window with the control operation log can be opened with the SecurityBrowser($ CpmtrolLog) operator action.

In a case of bit-based control operations, it is possible to display the text description of the executed control operation. The current and new variable values are compared, and for the bits which have been changed the text description of the operation is created. The text descriptions are created based on the variable definition database contents. The StateNames, StateSet and StateValue attributes are used for this purpose. The control operation description calculation algorithm for the single bit is as follows:

  • The StateNames attribute value for the controlled variable, is loaded.

  • In the variable definition database, all the variables whose StateSet attribute is identical with the StateNames attribute value loaded in the first point are searched. Typically, these are inactive variables used only to define the state names.

  • Among the variables selected in the previous point, the variable whose StateValue attribute value is identical with the bit number is searched.

  • The StateNames attribute of the variable selected in the previous point should constitute a sequence in the form of: 0=state0;1=state1. Depending on a new value of the controlled variable bit, an appropriate description is selected.

Example

Name | Variable Inactive | State Names | State Set | State Value
ENGINE_1 | 0 | ENGINE_CONTROL |  |
EC_BIT0 | 1 | 0=OFF;1=ON | ENGINE_CONTROL | 0
EC_BIT1 | 1 | 0=FWD;1=BWD | ENGINE_CONTROL | 1
EC_BIT1 | 1 | 0=SLOW;1=FAST | ENGINE_CONTROL | 2

If the Engine1 variable is changed from the 2 to 3 value (the change of the bit of number 0 to the value of 1), then in the control operation description, the text ON will be used.


Operator Activity Registration

Home > Application Parameterization > 6. Application work control (AsAudit) > 6.2. Operator Activity Registration

6.2. Operator Activity Registration

The operator registration mechanism allows you to register part of the operations performed by the application operator in the security system database. It is possible to register:

a) operations to open and close diagrams,

b) operations of opening and closing trends in the AsTrend program,

c) displaying AsRaport reports,

d) launching external programs (using the Run operator action)

e) changing the application operating mode (going into the application edition mode)

Operator registration parameters are set in the security system settings panel - in the Operations registering tab of the Settings tab.

Fig. Security System Settings Panel - Parameterization of Operator Activity Registration.

The tab displays a list of all application stations. For each station, the types of operations that are to be registered at these positions are set.

The window for viewing the operator actions log in the application execution mode can be opened using the SecurityBrowser($Actions) operator action.


Application Integrity Control

Home > Application Parameterization > 6. Application work control (AsAudit) > 6.3. Application Integrity Control

6.3. Application Integrity Control

Application integrity control consists in registering the version of selected application definition files and checking if their content has not changed in an unauthorized manner. Unauthorized files are not used in the application. In particular, they can block its start-up. The mechanism is to ensure that the application made and put into use remains unchanged.

File protection is parameterized in the Integrity tab of the security system panel.

Fig. Security System Settings Panel - Parameterization of Integrity - Application Files.

The main part of the Application files tab is a list of all files in the application definition directories. Using the commands from the table header line context menu, you can limit the number of displayed files or change their order.

The Status column indicates the current status of the file: whether it is under control and whether its content is correct. The Controlled column is used to enable file control.

The Calculate checksums of controlled files button is used to convert checksums that will be registered in the database and will later be used to verify the files. The button should be used when the application has been prepared and checked and in this version it should be put into use.

Additional integrity control parameters are set in the Settings tab.

Fig. Security System Settings Panel - Parameterization of Integrity - Settings.

It should be specified here at which positions the application integrity check should be performed. Typically, one of the positions is left without any control - in order to prepare new versions of the application on it (access to changed files will not be blocked).


Operator Notes

Home > Application Parameterization > 7. Operator Notes

7 Operator Notes

The operator notes system is used to register freely created notes entered by application users. Each note consists of:

a) Text - any content entered by the user.

b) Location - each note is combined with a specific part of the application (installation) so-called segment.

c) Activity flags - used to mark new notes. In particular, there is a mechanism to notify that an active note exists in the given application segment.

The initial phase of the parameterization of the notes system consists in defining the segments. This is done in the security system settings panel - in the Settings tab > Note segments definition tab.

Fig. Security System Settings Panel - Definitions of Memo Segments.

For each segment its ID should be given (used in operator actions and functions) and a descriptive name.

Using notes in the application requires the following operator actions and functions:

a) SecurityBrowser($Notes) action

The action is used to display registered notes (all or from selected segments). In addition, the browser window allows you to change the status of note activity.

b) AddNote action

The action is used to open the window for entering a new note.

c) IsActiveNote function

The function returns information on whether active notes exist in the segment indicated.


7 Operation with AsTrend Program

Home > Application Parameterization > 8 Operation with AsTrend Program

8 Operation with AsTrend Program

The Asix.Evo applications can use the AsTrend program to display the trend of the process variable archive data providing their advanced analysis. Interoperability of the Asix.Evo application and the AsTrend program is based on the use of AstrendDisplay and AstrendPrint operator actions. However, the preconfiguration of the AsTrend program use is required. The preconfiguration is performed independently for each workstation of the application. Through the Stations node of the Application Explorer panel, the workstation setting operating panel should be opened and then the Data Sources tab should be selected. For the AsTrend program configuration, the shown below panel fragment is responsible.

Fig. The AsTrend Program Configuration Parameters.

If the Astrend... family actions will be used, the Start AsTrend option should be selected. In a case of window application it also launches the AsTrend program at the start of the application - this will allow further for faster execution of the operator actions.

Generally, the list of all the MDB databases of the variable definitions, defined in the application, is transferred to the AsTrend program. If this is an unwanted operation, a different name for the variable definition database in the Alternative variable definition database field can be specified.

The user of the application will not be able to change the trend configuration files (trnx files), if the Do not allow saving any files option is selected. The user will automatically acquire all the permissions to the AsTrend program functions, if the Always work as AsTrend Administrator option is selected. Both options are of significance only if the application runs in the window mode.


7.1 Operation in the Browser Version of the Application

Home > Application Parameterization > 8 Operation with AsTrend Program > 8.1 Operation in the Browser Version of the Application

8.1 Operation in the Browser Version of the Application

In a case of Asix.Evo application operation in the browser mode, the interoperability with AsTrend is also based on the browser version of this program. This means that the Asix package should be installed along with Internet components. This will create the AsTrend program directory on the IIS server. The installation must be performed on the same computer on which the Asix.Evo application is published.

The AsTrend program usually loads historical data directly from the process data server which is initialised within the Asix.Evo application. It is also possible to use the data available in the Asix classic application servers. If the Data servers addresses for Web Browser parameter is not explicitly defined, AsTrend will load the data from the computer on which the Asix.Evo application was published. However, other sources of historical data can be specified - in the Data servers addresses for Web Browser parameter, the system names or IP addresses (separated by commas) of all the computers that provide historical data should be entered.


8 Operation with the AsBase Program

Home > Application Parameterization > 9 Operation with the AsBase Program

9 Operation with the AsBase Program

In a case of the Asix.Evo application, the interoperability with the AsBase program is similar to the traditional applications. The first step in developing the application is a standard parameterization of the AsBase application - the registration sets and / or groups of recipes and sets of variables used for the data exchange between AsBase, the PLCs controllers and the Asix.Evo application should be defined.

If the Asix.Evo application is to interoperate with the AsBase program, an appropriate interface should be enabled. The preconfiguration is performed independently for each workstation of the application. Through the Stations Settings node of the Application Explorer panel, the operating panel of workstation settings should be opened and then the Data Sources tab should be selected. For the AsBase program configuration, the panel fragment shown below is responsible.

Fig. Setting Up a Connection with the AsBase Program.

Enabling the Use AsBase option enables cooperation with the AsBase program. In the AsBase configuration file field should be given the name of the xml startup file of the AsBase application. This file is created while configuring the application using the AsBase program. It contains primarily information about the location of the AsBase database. The option Run AsBase Program causes starting the AsBase program when the application starts. In the case of an application in Evo technology, cooperation with the AsBase program does not require its local launch. The option Use Asix6 compatibility mode determines how the interface works. Differences between individual work modes will be described later in the chapter.

Further cooperation between Asix.Evo and AsBase takes place using two mechanisms:

a) through the variables used in sets of AsBase variables and the Asbase... action family.

b) by displaying data in the Asbase Table object.


Operator Actions

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.1. Operator Actions

9.1. Operator Actions

Operator actions for cooperation with the AsBase program are divided into two groups: connection actions and connectionless actions. Connectionless actions are an auxiliary role. These are AsbaseLoad, AsbaseLoadByValue, AsbaseSave, AsbaseShow and AsbasePrint shares. They can be made at any time.

The connection mode actions allow browsing data from the AsBase database using the synoptic diagram objects. The action scheme is as follows:

  • Opening a Connection

The connection opening is executed via the AsbaseOpen action. In this action, the data subset which will be displayed within the connection and the variable set which will be used to transfer the data to the w Asix.Evo application should be specified. In the action, the connection ID should be also specified which will be used by the other connection mode actions.

The AsbaseOpen action is generally used to handle the Diagram Opened event of the diagram, on which the AsBase data will be shown. In classical applications the AsBase class object was responsible for establishing the connection.

  • Data Visualization on a Diagram

The data presentation is performed by using standard diagram objects.

The process variables, constituting the variable set specified in the AsbaseOpen action are used for this purpose. These variables assume the values compatible with the AsBase data set field values for the active record.

  • Navigating Within the Data of the Connection

The AsbaseAdd, AsbaseDelete, AsbaseUpdate, AsbaseNavigate actions allow performing operations on the connection data. Each of these functions has a parameter specifying the connection ID. The operations performed by these actions, generally relate to the connection active record. The AsbaseNavigate action is of particular importance, because the action is used in general to change the active record, but it can also change the data filtering (initially set out while establishing the connection).

  • Connection Termination

The connection is terminated with the AsbaseClose action. The action is generally used to handle the Diagram Closed event of the diagram, on which the Asbase data were shown.


Asbase Table Object

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.2 Asbase Table Object

9.2. Asbase Table Object

With the help of Asbase Table objects it is possible to display data from the AsBase database in the form of a typical table. It is possible to select the displayed columns and specify the criterion for selection of records. The Asbase Table object is an alternative to tables displayed in the AsBase program.

It is possible to work in mixed mode, in which selected columns (fields) of registration sets or recipes are displayed in the table, and other data are displayed via variables from variable sets (similar to operator actions). Variable values are synchronized with changes of the active table row.


Operating Modes of the Link with the AsBase Program

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.3. Operating Modes of the Link with the AsBase Program

9.3. Operating Modes of the Link with the AsBase Program

The interface with the AsBase program can work in two modes: in own mode and in the Asix6 compatibility mode. In the own (internal) mode, operator actions of the Asbase… family are performed independently, without communication with the AsBase program. In the compatibility mode, the implementation of the action is transferred to the locally launched AsBase program - the operation is then the same as in the case of applications made in classical technology.

There are minor differences between the two modes that should be considered when designing the application.

Starting a local instance of the AsBase program

In the compatibility mode, the local launch of the AsBase program is mandatory. In the case of custom mode, this is an optional step, but the the program is not run it has the following effects:

a) AsbasePrint and AsbaseShow actions are not executed.

b) Internal functions of the AsBase program are not supported, such as: registration conditions and automatic recipes. That these functions will be supported, at least on one of the application positions the AsBase program should be started.

Defining variables used in variable sets

Variables in variable sets used to view data retrieved from the AsBase database should be declared in local virtual channels (None type). In the case of compatibility mode, only one variant is possible. Process variables used for data exchange should be defined in the None channel of the Asmen module. This is due to the fact that AsBase communicates directly with the process data server running as part of the Asix.Evo application. In summary, the data exchange channel is defined as None in the data server configuration file (using the Architect program), and in the Asix.Evo application it is declared as the Asix6 type.

In the case of custom mode, the above method of variable definition is acceptable, but a better solution is to use a virtual channel defined only in the Asix.Evo application. For this purpose, exchange variables should be placed in the communication channel for which no driver has been declared explicitly or a None type driver has been used. You can also specify no channel name in the definition of variables, which will cause placing the variables in the default virtual channel created automatically.

In the case of custom mode, it may be beneficial to define exchange variables in a separate variable definition database (XML or MDB type) which name is not passed to the process data server as part of its configuration file.

Conversions of variable values for the fields of type Date and Duration

Fields of registration sets and groups of recipes, such as Date and Duration, are stored in the database as columns of datetime and int type (number of milliseconds). In the compatibility mode, the values of these fields are entered into the exchange variables in the form of integers (respectively the number of seconds since 1.1.1970 and the number of milliseconds) or in text form, if the field definition format parameter has been specified. The designer must ensure that the variable type conforms to the field type. If the values are passed in numerical form, the FromAsix6Date and FromAsix6Time functions can be used to convert field values to DateTime and TimeSpan types.

In the case of the own mode, the attempt of automatic conversion of the value read from the database according to the type of exchange variables is made. The conversion concerns both reading data and functions that cause writing fields in the database. As a rule, it is most beneficial to use DateTime and TimeSpan variables for the Date and Duration fields, respectively. For text type variables, the conversion uses the format parameter of field definition or standard formatting. For other variable types, the date is passed as the number of seconds since 1.1.1970, and the duration as the number of milliseconds.

Differences in the implementation of operator actions

In the case of custom mode, the AsbaseOpen action can be performed again for the same connection (without prior closing) in order to:

a) Refresh data downloaded from the database as part of the connection at the time of its original opening.

b) Change all connection parameters including data sources.

c) Change the filtering expression of the downloaded data (for this purpose, you can also use the AsbaseNavigate action in the $Filter variant).

In the compatibility mode, only the AsbaseNavigate action can be used, or the method of closing and re-opening the connection can be used.

The AsbaseLoadByValue action is only available if you are working in your own mode.


8.1 Connection Filter

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.4. Connection Filter

9.4 Connection Filter

One of the AsbaseOpen and AsbseNavigate action parameters (in the $Filter option) is the filter which allows selecting the data to be used in a connection.

The filter syntax is compatible with the WHERE clause of the SQL language, with additional optional extensions which allow inserting process variable values and time constraints into this clause. The words WHERE are not specified in the filter definition. There is also a possibility to add the ORDER BY clause for data sorting to the filter syntax.

As a rule, in the filter definition the references to the fields defined in an archive set or in a recipes group are used. In order to use a registration set, recipe or load history field value as a filter element, the identifier of the field should be preceded by the prefix "V_". In the case of a registration set archive, a value status and a timestamp of this value may be associated with each field value. To use these components, the field ID of the registration set should be preceded by the prefix "S_" or "T_". In the case of recalculated recipes, the percentage value field can be called in a load record by using the prefix "VP_".

AsbaseOpen(conn1, $Archive, Paints, PaintsDgr, null, null, ”V_Akt=1” )

In the example above, the used filter retrieves data only from the Paints egistration set for which the field value with the Act identifier is equal to 1.

In the case of relational type connections, which also use a subordinate data source, references to data source fields should be additionally supplemented with the prefix m for the main source fields (master) or the prefix d for the subordinate source (detail), eg " m. V_Akt = 1 ".

In addition to the references to the field values defined by the application designer, the static names of the AsBase table fields, i.e. such fields that are always present in a table can be used. Static fields are described in the table below.

Table: AsBase Table Static Fields.

Name | Meaning
LOCALTIME | Local time of a record logging or recipe loading
UTCTIME | UTC time of a record logging or recipe loading
STATUS | Recipe load operation status
SOURCE | Source of the record logged
NAME | Name of the recipe
LOADBY | Specifies the user who has loaded the recipe
TARGET | Recipe load target
CREATED BY | Recipe creator
BATCH | The batch value for loading the recipe being recalculated.


8.1.1 Inserts

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.5. Inserts

9.5. Inserts

In the filter contents it is possible to use inserts which allow including the current process variable values and dynamic limiting of a time range.

The insert of the filter is contained in curly brackets.

The expansion insert which allows using the process variable value has the following form:

{V:variable_name}

The variable value replaces the insert in its position.

The insert which defines the time filter elements has the following form:

{T:code [:field_id]}

This code defines the time range. The following codes are available:

t - today

y - yesterday

sy - since yesterday

tw - this week

lw - last week

slw - since last week

tm - this month

lm - last Month

slm - since last month

ty - this year

ly - last year

sly - since last year

The optional Field_id filter specifies the table field for which the time filter is to be used. If this element is omitted, it is assumed that the filter applies to the time the record was logged in the table. If the ID field is specified, the field should be of Data type. When this insert is used, the entire insert text will be replaced with an expression (compatible with SQL language syntax) limiting the set of table records to those the value (time) of which is within the time range specified by the code parameter.

The filter containing inserts is not modified during the connection. For example, if the time filter of "today" type is defined and the connection is open for a second day, the records from the previous day will be shown. Only the connection re-opening or re-applying of the same filter in the operator action will update the data.

The inserts can not occur inside the filter elements contained within square brackets [ and ] and within quotes ' and ". To contain the insert content within these delimiters, the delimiters must be placed between curly brackets.

{'}{V: variable_name }{'}

The above filter fragment will be replaced with the variable value enclosed in single quotes.

The insert mechanism applies only to the content of operator actions when working in the Asix6 compatibility mode. If the compatibility mode is not used, dynamically variable filters should be created using expressions. The expression method is more universal - it can be used in any mode. In the place of the {V:} insertions, use the Variable function, and instead of the timeouts, the OPCTime function.

”V_Akt={V:Z1}”

”V_Akt=”+Variable(Z1)

Both the above versions of the filter definition will function the same way. The records for which the Act field value is equal to the Z1 variable value will be selected (at the time of the action execution).


8.2 Users Permissions

Home > Application Parameterization > 9 Operation with the AsBase Program > 9.6. Users' Permissions

9.6. Users' Permissions

If the AsBase program was started as part of a connected Asix.Evo application, then the security settings defined in the Asix.Evo application are used. The settings selected directly in the AsBase application do not matter. However, if such an AsBase application is run on its own, then the settings will be respected. In a typical configuration, a single administrative operator is defined in the AsBase application - this protects the AsBase database from unauthorized access. Other users have the rights specified in the Asix.Evo security system configuration.


Cooperation with the AsService Program

Home > Application Parameterization > 10. Cooperation with the AsService Program

10. Cooperation with the AsService Program

Asix.Evo applications can cooperate with the AsService program to control the operation time of devices and the number of their switching. It is possible to display the counters of the AsService program and to connect the event of exceeding the limits of counter values with the alarm system of the Asix.Evo program.

Cooperation with the AsService program requires first of all determining the location of the AsService database. This is done in the workplace Stations settings, in the Data sources tab.

Fig. Declaration of Cooperation with the AsService Program.

In the AsService configuration file field, enter the name of the configuration file created with the AsService program, in which the location and method of access to the database are saved.

The Asix.Evo program uses a direct reading of the database content - it is not necessary to run the AsService program locally.


Visualization of Counters

Home > Application Parameterization > 10. Cooperation with the AsService Program > 10.1. Visualization of Counters

10.1. Visualization of Counters

The visualization of the counters is performed using standard visualization objects. Counter values are taken using the AsserviceRead function. The function has two parameters. The first determines the identifier of the meter whose data will be read and the second name of the data field to be read. It is possible to read data regarding the current meter status, values related to the last meter reset and definition data. The full list of fields can be found in the description of the AsserviceRead function.

If you use the expression editor, you can use menu commands that allow you to select the meter ID and field name interactively.


9 Synchronization of the Application Files

Home > Application Parameterization > 11 Synchronization of the Application Files

11 Synchronization of the Application Files

In the case of multiply workstation installations, maintaining consistent file versions of the application on all workstations becomes a significant issue. This applies mainly to the phase in which the application is still in development and the definition files are frequently modified. In the case of applications operating in the browser mode this is of less significance - a changed version of the application is published on the server once and from there it is automatically transferred to all Web terminals. In the case of window applications, the application synchronization system of the Asix.Evo comes to help.

The concept of the synchronization system operation is based on defining a network template directory which is available to all the application workstations. The changed files are loaded to the template directory and from there they are automatically transferred to all the application workstations.

The synchronization module parameters are set out in the workstation settings work panel in the Synchronization tab.

Fig. Synchronization Module Parameters.


9.1 Synchronisation of the Application Definition Directory

Home > Application Parameterization > 11 Synchronization of the Application Files > 11.1 Synchronisation of the Application Definition Directory

11.1 Synchronisation of the Application Definition Directory

The application definition directory can be synchronised once at the start of the application and/or periodically at a determined period of time. In the Template application path field, the template location should be specified. It is possible to reference to the directory on the locally mapped disc or use the UNC name. If, in order to access the template directory, a special system authorization is required, then in the User and Password fields the ID and password of the User with the required permissions should be entered.

In the case of a synchronization executed at the start-up of the application, the program which will be executed on the synchronization completion may be declared in the Program executed after startup synchronization box. This program is able to handle any extra tasks required by the application for correct completion of the synchronization.

Automatic synchronization involves transferring the updated files of the template directory into a local definition directory. The files which are not present in the local directory are transferred as well. Copying in the other direction - into the template directory is performed manually. The system tools or the Asix.Evo synchronization window (opened using the Synchronization command from the Tools menu) may be used.

Fig. The 'Application Synchronization' Window.

In this window all the definition directory files are shown. The differences between the template and local directory are highlighted with colours. Using the window buttons it is possible to copy selected or updated files in either direction and to delete selected template files. During the synchronization operation one may write a note describing the changes implemented. Notes are saved to the SynchronizationNotes.xml files in the template directory.


9.2 Synchronization of Working Directory

Home > Application Parameterization > 11 Synchronization of the Application Files > 11.2 Synchronization of Working Directory

11.2 Synchronization of Working Directory

The parameterization of the working directory synchronization requires just to specify the template directory and possibly the details of the user with access permissions to the directory.

The working directory synchronization requires just synchronization of the local trend patterns stored in the TrendPatterns subdirectory. The synchronizer operation is fully automatic. In the case of changing or adding a local pattern trend, the file which describes the trend is immediately transferred into the template directory. The functions used for reading the pattern trends always check if the updated definitions exist in the template directory and, if necessary, copy them to the local drive.


10 Using Pattern Trends

Home > Application Parameterization > 12 Using Pattern Trends

12 Using Pattern Trends

Pattern trends have two typical uses:

  • Visual comparison of the actual trends of the process variables with the ideal pattern trend.

  • Transfer of data determining process running method to the controller.

In the classic applications, the pattern trends were stored in a special type of archive of the ASPAD module. Additionally, selection and edition of the trends was supported by the PEdit and PSelect programs. All this functionality is now directly integrated into the Asix.Evo program.


10.1 Trends Edition

Home > Application Parameterization > 12 Using Pattern Trends > 12.1 Trends Edition

12.1 Trends Edition

Editing and managing of the pattern trends is carried out in the trend editor which can be opened with the Trend patterns editor command of the Tools menu. During operation in the application run mode, a window may be opened via the EditPatterns operator action.

Fig. Pattern Trend Editor.

The pattern trends are divided into common trends and user local trends. The trend type should be determined as early as during its creation. Common trends must be created in the application edit mode. The file describing such trend is stored in the TrendPatterns subdirectory of the application definition directory. The common trend can not be changed by the user in the application run mode. The local trends are saved to the TrendPatterns subdirectory of the application working directory. Local trends can be set up and edited in the application run mode. In general, they are used on a specific application workstation. However, if synchronization of the working directory content is enabled, the local trends can be transferred to the other application workstations.

The pattern trend points can be edited in the table of points. It is also possible to move the location of the points directly on a preview chart. The left mouse button is used to move the points, the right one to move the chart and double-clicking adjusts the chart scale to the definition of the points.

If a conversion of the pattern trends from a classic application is necessary, the CSV file import function may be used.


10.2 Displaying Pattern Trends

Home > Application Parameterization > 12 Using Pattern Trends > 12.2 Displaying Pattern Trends

12.2 Displaying Pattern Trends

Pattern trends can be displayed as a curve in the Chart class object. The pattern trends displayed on the Chart object may be pre-parameterized. The object also has its own interfaces which, in the application run mode, allow selecting the pattern trend and its first node.

It is also possible to automatically control the pattern trends parameters in the Chart object. An example of such operation is described in: Techniques of Diagram Creation > Controlling Trend Pattern Displaying section.


Selection of the Pattern Curve

Home > Application Parameterization > 12 Using Pattern Trends > 12.3 Selection of the Pattern Curve

12.3. Selection of the Pattern Curve

While the application is running, you can interactively select the name of the process curve via the SelectPattern action. As a result of this action, the name of the selected curve is entered into the process variable. For example, you can control the displayed curve in the Chart object via this variable.


10.3 Trend Transfer

Home > Application Parameterization > 12 Using Pattern Trends > 12.4 Trend Transfer

12.4 Trend Transfer

Pattern trends may also be used as the base to control the process under control of the PLC. To do this, it is necessary to transfer the trend definition to the PLC. As no standards exist, Asix.Evo has no built-in trend transfer functions. Operations of this type should be executed via scripts. The example of a pattern trend transfer to the PLC is described under the Transferring Pattern Trends section of Asix.Evo - Scripts user's manual.


11 Keyboard

Home > Application Parameterization > 13 Keyboard

13 Keyboard

If the application is run on a computer without a keyboard, the use of an on-screen keyboard to enter the settings may be necessary. A keyboard integrated with the operating system may be used. However, Asix.Evo provides two other mechanisms which are discussed in the subsequent chapters.


11.1 Keyboard Object

Home > Application Parameterization > 13 Keyboard > 13.1 Keyboard Object

13.1 Keyboard Object

An object of the Keyboard class should be located on the diagram which contains the objects designed for entering settings. The keyboard may be displayed as fixed or may operate in the so-called auto-hide mode (the keyboard is displayed on the diagram only when the edit mode is active).

When the s edit mode of ettings is active (e.g. for the object of the Text class) subsequent characters can be entered using keyboard fields.


11.2 Box Keyboard

Home > Application Parameterization > 13 Keyboard > 13.2 Box Keyboard

13.2 Box Keyboard

A more flexible mechanism is the keyboard displayed in its own box. In addition to entering settings in the diagram objects it also allows editing fields in the dialogue windows.

The appearance and operation mode of the on-screen keyboard is defined by the workstation settings of the working panel in the Settings tab.

Fig. The On-Screen Keyboard Settings.

Selecting the Automatically show on-screen keyboard check box automatically displays the keyboard window when entering into the edit mode.

If the automatic mode is not enabled or entering into editing occurs for the application component which is not directly controlled, the keyboard window may be activated with the use of ShowKeyboard and ShowNumericKeyboard operator actions.


Power Guard

Home > Application Parameterization > 14 Power Guard

14 Power Guard

Power Guard Moduleallows you to monitor the current consumption of selected media (eg electricity, gas) and, based on the forecast, alert in advance the risk of exceeding the ordered power, which entails severe additional charges for the energy / gas supplier. In another scenario, the Guardian Module can supervise the correct situation in the production process, controlling the power consumption in relation to the set power resulting from its correct level for a specific production plan.


SQL Database Configuration

Home > Application Parameterization > 14 Power Guard > 14.1. SQL Database Configuration

14.1 SQL Database Configuration

In the Application Explorer > Power Guard panel, in the Settings tab, select the option Power guard database settings and in the dialog window after selecting the SQL server (eg (local)) database name and authorization mode, click Create database and confirm with OK. After closing the window, check the Power guard enabled option.

Fig. Configuration of the Power Guard Database.


Creating Simple Meters

Home > Application Parameterization > 14 Power Guard > 14.2. Creating Simple Meters

14.2. Creating Simple Meters

In the Simple meters tab, you can add meters related to variables individually or import them from the variable definitions database -if the appropriate attributes of the variables have been defined in the database (MeterId, MeterCycle, MeterInterval, MeterUnit, MeterLimit, MeterPrediction). Each meter should have an identifier, description, work unit (W, kW, MW, kWh, MWh, m³/h, m³, tgφ), work cycle (15m, 30m, 60m, Zmiana, Doba) and the aggregation interval (1m, 15m, 30m, 60m) and the parameterized limit (power ordered).The meters cooperate with both the instantaneous value measurements (eg power in kW) and with the measurements returned by the meters (eg energy in kWH) - the selected unit decides about it (column Value interpretation). Simple meters must be associated with the relevant process variables that are the data source for them. In the Averaging intervals, you can parameterize the prediction algorithm by specifying how many preceding historical intervals will be included in predicting the values of future intervals in the cycle.

Fig. Creating Simple Meters.


Management of Meters and Limits

Home > Application Parameterization > 14 Power Guard > 14.3. Management of Meters and Limits

14.3. Management of Meters and Limits

In the next tab Meters managing, you can open the Power guard manager window, which is used to manage limits and complex meters. It also allows assigning limits to both simple and complex meters as well as calling up the work preview of the meters in the form of a graph. This window may be available to application operators if it is called by the PowerGuardManager() operator action.

Fig. Management of Meters.

In the Limits tab, you can add and remove meter limits. In the case of power meters, the limit is understood as the ordered power. The limit can be static - then it always has a constant value, but it can also be dynamic - if its value is to change over time and be different in subsequent cycles of work. In the case of dynamic values, all historical values of the limits are archived in the database so that it is possible to view the historical cycles of the meters with the limits that were actually in force at the given time. It is possible to add and change only values for future cycles.

Fig. Limit Management.

If we have created any limits, in the Meters tab we can assign them to individual simple or complex measures by clicking the Edit Meter... button

After clicking the Show chart button for a given meter, a window with a graph will be created, allowing you to observe the intervals and the average forecast value in the current cycle. In addition, the chart displays the vertical current time line, horizontal limit lines and a horizontal line, showing what value is safe for the other intervals - so that the total average for the cycle does not exceed the limit. The chart also allows you to view historical cycles using the right-hand navigation buttons. The chart window for a specific meter can also be called from the visualization by the operator using the PowerGuardMeter(meterId) operator action.

Fig. Chart of the Meter Operation.


Visualization Object - Graph of the Power Guard Meter

Home > Application Parameterization > 14 Power Guard > 14.4. Visualization Object - Graph of the Power Guard Meter

14.4. Visualization Object - Graph of the Power Guard Meter

This object to be placed on synoptic diagrams has the same functionality as the above-described graph in the form of an independent window. In addition, you can freely parameterize its appearance (colors) and available functions and displayed components.


The Functions of Power Guard Expressions

Home > Application Parameterization > 14 Power Guard > 14.5. The Functions of Power Guard Expressions

14.5. The Functions of Power Guard Expressions

The visualization diagrams can directly display values related to the current state of the indicated meter. The PowerGuardRead(meterId, data) function was used for this purpose.

By providing the appropriate constant in the second function argument, it is possible to obtain the following data:

$AverageValue – Expected average value in the current cycle

$Limit – Current limit

$CycleStartTime – cycle start time

$CycleEndTime – cycle end time

$IsPredictionSafe – Information if the predicted average value exceeds the limit

$SafeRemainingValue – The average safe value for the remaining intervals


Integration with the Alarm System

Home > Application Parameterization > 14 Power Guard > 14.6. Integration with the Alarm System

14.6. Integration with the Alarm System

The generation of alarm events related to the status of power guard meters is possible thanks to the new "Power Guard" alarm strategy. If we have the "Power Guard" strategy in the given alarm domain, then for the selected alarms associated with this strategy in the detection parameters it is enough to provide the meter ID. An alarm will be triggered each time the meter detects in the current cycle that the average value of the traced medium at the end of the cycle exceeds the assumed limit (eg ordered power) and will be maintained until the threat passes in the current cycle or subsequent cycles.


Asix Application as a Windows Service

Home > Application Parameterization > 15 Asix Application as a Windows Service

15 Asix Application as a Windows Service

The Asix system from the version 8.0.4 has the ability to run its application as a Windows service.

By definition, the Windows service is a process executed inside the Windows operating system environment, that does not require interaction with the computer user. The service is usually started when the operating system starts and runs as long as the system is active.

The Asix.Evo application working as a Windows service has full functionality available for traditional Asix.Evo applications, however due to the specific nature of the services, work in this mode is completely devoid of user interface (the user can not see the working application). This solution is perfectly suited to the role of a web application server or Historian - a server that collects, processes, archives and shares data with Asix system clients.

To sum up, the Asix.Evo application working as a system service:

- it works on the system account - it does not require the user to log into the Windows system;

- it starts automatically immediately after starting the operating system;

- it works without any user interface.

Preparation of the application

The configuration of the Asix system application to work as a Windows service is done in a simple way using a specially prepared configurator.

First, prepare the application to work in the system service mode. This includes

- preparing an application without a user interface (remember that the application run as a website will not have visual elements: windows, diagrams, messages, etc.);

- configuring server communication for the NetworkService user:

(AsixEvo.exe > Global Settings > Communication > Windows communication configurator)

Fig. Configuring Communication Server for the 'NetworkService' User.

Installation of the service

In the second place, the service should be installed using the 'Asix Application Server Service Manager' program. Default program location:

C:\Program Files (x86)\Askom\Asix\Asix.Evo\AsixServiceManager.exe

Fig. Starting the Installation of the Asix Application Server Service.

Fig. Setting the Service Startup Parameters and Starting the Service.

Service monitoring

Monitoring the operation of the service through:

- result of application operation,

- monitoring system services,

- system logs.

Process monitoring:

- AsixAppService - application,

- AsixDataServiceHost - data server.

Fig. Monitoring System Services.

Stop and uninstall the service

Stopping and uninstalling the service is possible using the 'Asix Application Server Service Manager' . Default program location:

C: \ Program Files (x86) \ Askom \ Asix \ Asix.Evo \ AsixServiceManager.exe


central_diagnostics_of_application_operation

Home > Application Parameterization > 16 Central Diagnostics of Application Operation

16 Central Diagnostics of Application Operation

The functionality of central diagnostics allows you to configure a server to which selected stations will periodically send diagnostic data about their condition, status of channels, archives and alarm system as well as selected operating system parameters, as a part of a multi-user application. Access to this data is possible from any application position, so you can monitor the status of each position from anywhere.


Configuration of Central Diagnostics

Home > Application Parameterization > 16 Central Diagnostics of Application Operation > 16.1 Configuration of Central Diagnostics

16.1 Configuration of Central Diagnostics

In the first step, specify in the global application settings which of the servers within the application should act as a diagnostic server:

Global Settings > Settings > Diagnostics

Then, in the position settings for selected positions, you should decide individually whether the position should send diagnostic data to the server.

Stations Settings > Settings > Diagnostics Settings


Stations Diagnostic Tool

Home > Application Parameterization > 16 Central Diagnostics of Application Operation > 16.2 Stations Diagnostic Tool

16.2 Stations Diagnostic Tool

To view the status of stations participating in diagnostics, use the built-in window, which can be called from the Application Explorer (Application Explorer > Diagnostics > Stations Diagnostic) or from the Control Panel (Control Panel > Tools > Stations Diagnostic).

The tool allows you to monitor the status and general parameters of the application and system as well as channels, archives, alarm domains and free disk space.


Access to Diagnostic Data from the Diagrams Level

Home > Application Parameterization > 16 Central Diagnostics of Application Operation > 16.3 Access to Diagnostic Data from the Diagrams Level

16.3 Access to Diagnostic Data from the Diagrams Level

Access to diagnostic data for the selected position stored on the diagnostic server is possible using the StationDiagInfo (..) function.

Dostęp do danych diagnostyczne dla wskazanego stanowiska zgromadzonych na serwerze diagnostyki jest możliwy za pomocą funkcji StationDiagInfo (..):

Examples of using the function:

=StationDiagInfo("Server1", "Active")

Informs whether the Server1 station is active (it works and communicates with the diagnostics server).

=StationDiagInfo("Server2", "ChannelState", "S7")

Returns the operating status of the “S7” channel at “Server2”.


Welcome

Home > Objects

>> Help for Users of Asix.Evo

www.asix.com.pl

Asix.Evo - Objects


14 Active Alarms Viewer Object

Home > Objects > Active Alarms Viewer Object

Active Alarms Viewer Object

Object Functions

The Active Alarms Viewer object is an object which allows displaying and handling of the active alarms. The table presents the alarms from the selected alarm domain. The data set shown in the table is freely configured. The use of an integrated toolbar is also possible - a set of available features is parameterized.

Fig. Examples of the Active Alarms Viewer Object.

The Active Alarm Viewer object is a control type object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Domain

Domain name

Specifies the name of the alarm domain the alarms of which are shown in the table.

Groups

Text

Specifies the initial filter for group selection of the alarms shown. The user can change the filter using the Alarm groups filtering window. The property definition has the form of a text consisting of a <grouping_attribute_ID> = <attribute_value> pair, separated by a semicolon.

Example:

Zone = "B1" Zone= "B2", Type = "Electrical";

The alarms whose Zone attribute is equal to B1 or B2 and Type attribute is equal to Electrical will be shown.

Header Font Size

Number

Specifies the size of the font used to display the column headers.

Message Font Size

Number

Specifies the size of the font used to display information in the alarm rows.

Visible Rows Count

Number

If the property is equal to 0, the number of rows displayed is determined by the font size and object size. Changes if the object size changes as a result of the diagram scaling. If the property is greater than 0, then the same specified number of rows is always displayed - the font size is automatically modified when the object is resized.

Toolbar Elements

Multiple enumerated type: No toolbar, Alarm indicator, Priority selection, Groups selection, Hide accepted, Accept, Exclude once, Silence local, Silence everywhere, Execute action, Pause/restoring refreshing, Refresh, Filters editor, Edit exclusions, First alarm, Previous page, Previous alarm, Next alarm, Next page, Last Alarm, Details, Print

Specifies the content of a table toolbar. The following types of buttons are available:

  • Alarm indicator - used to signal new events. After detecting a new event, a flashing icon appears on the button for a while. Alternatively, new alarms can be signalled on the row indicator.

  • Priority selection- selection of alarms according to the priority.

  • Groups selection - opening an alarm selection window according to group.

  • Hide accepted - selection of the mode of showing confirmed alarms.

  • Accept - confirmation of the alarms currently shown in the table. An urgent and critical alarm is confirmed only if its row is selected. It is also possible to selectively confirm the alarms by double-clicking the mouse button on the alarm line, or by selecting and confirming the alarm by pressing the Enter key.

  • Exclude once - exclusion of an alarm once. The alarm will be removed from the list of active alarms, a subsequent detection of the alarm will be shown normally.

  • Silence local - when the alarms are signalled by a sound, it mutes the signal on the local computer.

  • Silence everywhere - when the alarms are signalled by a sound, it mutes the signal on all computers of the alarm domain.

  • Execute action - execution of an action defined in the alarms database for the selected alarm.

  • Pause/restoring refreshing - it allows the perator to block refreshing the alarm list.

  • Refresh - in the case of operation in the mode without an automatic removal, the button allows refreshing of the view which removes all the outdated events from the table.

  • Filters Editor - opening of the filtered alarm management window.

  • Edit exclusions - opening of the excluded alarm management window.

  • First alarm - positioning on the first row of the table, identical with pressing the Ctrl-Home button.

  • Previous page - forces the movement up by a number of rows equal to the size of page, identical with pressing the PageUp button.

  • Previous alarm - positioning by one row up, identical with pressing the up arrow button.

  • Last alarm - positioning on the last row of the table, identical with pressing the Ctrl-End button.

  • Next page - forces the movement down by a number of rows equal to the size of page, identical with pressing the PageDown button.

  • Next alarm - positioning by one row down, identical with pressing the down arrow button.

  • Details - opening the alarm details window.

  • Print - opening the alarms printout window.

Toolbar Height

Number

Specifies the height of the toolbar in pixels. The size of the button icons depends on the toolbar height.

Alarm priority filter

Multiple enumerated type: Message, Warning, Alert, Urgent, Critical

Specifies the initial state of the priorities of the alarms displayed. The operator can change a selection using the button of the toolbar priority selection.

Column headers visible

Logical

Specifies whether the column header line should be displayed.

Auto scroll to last alarm

Logical

Specifies whether at the moment of alarm state change, view on the last event should be automatically positioned.

Remove finished alarms

Logical

Specifies the behaviour of the table at the moment of the removal of alarms from the active alarm logs. A terminated alarm is removed from the active alarms log immediately or with a time lag. If the property has the True value, then the alarm will be removed from the table at the same moment. If the value is equal to No, then the alarms are not automatically removed from the table. They will be displayed until the operator uses the Refresh button from the table toolbar.

Do not show accepted alarms

Logical

Specifies whether the confirmed alarms should be removed from the alarm table without waiting for alarm termination. The operator can change the display mode of the confirmed alarms using the toolbar alarm button.

Invert alarms order

Logical

Specifies the order of displaying the alarms. The Yes value means that the latest alarm is displayed in the first (top) line of the table.

Row indicator visible

Logical

Displays an additional column used for signalling the selected row and newly emerging alarms. After detecting a new alarm event in the appropriate column row of the indicators, a flashing icon appears for a while. Alternatively, new alarms can be signalled on the Alarm indicator button of the toolbar.

Show scrollbar

Logical

Specifies whether the slider for alarm scrolling should be displayed.

Time format

Text

Specifies the format of displaying alarm time columns. The yyyy'-'MM'-'dd' 'HH':'mm':'ss'.'fff default format enables the display of the time in the 2011-06-17 11:10:09.345 form. Custom format can be freely constructed using the selected fields designations from the default format. Field separators can be arbitrary, but must be located between apostrophes.

Column Properties

Name

Value Type

Description

Column Type

Enumerated type: Id, Priority, Category, Status, Description, Event time, Begin time, Begin description, End time, End description, Begin detection time, End detection time, Accepted, Accepted time, Accepted by, Accepted on, Filtered

Specifies the information type displayed in a column. Information concerning the alarm derives from the log of historical alarms or from the alarm definition database. The alarms table does not have to include columns that show all information types. The user can use the Alarm Details window in order to gain access to all information related to an alarm. The following types of buttons are available:

  • Id - the alarm identifier;

  • Priority - the alarm priority (critical, message etc.) in the form of an icon;

  • Category - information: whether the alarm is standard or of a notification type;

  • Status - the event status in the form of an icon (initiated, initiated and confirmed, terminated, terminated and confirmed);

  • Description - text description of an alarm - depending on whether a displayed event has already been terminated, start or termination description is displayed;

  • Event time - displays one of the registered alarms time depending on the event type. For an initiated and unacknowledged alarm, the alarm start time is displayed; for an initiated and acknowledged alarm, the acknowledgement time is displayed; for a terminated alarm, the alarm termination time is displayed, and for a terminated and confirmed alarm, the termination or confirmation time is displayed, whichever occurred later;

  • Begin time - recorded time of an alarm start;

  • Begin description - text description of the start of an alarm created on the basis of the alarm definition including the alarm notification parameters;

  • End time - recorded time of an alarm termination;

  • End description - text description of an alarm termination created on the basis of the alarm definition including the alarm notification parameters;

  • Begin detection time - recorded time of an alarm start detection;

  • End detection time - recorded time of an alarm termination detection;

  • Accepted - information specifying whether the alarm was acknowledged by the operator;

  • Accept time - recorded time of an alarm acknowledgement;

  • Accepted by - ID of the user confirming the alarm;

  • Accepted on - workstation name at which the alarm was acknowledged;

  • Filtered - information specifying whether at the moment of the alarm notification it was subject to the mechanism of alarm detection filter.

Column width [%]

Percent

Specifies the percentage width of a column. A value of 0 means that the width of the column is to be adjusted automatically. If only one column width will be 0, it will occupy the whole remaining place, taking into account the width of other columns.

Column header

Text

Specifies the text of a column header, if it is to be different from the default description.

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the table background color - used when there are more alarms than rows in the table.
Grid Color | Color | Specifies the color of the grid lines separating the table fields and rows.
Header font color | Color | Specifies the color of the header text.
Header back color | Color | Specifies the background color of column header line.
Message color | Color | Specifies the color of the texts for the alarms rows of a message type.
Message background color | Color | Specifies the background color for the alarms rows of a message type. Selecting the Transparent color means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Warning color | Color | Specifies the color of the texts for the alarm rows of a warning type.
Warning background color | Color | Specifies the background color for the alarm rows of a warning type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Alarm color | Color | Specifies the color of the texts for the alarms rows of a standard alarm type.
Alarm background color | Color | Specifies the background color for the alarms rows of a standard alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Urgent alarm color | Color | Specifies the color of the texts for the alarms rows of an urgent alarm type.
Urgent background color | Color | Specifies the background color for the alarms rows of an urgent alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Critical alarm color | Color | Specifies the color of the texts for the alarms rows of a critical alarm type.
Critical background color | Color | Specifies the background color for the alarms rows of a critical alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color. properties.
Alarm back color | Color | Specifies the background color for the odd rows.
Alternating alarm back color | Color | Specifies the background color for the even rows. Setting a different value than for the Alarm back color property allows obtaining the effect of alternate display of alarms in different colors.
Selected alarm font color | Color | Specifies the color of the text for the currently selected row. Indication of an active row can be disabled by selecting the Transparent color.
Selected alarm back color | Color | Specifies the background color for the currently selected row. Indication of an active row can be disabled by selecting the Transparent color.
Row indicator color | Color | Specifies the background color of the rows indicator column.
Selected row indicator color | Color | Specifies the background color of selected row in the rows indicator column.
Buttons color | Color | Specifies the background color of the toolbar buttons.


AsBase Table

Object Functions

The AsBase Table object is an object for displaying in tabular form the data from the AsBase database.

The object allows you to work also in co called mixed mode. In this mode, only some fields of archiving collections and recipes are displayed in the table. The values of other fields can be displayed with other objects by the use of process variables declared in the archiving collection of AsBase. In mixed mode, the table displays all the data records meeting the given criteria, and other objects display the values of a single record fields, associated with the currently selected row in the table.

Fig. Examples of the AsBase Table Object.

The object has its own mechanisms of interaction allowing for movement within the rows of the table, filtering and sorting them, loading a recipe definition into process variables, writing the table content into a text file. Through the action ObjectAction it is also possible to add, delete and modify records displayed in the table.

The object can display its own toolbar. The toolbar functions can also be performed with the use of the operator action ObjectAction.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Datasource Type | Enumerated type: Active, Recipes, Loads | Specifies the type of source data retrieved from the AsBase database.
Datasource Id | Text | The identifier of the primary data source; depending on the value of Datasource Type, it is an archiving collection Id or recipe group Id.
Related Database Id | Text | The identifier of a related database - that means of the database which has been declared in AsBase as being in relationship with the primary source.
Variable Set Id | Text | An optional variable set identifier for the primary source to the variables of which the values of fields of current row will be written.
Related Variables Set Id | Text | An optional identifier of variable set for the related source to the variables of which the values of fields of current row will be written.
Filtering Expression | Text | The expression that allows you to limit the scope of the data available in the table. Details of the filter syntax you find in the chapter Operation with the AsBase Program of Asix.Evo_Application_Parameterization.PDF/CHM.
Sorting Expression | Text | Expression defining the initial ordering of records. If the property is not defined, the data is sorted automatically according to the time registration or recipe names (depending on the type of data source). The property value has to be compatible with the SQL syntax of ORDER BY clause. Rules of naming the fields are the same as in the case of a filtering expression. EXAMPLE V_PROD_LENGTH DESC Decreasing sorting according to the value of the field with the PROD_LENGTH Id.
Rows Limit | Text | Specifies the maximal number of rows displayed in the table. The value 0 means that the number of rows is not limited and result from the number of records recorded in tables of data source and given filtering expression.
Variables Set for Loading Id | Text | The optional ID of the variable set to which recipe values will be recorded as a result of loading command execution. The loading command is available in the toolbar or you can use the operator action ObjectAction. The functionality is available only when the primary source is a recipe. Execution of loading action is recorded in the loading table of the AsBase database.
Header Font Size | Number | Specifies the size of the font used to display the column headers.
Data Font Size | Number | Specifies the size of the font used to display information in value rows.
Font | Font name | The system name of the font used to display all the texts in the table.
Font Style | Enumerated type: Regular, Bold, Italic, Underline, Strikeout | Specifies the style of the font being used. You may use many styles simultaneously.
Visible Rows Count | Number | If the property is equal to 0, the number of displayed rows results from the size of font and the object size. It changes if the object size changes due to the diagram scaling. If the property is greater than 0, the same number of rows is always displayed - the font size is automatically modified when changing the size of the object.
Visible Rows Count | Logical | Specifies whther to display the line of column headings.
Auto Columns Width | Logical | Specifies how to calculate the column width. For the value Yes, all the columns have to change within the object area. For the value No, if the total column width exceeds the width of the object, a horizontal slider is displayed. In both the cases, the property Column Width [%] is also important.
Allow Filtering | Logical | Specifies whether the mechanism of setting the column filters will be unlocked. The mechanism allows the user to select displayed records interactively.
Toolbar Height | Number | Specifies the height of the table toolbar. The height equal to 0 means disable the toolbar.
Show Download Button | Logical | Specifies whether the toolbar displays the record download button.
Allow Export Button | Logical | Specifies whether the toolbar displays the button that allows the user to write the table content into a text file.

Column Properties

Name

Value Type

Description

Column Visible

Logical

Specifies whether the column is visible. The property allows the use to select the columns in application execution mode.

Master Table Field

Text

Specifies whether the field is from the primary (master) data source or from the related data source.

Field Id

Text

The field Id (according to the definition recorded in the AsBase database) the values of which will be displayed in the column.

Column Width [%]

Percent

Specifies the column width as a percentage. The value 0 means that the column is to be calculated based on the object width, the other column width and the selected operation mode set in the property Auto Columns Width. When operating in automatic mode, the sum of the property values ​​for all columns can not exceed 100%. The columns with the width of 0 occupy the entire remaining width of the object. In particular, if only one column will have the width of 0, it takes up the entire remaining space (after taking into account the width of the other columns). In this mode without automatic calculation of the width, if the sum of the widths of columns exceeds 100%, the horizontal scroll bar is displayed.

Column Header

Text

Specifies the column header text. If the property is not defined, then the contents of the header will be determined based on the field definition stored in the AsBase database.

Horizontal Text Align

Enumerated type: Left, Center, Right

Specifies how to align text in the cells of table rows.

Field Value Format

Tekst

Specifies how to convert the field value to text. The formatting text has to be compatible with the format of .Net. A more detailed description of formats is in the description of the Format function.

Example:

Number {0: d4}

The result is a combination of the text 'Name' and a 4-character number filled with zeros from the left side, e.g. Number 0001.

Font Color

Color

Specifies the color of text displayed in the cells of the table rows. If the property is not set, it applies the value of the state property Rows Font Color.

Background Color

Color

Specifies the background color of the table row cells. If the property is not set, it applies the value of the state property Rows Background Color.

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the background color of the table - used when rows do not occupy the entire area of the table.
Grid Color | Color | Specifies the color of the grid separating the fields and rows of the table.
Header Font Color | Color | Specifies the color of header text.
Header Back Color | Color | Specifies the background color of the column header line.
Rows Font Color | Color | Specifies the color of texts displayed in the value row cells. It makes sens only for columns for which the property Font Color is not set.
Rows Background Color | Color | Specifies the background color of odd rows of values. It makes sens only for columns for which the property Background Color is not set.
Alternating Rows Background Color | Color | Specifies the background color of even rows of values. It makes sens only for columns for which the property Background Color is not set.
Selected Row Font Color | Color | Specifies the color of the text displayed in cells of the currently selected row of the table.
Selected Row Back Color | Color | Specifies the background color of cells of the currently selected row in the table.
Buttons Color | Color | Specifies the color of toolbar buttons.


9 Authorization Box Object

Home > Objects > Authorization Box Object

Authorization Box Object

Object Functions

The Authorization Box object is an object used to perform login, logoff operations and to change user passwords. The background color as well as logout and password change buttons visibility may be specified at the configuration stage of this kind of object.

Fig. Examples of the Authorization Box Object.

The object allows inserting functions related to the user management directly on the diagram. The alternative is to use the Control Panel window or to create a custom login interface using the Login and Logout operator actions.

The Authorization Box is a control type object.

See also:

- Operator Actions > Login, Logout actions

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Close current window after login | Logical | Selection Yes will cause that after the successful login the window (in which the object is displayed) will be closed. Automatic shutdown should only be used when the object was placed on a dedicated window, designed to log the user (on the diagram opened by the action OpenDiagram).

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the object background color.
Password change button visible | Logical | Specifies whether the Password change button is to be displayed.
Logout button visible | Logical | Specifies whether the Logout button is to be displayed.


13 Bar Object

Home > Objects > Bar Object

Bar Object

Object Functions

The Bar object is a multifunctional object used to both display the value measurements in the form of a scale bar and to control the value of the connected variable using a slider. The following properties may be defined for each bar: value range, the number of major and minor divisions of the scale, the location of scale display and the style of hatching the bar. It is possible to display the limits (LL, L, H, HH) with colors individually set.

The object has built-in interactive features for changing the setpoints using the integrated slider. In the control process an object can interact with other objects through the so-called preview variable - this mechanism allows showing the setting value before performing the actual control.

Fig. Examples of the Bar Object.

Fig. Example Use of the Bar Object in Conjunction with the Picture Object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Preview Variable

Variable name

Specifies the name of the variable preview. If the object performs a control function, then when the user moves the slider, the preview variable is set to a value which would be sent to the controlled variable, if at this moment the operator would let the slider off. This allows showing a numeric value of a potential setpoint using the Text type object. The preview variable should be of Double type. The moment the slider is released, the preview variable is set to the minimum value of a Double type - it allows detection of the state when the slider is not used and e.g. to switch off the preview showing.

Minimum Control Value

Number

The control value corresponding to the extreme left (bottom) position of the slider.

Maximum Control Value

Number

The control value corresponding to the extreme right (upper) position of the slider.

Horizontal Orientation

Logical

Specifies whether the object is drawn horizontally or vertically.

Show Bar

Logical

The property allows disabling a display of the value bar. In the case of this variant, the object can be used to display the scale of the values.

Bar Width [%]

Percent

Specifies what percentage of the width (height) of the object the value bar occupies.

Bar Hatch Style

Enumerated type:

Horizontal, …

Specifies the bar drawing method.

Pointer Style

Enumerated type: None, Line, Triangles, Holder

Specifies the pointer display method. The pointer is used to present the setting value related to the value bar. The position of the pointer is specified by the Pointer Value taking the Minimum Control Value and Maximum Control Value limits into account.

If the name of the controlled variable was specified (the Control Variable property) and the object is active (the Active property), then the pointer is used as a slider, with which the user can change the setting value.

Show Left Calibration

Logical

Specifies whether a division is drawn on the left (upper) side of the bar.

Show Right Calibration

Logical

Specifies whether a division is drawn on the right (lower) side of the bar.

Without background

Logical

Specifies whether the background of the object is drawn. If not, only the values bar is displayed and, if switched on, the left and right division.

Background Picture

Image Name

The name of the image used as the filling texture of the image background. The picture must be contained in the application picture library.

Picture Fill Mode

Enumerated type: Tile, Stretch

Specifies whether the background picture size is adjusted to the size of the object, or whether it is displayed in the original size repeatedly, so that the entire background is filled.

Use Limits

Logical

Specifies whether the color of the value bar depends on exceeding of the limits specified by the values of the Limit HH properties, etc.

Segment Bar According to Limits

Logical

Specifies whether the value bar is to be drawn in segments of sizes and colors specified by the exceeding limits (the Limit HH properties, etc.) and colors (the Color HH properties, etc.).

Additionally, the Use Limits property must be set to True.

Show Limits

Logical

Specifies whether the limit values (defined by the values of Limit HH properties) are to be displayed on the bar background.

Font

Font Name

The system name of the font used to display the value of the bar scale divisions.

Font Style

Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout

Determines the used font style. Multiple styles can be used simultaneously.

Divisions Count

Number

Specifies the number of bar scale major divisions.

Subdivisions Count

Number

Specifies the number of minor divisions between each pair of major divisions.

Bar Value

Number

Specifies the current height of the bar. The property value should be a number within the range defined by the Minimum Value and Maximum Value.

Pointer Value

Number

Specifies the position of the pointer. The property value should be a number within the range defined by the Minimum Control Value and Maximum Control Value.

Minimum Value

Number

The low limit of the bar scale.

Maximum Value

Number

The high limit of the bar scale.

Bar Base Value

Number

Specifies the base value which determines the base of the bar. If the bar is to start from the beginning of the scale, the base value should be identical to the minimum value.

Value LL

Number

Specifies the LL limit (critical minimum) for alarm activation. The limit can be individually switched off by setting it to the minimum value.

Value L

Number

Specifies the L limit (minimum) for alarm activation. The limit can be individually switched off by setting it to the minimum value.

Value H

Number

Specifies the H limit (maximum) for alarm activation. The limit can be individually switched off by setting it to the maximum value.

Value HH

Number

Specifies the HH limit (critical maximum ) for alarm activation. The limit can be individually switched off by setting it to the maximum value.

Rounding Radius

Number

Specifies the corner rounding radius expressed in pixels.

Immediate Control

Logical

Specifies whether in the case of a new position of the slider, the setpoint corresponding to it is automatically sent to the controlled variable. If not, then in order to execute the control, the use of the SendControls operator action is required.

Control Group

Text

Specifies the group name of the control objects. If the object switches into pending state before control sending (waiting for the SendControls action) all the other objects of the group abort the pending state. The mechanism guarantees that if the operator had any alternative methods of setting the same value (e.g. the Bar and Text objects), then only the last control will be executed.

State Properties

Name | Value Type | Description
Pointer Color | Color | Specifies the pointer color (slider).
Background Color | Color | Specifies the object background color.
Bar Background Color | Color | Specifies the background color of the bar value.
Calibration Color | Color | Specifies the division color on the bar scale. The Transparent color allows switching off the scale preserving the bar and background layout.
Proper Value Color | Color | Specifies the color of the bar for values within the range of the normal values.
Color LL | Color | Specifies the color of the bar for values within the range of the LL values (critical minimum).
Color L | Color | Specifies the color of the bar for the values within the range of the L values (minimum).
Color H | Color | Specifies the color of the bar for the values within the range of the H values (maximum).
Color HH | Color | Specifies the color of the bar for the values within the HH value (critical maximum).

Events

See: Visualization Elements > Standard Events of Objects


11 Button Object

Home > Objects > Button Object

Button Object

Object Functions

The Button object is used to visualize two-state control buttons. Various types and styles of buttons are available - colors and visual effects may be freely configured. The button function my be indicated by a text or/and picture.

The button activation results in setting of the controlled variable or execution of any operator action. The buttons may operate in the "repeat" mode, in which the control (of an action) is performed cyclically when the button is kept held down.

It is possible to define a keyboard shortcut, which may be used to activate the button function. In addition, the buttons can be grouped under the so-called control group, which enables synchronous control of individual bits of the variable.

Fig. Examples of the Button Object.

Fig. Example Use of the Button Object in Conjunction with the Picture Object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Bitwise Control | Logical | Specifies the method for execution of the object control operations. If set to False, the control values specified in the On Value, Off Value and End Repeating Value properties will be sent to the controlled variable without any modification. When bit control is active, the control operation for the On Value and End Repeating Value involves setting non-zero bits of the mask, and for the Off Value all bits of the controlled variable will be set to 0 according to the defined off bit mask.
Button Kind | Enumerated type: Rectangular 3d Button, Eliptic 3d Button, Horizontal Switch, Vertical Switch, Standard Windows Button, Check Box | Specifies overall look and behaviour of buttons.
Flat | Logical | Specifies whether the button is to be of flat or three-dimensional form. Three-dimensional buttons support animation of the button pressing and releasing effect.
Switch Mode | Logical | Defines the button operation mode. In the switch mode, when clicked, the object changes its state to the opposite state (executes the relevant control operation and event). In normal mode, the button acts as monostable switch - when clicked, the object executes the operations associated with the transition to the opposite state and back to its initial state.
Feedback timeout [ms] | Number | Property that is used only when Switch Mode is equal to true. If the object is not in the process of choosing a new value, then the object state is defined by the property On.
Gradient Direction | Enumerated type: Horizontal, Vertical, Backward Diagonal, Forward Diagonal | Specifies the way of gradient filling for the button background. The property is of significance only for certain types of buttons and requires setting of the Off Gradient Color and On Gradient Color properties. If the response time limit property is set, then after control operation execution the button state is hold by the given time resulting from the performed operation - regardelss of the value of the property On. This is to prevent movement in a situation where the execution time of control operation and object response is noticeably long.
Depth of Shadow | Number | A value grater than 0 enables button shadow (applies only to certain types of buttons). The shadow is drawn as shifted down and to the left by the specified number of pixels. This property is of significance only if the shadow color is set in the Shadow Color property.
Outline Width | Number | Specifies the width (in pixels) of the outline drawn around the button. This property is of significance only if the outline color is set in the On Outline Color and Off Outline Color properties.
Picture Mode | Enumerated type: Tile, Stretch, Center, Scaled Before Text, Scaled After Text, Top Adjoining, Bottom Adjoining, Left Adjoining, Right Adjoining, Sacled Background | Describes the picture positioning method displayed on the button.
Picture Visible | Logical | Specifies whether to display the image on the background of the button.
Rounding Radius | Number | Specifies the rounding radius of the corner buttons. Applies only to flat rectangular buttons.
Horizontal Text Align | Enumerated type: Left, Centre, Right | Specifies the horizontal alignment method of the texts describing the button.
Vertical Text Align | Enumerated type: Top, Center, Right | Specifies the vertical alignment method of the texts describing the button.
Font | Font Name | System name of the font used to display button texts.
Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Determines the used font style. Multiple styles can be used simultaneously.
Font Size | Number | Specifies the size of the font used to display the texts describing the button. The value of 0 means automatic size adjustment.
Text Padding [%] | Number | Specifies the margin size taken into account when displaying the description of the button. This property is of significance only when the automatic size adjustment of the font is switched on.
Lines Count | Number | Controls the way of matching the font height with the text length. The value of 0 means that the font should be reduced to the level allowing a whole text to be fit inside the object area. This allows, depending on the text length, to use another type of font. A value greater than 0 means that the font height is determined only by the size of the object. If necessary, the text may be shortened or split into several lines.
Immediate Control | Logical | Specifies whether at the moment the button is used the control value is automatically sent to the controlled variable. If not, then in order to execute the control, the use of the SendControls operator action is required.
Repeatable | Logical | Specifies whether the button operates in the mode of automatic repetition of the control operation. In the continuous repeat mode in which the user holds down the mouse button, an operation of setting the controlled variable to the value specified in the On Value or OFF Value property is performed periodically, and the Button OFF or Button On event is repeated. After releasing the mouse button, the End repeating event is executed once and also the control according to the value specified in the End repeating Value property is executed.
Shortcut | Text | Specifies the name of the keyboard buttons combination which, when pressed by the user, is equivalent to clicking with the mouse on the object area. It is recommended to achieve appropriate shortcut names by using the properties edit window. Examples of names: Alt + Q, Shift + F10, Ctrl + Space
Control Group | Text | Specifies the group name of the control objects. If the object switches into pending state before control sending (waiting for the SendControls action) all the other objects of the group abort the pending state. The mechanism allows organising the buttons into groups that control the individual bits of the same variable and guarantee setting only one, the last selected bit.

State Properties

Name

Value Type

Description

On

Logical

Specifies whether the button is currently in switched on (pressed) or off (depressed) state. On the basis of the state, relevant descriptions and color of the button are chosen.

The property value can be ignored if the property Feedback timeout is set, and the object is just after the control operation execution.

Off Value

Text

Specifies the control value used in case if the button switches on (is pressed). Depending on the setting of the Bitwise Control property, it is the value sent directly or the bit mask of the bits being set.

On Value

Text

Specifies the control value used in case if the button switches off (is depressed). Depending on the setting of the Bitwise Control property, it is the value sent directly or the bit mask of the bits being set to zero.

End Repeating Value

Text

Specifies the value used to complete the control sequence in the repeat mode. Depending on the setting of the Bitwise Control property, it is the value sent directly or bit mask of the bits being set.

Off Color

Color

Specifies the basic color of the button background when switched off.

On Color

Color

Specifies the basic color of the button background when switched on.

Off Gradient Color

Color

Specifies the color used for the gradient filling for the button background when switched on. The background color will change smoothly between the basic color and the gradient color. The filling direction is specified by the Gradient Direction property.

On Gradient Color

Color

Specifies the color used for the gradient filling for the button background when switched on. The background color will change smoothly between the basic color and the gradient color. The filling direction is specified by the Gradient Direction property.

Off Outline Color

Color

Specifies the color of the button outline when switched off.

On Outline Color

Color

Specifies the color of the button outline when switched on.

Shadow Color

Color

Specifies the color of the button shadow.

Off Picture

Image Name

Specifies the name of the image displayed on the button when switched off.

On Picture

Image Name

Specifies the name of the image displayed on the button when switched on.

Off Text

Text

Specifies the text displayed on the button when switched off.

On Text

Text

Specifies the text displayed on the button when switched on. If it is empty, then in every button state the text specified in the Off Text property is used.

Off Text Color

Color

Specifies the color of the image displayed on the button when switched off.

On Text Color

Color

Specifies the color of the image displayed on the button when switched on.

Events

See: Visualization Elements > Standard Events of Objects

Name | Description
Button On | This event is executed when the button switches off (is pressed). If the control is not prompt, the event will occur only when the SendControls action is executed.
Button Off | This event is executed when the button switches off (is depressed). If the control is not prompt, the event will occur only when the SendControls action is executed.
End Repeating | This event is executed once at the end of the control sequence in the repeat mode.


20 Chart Object

Home > Objects > Chart Object

Chart Object

Object Functions

The Chart object is an object that allows drawing graphs of variable values.

Fig. Chart Example.

In a typical case, the chart displays values retrieved from the archive of historical values of process variables. However, it can also work in current value mode. Then, you do not need to archive the value of the variable, because the chart is built on the basis of current values available from the moment the chart is started. You can also display aggregate values for historical data.

It is possible to draw multiply trends (series) on the same chart. The variable, chart style (line or bar), correct values color, uncertain values color, line thickness, tags style and whether it operates in the so-called percentage mode (in which values are scaled within the range 0 -100 based on the variable attributes defining the range) may be specified individually for each series.

In addition to the variable series, the chart also allows displaying the pre-defined model trends. The curve and start time point and - like in the case of series - color, style and width of the line and tags may be defined for each pattern trend. Model trends may be customised in the run mode. For each trend defined, the curve may be replaced and the start time point may be modified. These options are available in the chart contextual menu.

Another element displayed on the chart are so called limits. They can be displayed as a line or band. The limits are shown as horizontal lines (bands) and do not depend on the history of changes of variables. If the limit values ​​would change over time, they should be independently archived and shown on the graph as regular series.

The Chart object has its own mechanisms for chart management, such as the scale modification or shifting along the time axis. It is also possible to control the chart using the Chart controller object. A synchronous control of Chart object groups is also possible.

The table below describes the keyboard shortcuts supported by the Chart object.

Shortcut | Meaning
Arrow key | Moving the cursor in the direction indicated
Shift + arrow key | Moving a chart along the X or Y axis in the direction indicated
Ctrl + arrow key | Increasing or decreasing the X or Y axis range depending on which arrow key was used
PgUp, PgDn | Moving a chart along the X axis by the entire chart range
Shift + PgUp, PgDn | Moving a chart along the Y axis by the entire chart range
Ctrl-Home | Resetting the time axis to the initial settings
Ctrl-End | Resetting the value axis to the initial settings
5 of the numeric keyboard | Centering the cursor position
Ctrl + 5 of the numeric keyboard | Resetting a chart to the initial settings
Ctrl-h | Displaying the time range changing box
Ctrl-l | Displaying the legend box
Ctrl-F1 | Displaying the help box showing all the keyboard shortcuts
Ins | Enabling or disabling the cursor

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description
Dynamic Value Range Logical Specifies whether the scope of the Y axis is dynamically calculated based on read values of graph points. The axis range can change while the chart displaying, according to the value of incoming points. If the property is set to true, all the properties mentioned below (relating to the Y scaling) do not make sens.

Automatic Minimum Value

Logical

Specifies whether the initial minimum value on the vertical axis is automatically calculated. A calculation algorithm is based on searching the minimum value of the DisplayRangeFrom attribute for all the displayed variables.

Minimum Value

Number

Specifies the initial minimum value on the chart vertical axis. The property used when the algorithm for automatic calculation of the minimum value as well as dynamic value range is not used.

Automatic Maximum Value

Logical

Specifies whether the initial maximum value on the vertical axis is automatically calculated. The calculation algorithm is based on searching the maximum value of the DisplayRangeTo attribute for all the displayed variables.

Maximum Value

Number

Specifies the initial maximum value on the chart vertical axis. The property used when the automatic algorithm for calculating the maximum value as well as dynamic value range is not used.

Manual Base Time

Text

The property allows forcing the selection of the time range shown on the chart. If the property is not set, the initial chart is defined on the basis of the current moment.

The property is of text type. Any format recognizable by the system as a date and time is permitted. Explicitly defined base time is used only when the Refresh mode property is set to the Manual value.

Time Range [min]

Number

Specifies the initial time range shown on the chart.

Current Data Only

Logical

If the property value is equal to True, the variable trends are drawn on the basis of the current values of these variables. The object starts to accumulate a history of changes since the diagram opening. If the property value is equal to False, the variable trends are drawn on the basis of the historical data stored in the archives.

Refresh Mode

Enumerated type: Incremental, Smooth, Manual

Specifies chart shifting method when the chart reaches the object right edge. In the incremental mode, the chart is shifted once by about 20% of the object size and for a period of time it remains stationary. In the smooth mode, the chart is shifted all the time by a minimum distance resulting from the time scale specified. In the manual mode, the chart can only be shifted by the user.

Show Cursor

Logical

Specifies whether to display the cursor on the chart, facilitating the indication of variable values for the specified point in time.
Snap Cursor Logical Specifies whether the cursor is automatically positioned on the graph value. Operation in snapping mode changes the way of handling the arrow keys and buttons Move Cursor ... in the Chart Controller object. In the snapping mode they are used to move through the series points or to select the series.

Chart Title

Text

Defines the chart title text.

Show Legend

Logical

Specifies whether to display the chart legend. By default, the displayed legend includes the variable name and its description loaded from the variable definition database. The curve description can be changed in the series properties.

Show time calibration

Logical

Specifies whether to display the time axis scale.

Show value calibration

Logical

Specifies whether to display the value axis scale.

Value step

Number

Specifies the interval between successive value scale lines. 0 - means automatic selection.

Value Subdivisions Count

Number

Specifies the number of subscales between successive major scales of the value axis.

Grid on top

Logical

Specifies whether the grid lines are to cover lines of graphs and limits.

Movable Axis

Logical

Specifies whether the user can change the time scale and values by dragging them with a mouse.

Chart Group

Text

Specifies the name of a chart group. The charts of the same name are handled in a synchronous manner - all navigation operations on one of a charts of the group are reflected on other charts. The group name is also used to connect the Chart object with Chart controller object.

Use Shortcuts

Logical

Specifies whether the user in the application run mode can use navigation keys, which allow among others changing a value range or navigate through the timeline.

Customizable Trend Patterns

Logical

Specifies whether the user can change the displayed pattern trends and their nodes. When "Yes" is set, the context menu with commands for pattern trend management will be available.

Pattern Trend Properties

Name

Value Type

Description

Pattern Name

The pattern trend name

Specifies the name of the pattern trend to be displayed.

Pattern Anchor

Text

Sets a first node of the pattern trend. The property is of text type. Any format recognizable by the system as a date and time is permitted.

If the first node is not specified, the pattern trend starts from the right edge of the chart.

The user may change the first node manually, if the Customizable trend patterns property is set to True.

Style Series

Enumerated type: Line, Bar, Stairs, Area

Specifies whether the curve is a linear, bar, area or stairs type.

Marks Style

Enumerated type: None, Time, Value, Time and value

Specifies whether the tag with information on log time and / or logged value should be displayed at each point of the trend.

Color

Color

Specifies the color of the curve (or bars).

Width

Number

Specifies the width of the curve (or bars).

Area Base Value

Number

The property is used only for area charts. It specifies the level according to which the value areas are circled.

Series Properties

Name

Value Type

Description

Variable Name

Variable name

Specifies the variable name the chart of which is to be displayed.

Style Series

Enumerated type: Line, Bar, Area, Stairs

Specifies whether the curve is a linear, bar, area or stairs (dedicated to binary values) type.

Marks Style

Enumerated type: None, Time, Value, Time and value

Specifies whether the tag with information on log time and / or logged value should be displayed at each point of the trend.
Line Pointers Enumerated type: None, Small Point, Point, Small Rectangle, Rectangle, Small Circle, Circle, Small Diamond, Diamond, Small Sphere, Sphere Specifies whether (and how) to display the symbol of the point at each recorded point of the graph. The style Small Point is the special one. For continuous graph it is invisible, but it allows to display "holey graph", when a single recorded points are flanked by areas of missing data.

Color

Color

Specifies the color of the curve (or bars).

Uncertain Status Color

Color

Specifies the color of the curve (or bars) used to indicate uncertain values.

Width

Number

Specifies the width of the curve (or bars).

Percentage

Logical

Indicates whether the historical data are to be converted to percentage values. The conversion is based on the range of variable loaded from DisplayRangeFrom and DisplayRangeTo attributes. Conversion into percentage values allows displaying a curves of different variable ranges (ranges which cannot be matched each other in vertical scale) on the same chart.

Aggregate

Text

Specifies the name of the aggregate to be used to convert the historical values of the variable shown on the chart.

Available aggregate names: none, start, end, delta, min, max, range, total, average, average0, sumup, sumdown, prevknown, last, stdev, rms, avglk, totallk.

Using the none name means that the raw data should be used (not converted).

See: Aggregate Types for Archived Data (PDF).

Aggregate Interval

Text

Specifies the aggregation interval used in the conversion of raw historical into the aggregated values. The interval is transmitted as string, in a format compatible with the one used in the ToTimeSpan function.

Example:

0:01:00

1 minute aggregates are calculated

15M

15-minute aggregates are calculated

Bits pattern

Text

The property allows for the creation of a binary curve. The pattern takes the form of a text and is composed of the characters: -, 0 and 1, representing respectively: the trivial value, the value of 0 and the value of 1. Based on a comparison of the variable and the pattern the point value (True or False) is calculated.

Example:

The text "10—" means that if the bit number 3 is equal to 1 and the bit number 2 is equal to 0 for the value of the variable at the point, the value of the point is True. In any other case, it is False.

Value for False

Number

The property used for binary curves (calculated based on Bits pattern). In conjunction with the property Value for True allows you to put optionally a binary curve in the graph area. In particular, the multiple binary curves can be put one above the other in the graph area.

The property specifies the value of a point in the graph, corresponding to the value False of the series point.

Value for True

Number

The property is always used with the property Value for False. The property specifies the value of a point in the graph, corresponding to the value True of the series point.

Description

Text

The curve description in the chart legend. Null means using the variable name of the series with its description retrieved from the variable definition database.

Area Base Value

Number

The property used only for area charts. It specified the level according to which the value areas are circled.

Limits Properties

Name | Value Type | Description
Limit style | Enumerated type: Line, Band. | Specifies how to display the limit: in the form of line or band.
Value (begin) | Number | It defines the first limit vlue (for bands). It defines positioning of the limit line (for lines).
End value / line width | Number | It defines the second limit value (for bands). It defines the line width (for lines).
Limit color | Color | Specifies the color used to display the limit.
On top | Logical | Specifies whether the limit is displayed over the series graphs and other elements of the chart.

NOTICE:

When limits are displayed as bands, the chart grid and (depending on the value of the On top property) series graphs may be covered. You can avoid this by using a transparent color limit. To do this, enter the color in numerical form, for example the color 120;238;130;238 is a transparent purple color. You can also set the property Grid on top from Basic Properties.

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the chart background color.
Grid Color | Color | Specifies the chart grid color. Choosing the color of Transparent causes the grid is not drawn.
Axis Color | Color | Specifies the color of vertical and horizontal axis of the chart.
Axis Description Color | Color | Specifies the scale description color for vertical and horizontal axis of the chart.
Axis Font Name | Font Name | The system font name used to display axis descriptions.
Asix Font Size | Number | Specifies the system font size used to display axis descriptions.
Axis Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Specifies the system font style used to display axis descriptions. Multiple styles can be used simultaneously.
Title Color | Color | Specifies the chart title line color.
Title Font Name | Font Name | The system font name used to display the chart title.
Title Font Size | Number | Specifies the system font size used to display the chart title line.
Title Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Specifies the system font style used to display the chart title. Many styles can be used simultaneously.
Legend Font Color | Color | Specifies the color of the font used to display the legend on the chart.
Legend Background Color | Color | Specifies the background color of the legend area of the chart.
Legend Font Name | Font Name | The system font name used to display the chart legend.
Legend Font Size | Number | Specifies the system font size used to display the chart legend.
Legend Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Specifies the system font style used to display the chart legend. Many styles can be used simultaneously.
Cursor Color | Color | Specifies the cursor color. The cursor visibility is enabled with the Show cursor property.


4 The Chart Controller Object

Home > Objects > Chart Controller Object

Chart Controller Object

Object Functions

The Chart controller object is used to control the operation of the Chart objects. It allows to create a mouse operated interface for the charts. The object has the form of a toolbar – the available buttons set and their layout may be customized by the user.

The connection between a controller object and a chart object is established on the basis of the Chart group property definition compliance. It is possible to simultaneously connect several Chart objects - in this case, all the connected objects are controlled in an identical manner.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Chart group

Text

Specifies the name of the controlled Chart object group. The controlled objects must have their group names set in the same manner.

Buttons

Multiple enumerated type: Move left, Move right, Move down, Move up, Zoom in X, Zoom out X, Zoom in Y, Zoom out Y, Range left, Range right, Range down, Range up, Move cursor left/Previous Point, Move cursor right/Next Point, Move cursor down / Previous Series, Move cursor up / Next Series, Center cursor, Go to now, Default value range, Initial state, Set time horizon, Show legend, Show help, Cursor on/off

This property determines which control functions (buttons) are to be available. The set of the available functions concerns mostly the change of the displayed time range, change of the time scale and the time change itself as well as the cursor positioning. The Go to now button switches the charts to display the latest data. The Default value range button switches the scale of the objects value according to the settings stored in the definition of objects, while the Initial state button switches the chart state to the state in which the objects were directly after opening of the diagram. The Set time horizon button allows the user to select any range of time displayed.

Mode of operation of buttons Move Cursor ... depends on the property Snap Cursor of the Chart object. Normally, they relate to the free movement of the cursor. In the mode of snapping they are used to navigate through the series points or to select the series.

Horizontal Layout

Logical

Specifies whether the buttons are displayed horizontally or vertically.

Two lines

Logical

Specifies whether the buttons are displayed in two lines.

State properties

Name | Value Type | Description
Background color | Color | Specifies the button background color.


Container_of_Templates

Home > Objects > Container of Templates

Container of Templates Object

Object Functions

The Container of Templates object is designed to automatically duplicate the selected template or templates in the base with a list of template names or a list of template parameter values. It helps to specify a table with a given number of rows and columns. Templates with subsequent parameter values are available in the table cells. If there are more elements to display than table cells, it is possible to navigate between pages using the appropriate operator actions (ObjectAction action). The object also enables reading the current number of elements, the total number of pages and the current page number (ObjecData function).

Example

The measurement standard below, whose parameter is the name of the process variable

can be duplicated automatically using the Container of Templates object as follows:

Fig. Example of Container of Templates.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Datasource

DataTable

It allows establishing a general data source for an object in the form of a DataTable value type provided using the AppData function (..) or as a variable value. The application data (AppData) or variable can be set using a script as a DataTable value containing defined columns and rows. Template names and parameter values will be taken from the indicated column.

Columns count

Number

Determines the number of visible columns. The minimum value is 1 and the maximum value is 50.

Rows count

Number

Determines the number of visible rows. The minimum value is 1 and the maximum value is 50.

Template name(s)

Text, table, collection

When it contains the name of one template, the template is duplicated as many times as the parameter values passed (the most numerous).

When it contains a list of templates names (separated by semicolons or passed as an array, collection or column of a table, result of VarNames (..) function), the number of displayed elements results from the size of this list.

If a data source is provided in the object (DataTable via the AppData function (..)), then instead of the name of the template, enter the name of the column containing the name of the template.

Skip when no parameters

Logical

It allows you to not add elements to the table when there are no values for all parameters or they are empty.

Keep Aspect Ratio

Logical

Specifies whether the templates in table cells should maintain their original proportions.

Align

Enumerated: None, Top, Bottom, Left, Right

In aspect ratio mode, it allows you to align templates to specific edges of table cells.

Left / Right / Top / Bottom margin

Number

These properties allow you to specify the percentage of margin width in each direction.

Line Width

Number

Defines the thickness of the lines separating rows and columns.

Dash Style

Enumerated: None, Dash, Dot, Dash-Dot, Dash-Dot-Dot

Defines the style of painting lines separating rows and columns.

State Properties

Name | Value Type | Description
Color | Colour | Specifies the background color of the table.
Line Color | Colour | Specifies the color of the lines separating rows and columns.

Template Parameters

Name | Value Type | Description
Parameter Name | Text | Specifies the name of the template parameter.
Parameter Values | Text, table or collection | This property can be defined as: • List of values separated by semicolons • Table - an array variable or returned by the AppData function (..) • Collection returned by the AppData function (..) • If a data source is given in the object (DataTable via the AppData function (..)), then the column name with parameter values should be entered here. · Array values returned by the functions: ToTable(..), Sequence(..), VarNames(..)
Multiply | Logical | It allows you to duplicate a single value or sequence of parameter values for all the templates in the table. Useful, for example, when you need to pass the same parameter value to all templates.

Events

See: Visualization Elements > Standard Events of Objects

Navigation Actions

The following operations are available for the Container of Templates object in the ObjectAction(..) function:

• $First - Jumps to the first page

• $Previous - Go to the previous page

• $Next - Goes to the next page

• $Last - Jumps to the last page

• $Reload - Reloads the patterns

• $GoToPage - Jumps to the selected page

Examples:

^ObjectAction("kw1", $Next)

^ObjectAction("kw1", $GoToPage, 5)

View Object Status

For the Container of Templates object, the ObjectData(..) function supports the following data:

• CurrentPage - The number of the current page

• PageCount - Total number of pages

• ElementCount - The total number of elements

Example:

=ObjectData("kw1", "CurrentPage")


17 Conveyor Object

Home > Objects > Conveyor Object

Conveyor

Object Functions

The Conveyor object is used to present the state of conveyors. The shape of the object is defined by a coordinate series of individual belt conveyor joints. While defining the conveyor, its width, type (scraper or standard) and a style of the begin and end roller may be defined. By manipulating the parameters which define the belt displacement and drive rotation, it is possible to obtain an animation effect which simulates the belt travel in either direction and at any speed.

The Conveyor object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Fig. Examples of the Conveyor Object.

Fig. Example Use of the Conveyor Object (Harrow Conveyor Type) in Conjunction with the Picture Object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Verticles | List of coordinates | List of X, Y coordinate pairs of the consecutive belt conveyor joints. The X and Y coordinates of the joint position are expressed in pixels and are measured from the top left corner of the diagram. Consecutive vertex pairs are separated by a semicolon.
Thickness | Number | Specifies the conveyor belt thickness expressed in the number of pixels.
Begin roller style | Enumerated type: Flat, Round, Big roller, Small roller, Big roller with axle, Small roller with axle, Drive | Specifies the conveyor begin roller style.
End roller style | Enumerated type: Flat, Round, Big roller, Small roller, Big roller with axle, Small roller with axle, Drive | Specifies the conveyor end roller style.
Harrow conveyor | Logical | Specifies whether the scrapers should be drawn on the belt.

State Properties

Name

Value Type

Description

Color

Color

Specifies the basic fill color for the inside area of the conveyor.

Second color

Color

Specifies an alternative color of the inside area used to fill the lower half of the conveyor.

Rim color

Color

Specifies the color of a line drawn over the belt.

Border color

Color

Specifies the basic color used for drawing the belt. It is also used for the scrapers (if the Border stripes color is not defined).

Border stripes color

Color

In the case of a scraper conveyor it specifies the scraper color. For belt conveyors without scrapers it specifies an alternative color of the belt.

Conveyor Sleeper color

Color

Specifies the color of a line drawn under the belt.

Begin roller color

Color

Specifies the color of the conveyor begin roller.

End roller color

Color

Specifies the color of the conveyor end roller.

Conveyor offset

Number

In the scraper conveyor display mode, the property allows shifting the draw model, which provides a motion animation effect. In the case of a harrow conveyor, the shifting unit is the width of a single scraper, and in the case of a belt conveyor it is a pixel.

Example:

=Variable(Counter)

This expression animates the motion of the pipeline according to the changes of the Counter system variable. The shifting direction can be changed by changing the sign (plus or minus) of the expression animating the travel. Alternatively, the variable value multiplying (dividing) allows controlling the speed and smoothness of the animation.

Begin drive rotation

Number

If the begin roller is of Drive type, the property allows the roller rotation animation. The rotation unit is a degree. The general principles of the animation are the same as in the case of the Conveyor offset property.

End drive rotation

Number

If the end roller is of Drive type, the property allows the roller rotation animation. The rotation unit is a degree. The general principles of the animation are the same as in the case of the Conveyor offset property.

Events

See: Visualization Elements > Standard Events of Objects


Data_Chart

Home > Objects > Data Chart

Data Chart Object

Object Functions

The Data Chart object is an object that allows you to draw any trends and charts from the data provided by the scripts using the application data mechanism (AppData) or using special functions (e.g. ToTable(..)). The object is, among others, suitable for creating professional OEE charts, energy consumption, machine operating times (Gantt) etc.

Fig. Examples of the Data Chart Object.

It is possible to draw many trends (series) on one chart. Each of the series can have separately specified data, chart style (point, linear, smooth linear, stepped linear, vertical bar, horizontal bar, area, stepped, circular, ring, Gantt), color, line thickness, mark style, etc.

Another element displayed on the chart are the so-called limits. They can be shown as lines or bands. Limits are shown as horizontal lines (bands) and do not depend on the course of the series.

In the operator mode, the object can also be operated with the mouse, depending on the selected zoom and pan mode.

Operation | Meaning
Selecting the chart area from left to right | Zoom in on the indicated chart area (depending on the selected X, Y or both panning mode).
Select the chart area from right to left | Chart reset to initial settings.
Dragging the X or Y axis | Shifts the value range of the X or Y axis in the desired direction (depending on the shift mode selected in the X, Y axis or both).
Panning with the right mouse button | Any movement of the chart area (depending on the selected mode of moving in the X, Y axis or both).

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Datasource | DataTable | It allows to establish a general data source for a series in the form of a DataTable value type provided using the AppData(..) function or as a variable value. The application data (AppData) or variable can be set using a script as a DataTable value containing defined columns and rows. Each series of the chart can refer to the appropriate column (X, Y, V label values, colors).
Time domain | Logical | Specifies whether the horizontal X axis of the graph shows time or numeric values.
Data refresh period | Number of miliseconds | Specifies how often the chart updates after changes in the data source.
Chart Title | Text | Specifies the content of the chart title.
Legend Style | Enumerated: None, Top, Bottom, Left, Right | Specifies the visibility and location of the legend.
Legend Series Selection | Logical | Specifies whether in the legend we allow the operator to control the visibility of the series.
Show Horizontal Axes | Logical | Specifies whether to display the horizontal axis scale X.
Show Vertical Axes | Logical | Specifies whether to display the vertical axis scale (left and right) Y.
Top axis min | Number or time | Specifies the initial minimum value on the upper horizontal axis.
Top axis max | Number or time | Specifies the final maximum value on the upper horizontal axis.
Bottom axis min | Number or time | Specifies the initial minimum value on the bottom horizontal axis.
Bottom axis max | Number or time | Specifies the final maximum value on the bottom horizontal axis.
Bottom axis inverted | Logical |
Left axis min | Liczba | Specifies the initial minimum value on the left vertical axis.
Left axis max | Liczba | Specifies the final maximum value on the left vertical axis.
Left axis inverted | Logical |
Right axis min | Number | Specifies the initial minimum value on the right vertical axis.
Right axis max | Number | Specifies the maximum value on the right vertical axis.
Right axis inverted | Logical |
Top axis labels | Logical | Specifies whether to display descriptions for the upper horizontal axis.
Bottom axis labels | Logical | Specifies whether to display descriptions for the bottom horizontal axis.
Left axis labels | Logical | Specifies whether to display left vertical axis descriptions.
Right axis labels | Logical | Specifies whether to display the descriptions of the right vertical axis.
Top axis increment | Number or time | Specifies the spacing between the major divisions of the upper axis.
Bottom axis increment | Number or time | Specifies the spacing between the major divisions of the lower axis.
Left axis increment | Number | Specifies the spacing between the major divisions of the left axis.
Right axis increment | Number | Specifies the spacing between the major divisions of the right axis.
Top axis subdivisions | Number | Specifies the number of subdivisions between the major divisions of the upper axis.
Bottom axis subdivisions | Number | Specifies the number of subdivisions between the major divisions of the bottom axis.
Left axis subdivisions | Number | Specifies the number of subdivisions between the major divisions of the left axis.
Right axis subdivisions | Number | Specifies the number of subdivisions between the major divisions of the right axis.
Top axis labels angle | Number | Specifies the angle in degrees at which the upper axis labels are displayed.
Bottom axis labels angle | Number | Specifies the angle in degrees at which the bottom axis labels are displayed.
Left axis labels angle | Number | Specifies the angle in degrees at which the left axis labels are displayed.
Right axis labels angle | Number | Specifies the angle in degrees at which the right axis labels are displayed.
Left axis format | Text | Specifies the suggested format for the scale descriptions for the left axis. Examples: f3 - numbers with three decimal places e.g. 45,483 p0 - percentage e.g. 89% 0 mA - with any unit e.g. 100 mA
Right axis format | Text | Specifies the suggested format for the scale descriptions for the right axis. Examples: f3 - numbers with three decimal places e.g. 45,483 p0 - percentage e.g. 89% 0 mA - with any unit e.g. 100 mA
Time format | Text | Specifies the suggested format for the scale descriptions to format on the bottom time axis. For example, the HH: mm: ss format creates tags in the form 13:30:45.
Percentage stack | Logical | Specifies whether values of stacked series are to be scaled to percentages.
Zoom mode | Enumerated: None, Horizontal, Vertical, Both | Specifies whether the operator can change the scale of the chart in specific directions.
Pan mode | Enumerated: None, Horizontal, Vertical, Both | Specifies whether the operator can move the chart in specific directions.
Font | Font style | Font used by the chart.
Font Style | Enumerated: Regular, Bold, Italic, Underline, Strikeout | Font style used by the chart.
Title Font Size | Number | The font size used to display the title. You can use a fixed size, e.g. 12 or a percentage relative to the object height, e.g. 5%.
Axis Font Size | Number | Font size used to display axis labels. You can use a fixed size, e.g. 12, or a percentage relative to the object height, e.g. 5%.
Legend Font Size | Number | The font size used to display the descriptions in the legend. You can use a fixed size, e.g. 12, or a percentage relative to the object height, e.g. 5%.
Left Margin | Number | The size of the left margin between the object edge and the chart area.
Right Margin | Number | The size of the right margin between the object edge and the chart area.
Top Margin | Number | The size of the top margin between the object edge and the chart area.
Bottom Margin | Number | The size of the bottom margin between the object edge and the chart area.

Limits

Name | Value Type | Description
Limit Style | Enumerated: Line, Band | Specifies how the limit is displayed: in the form of a line or band.
Value (begin) | Number | For band: the first limit value, for lines: the limit line position.
End Value / Line Width | Number | For band: the second limit value and for line: the width.
Limit Color | Colour | Specifies the color used to display the limit.
On Top | Logical | Specifies whether the limit is displayed above the series curves and other chart elements.
Axis | Enumerated: Top, Botton, Left, Right | Specifies which axis the limit is associated with.

Series

Name | Value Type | Description
X Values | The name of the column, array or value collection | The values of the coordinates of the horizontal axis of the series or the beginnings of sections of the Gantt series. If the object uses a generic data source (Basic Properties -> Datasource), then the name of the table column is sufficient. In other cases, you can use the ToTable(..) function (e.g. = ToTable (Variable (V1), Variable (V2), Variable (V3)) to define the course points or use the AppData(..) function or the value of an array variable to obtain the scoreboard table.
Y Values | The name of the column, array or value collection | Coordinate values of the vertical axis of the series. If the object uses a generic data source (Basic Properties -> Datasource), then the name of the table column is sufficient. In other cases, you can use the ToTable(..) function (e.g. = ToTable (Variable (V1), Variable (V2), Variable (V3)) to define the course points or use the AppData(..) function or the value of an array variable to obtain the scoreboard table.
V Values | The name of the column, array or value collection | The ends of episodes of the Gantt series. If the object uses a generic data source (Basic Properties -> Datasource), then the name of the table column is sufficient. In other cases, you can use the ToTable(..) function (e.g. = ToTable (Variable (V1), Variable (V2), Variable (V3)) to define the course points or use the AppData(..) function or the value of an array variable to obtain the scoreboard table.
Labels | The name of the column, array or text collection | Series point label texts. If the object uses a general data source (Basic Properties -> Datasource), then the name of the table column containing the texts is sufficient. In other cases, you can use the ToTable(..) function (e.g. = ToTable ("Machine 1", "Machine 2", "Machine 3") to define an array of labels or use the AppData(..) function or the value of an array variable to obtain a table of texts.
Colors | The name of the column, array or colour collection | Colors of points, episodes or areas of the series. If the object uses a general data source (Basic Properties -> Datasurce), then the name of the table column containing the colors is sufficient. In other cases, you can use the ToTable(..) function (e.g. = ToTable (Red, Green, Blue) to define the label table, or use the AppData(...) function or the value of the array variable to obtain the color table.
Description | Text | The name or description of the series, e.g. displayed in the legend.
Data series style | Enumerated: Points, Line, Stairs line, Smooth line, Area, Stairs area, Bar, Horizontal bar, Pie, Donut, Gantt | Defines how the points of the series are displayed.
Data Marks Style | Enumerated: None, X value, Y value, Label | Specifies whether markers should be displayed with point information at each recorded waveform point.
Line Pointers | Enumerated: None, Small point, Point, Small rectangle, Rectangle, Small circle, Circle, Small diamond, Diamond, Small sphere, Sphere | Specifies whether the point symbol should be displayed (and in what form) at each recorded run point.
Stack Number | Number | For series of line, area or bar type, it allows you to group series into stacks by assigning them the same stack number.
First Color | Colour | Specifies the main color of points, curve or bars.
Second Color | Colour | Specifies an additional color (e.g. border of bars).
Line Width | Number | Specifies the width of the drawn curve (or bar border).
Size/Distinction | Number | It allows you to control the width of the bars or the highlighting of the largest circle segment or the size of the hole in the ring.
Area/Bar Base Value or Start Angle | Number | For area or bar style charts, specifies the level against which value areas or drawn bars are plotted. For ring or donut charts, specifies the starting angle in degrees.
Pie/Donut Angle Size | Number | The angle spread (in degrees) of ring or donut charts.
Top Axis | Logical | Lets you attach the series to the top axis instead of the bottom one.
Riht Axis | Logical | Specifies whether the series is attached to the right or left vertical axis.
Series Click Action | Akcja operatorska | It allows you to define an operator action that will be performed when the operator clicks on the given series. It can be used e.g. to display a window with details or to drill data. In the action, you can use the EventContext function to reference the details associated with the click: SeriesIndex, PointIndex, PointX, PointY, PointLabel, MinX, MaxX, MinY, MaxY.

State Properties

Name | Value Type | Description
Background Color | Colour | Specifies the background color of the chart.
Canvas Color | Colour | Specifies the background color of the canvas.
Title Color | Colour | Specifies the color of the chart title line.
Legend Font Color | Colour | Specifies the font color used to display the chart legend.
Legend Background Color | Colour | Specifies the background color of the chart legend area.
Top Axis Color | Colour | Upper axis color.
Bottom Axis Color | Colour | The bottom axis color.
Left Axis Color | Colour | Left axis color.
Right Axis Color | Colour | Right axis color.
Top Axis Labels Color | Colour | Upper axis label color.
Bottom Axis Labels Color | Colour | The color of the bottom axis labels.
Left Axis Labels Color | Colour | Left axis label color.
Right Axis Labels Color | Colour | Right axis label color.
Top Axis Grid Color | Colour | Upper axis grid color.
Bottom Axis Grid Color | Colour | Lower axis grid color.
Left Axis Grid Color | Colour | Left axis grid color.
Right Axis Grid Color | Colour | Right axis grid color.
Top Axis Subdivisions Grid Color | Colour | Top axis subdivisions grid color
Bottom Axis Subdivisions Grid Color | Colour | Color of the subdivision of the lower axis.
Left Axis Subdivisions Grid Color | Colour | Color of the subdivision of the left axis.
Right Axis Subdivisions Grid Color | Colour | Color of the subdivision of the right axis.

Events

Name | Value Type | Description
View Change | Operator action | It allows to define operator actions called after each change of the chart scale or each shift of its area. In the action, you can use the EventContext function to reference the details associated with the event: MinX, MaxX, MinY, MaxY.

Examples of parameterization:

• Ad-hoc graph of current values - using the ToTable(..) function to create arrays of values:

• Chart from the data table (columns X, Y, V, L, C) created by the script and saved in AppData - using the AppData(..) function to read this table:

• Displaying the measurement panel with detailed data after clicking the bar of the series - using the EventContext(..) function to retrieve information about the X coordinate of the bar clicked:


Database_Table

Home > Objects > Database Table

Database Table Object

Object Functions

The Database Table object is an object that allows displaying in tabular form data from any MS SQL server database.

The object also allows you to work in the so-called mixed mode. In this mode, only some selected table fields are displayed in the table. The values of other fields can be displayed using other objects by using process variables connected to the fields in the object definition. In mixed mode, the table displays all data records that meet the specified criteria, and other objects display the field values of a single record associated with the currently selected table row.

Fig. Example of a Database Table Object with Auxiliary Elements.

The object has its own interactive mechanisms that allow you to navigate within the table rows, filter and sort them, save the contents of the table to a text file.

You can change the records of the table shown. This is done via the ObjectAction operator action in the $Add, $Delete and $Update variants and process variables connected to the table fields.

The object can display its own toolbar. The bar functions can also be performed via the ObjectAction operator action.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Data Source | DataTable | It allows to establish a general data source for a table in the form of a DataTable value type provided using the AppData(..) functionor as a variable value. The application data (AppData) or variable can be set using a script as a DataTable value containing defined columns and rows. Each table column can refer to the corresponding DataTable object column.
Connection String | Text | Specifies SQL server connection parameters and database name (connection string). The correct property value is easiest to enter using the property editor.
Table Name | Text | Name of the table from which the data will be shown. You can also enter a view name.
Key Field Name | Text | The name of the table field, which is its key field. Specifying this property is necessary if the object is to allow data editing.
Filtering Expression | Text | A filter expression that allows you to limit the range of data available in the table. It is given in the SQL language syntax (where clause).
Sorting Expression | Text | An expression that specifies the initial ordering of records. It is given in SQL syntax (order by clause).
Rows Limit | Numer | Specifies the maximum number of rows displayed in the table. The value of 0 means that the number of rows is not limited and results only from the number of records saved in the table and the filter expression specified.
Reload Trigger | Logical | This property allows the implementation of the mechanism of automatic refresh of table contents. Changing the value from false to true reads the data from the SQL server again.
Header Font Size | Number | Specifies the font size used to display the column headers.
Data Font Size | Number | Specifies the font size used to display information in value lines.
Font | Font name | The system name of the font used to display all texts in the table.
Font Style | Multiple enumerated: Regular, Bold, Italic, Underline, Strikeout | Specifies the style of font used. You can use multiple styles at the same time.
Visible Rows Count | Number | If the property is 0, the number of lines displayed is based on the font size and size of the object. It changes if the object size changes as a result of the diagram scaling. If the property is greater than 0, the same number of lines is always displayed - the font size is automatically modified when the object size is changed.
Column Headers Visible | Logical | Specifies whether to show the column header line.
Auto Columns Width | Logical | Specifies how the column width is calculated. For Yes, all columns must fit in the object area. For No, if the total width of the columns exceeds the width of the object, a horizontal slider is displayed. In both cases, the column property Column width [%] also matters.
Allow Filtering | Logical | Specifies whether the mechanism for setting column filters will be enabled, allowing the application user to interactively select displayed records.
Toolbar Height | Number | Specifies the height of the table toolbar. A height of 0 means turning off the bar display.
Allow Export Button | Logical | Specifies whether the button to save the table contents to a text file will be displayed on the toolbar.

Columns

Name

Value Type

Description

Column Visible

Logical

Specifies whether the column is visible. The property allows selection of displayed columns in the application execution mode. It also allows you to map the process variable name to the data table field without showing the data column.

Field Name

Text

Specifies the name of the field in the data table (SQL columns) which values will be shown in the column.

Dictionary Table Name

Text

Specifies the name of the SQL table that will translate the original value of the column field into its alternative text form.

Dictionary Key Field Name

Text

If a dictionary table was specified, the property specifies the name of its translation key column. Based on the field value, a record with a matching value in the key column is looked for in the dictionary table.

Dictionary Value Field Name

Text

Specifies the name of the dictionary table column from which the text form of the field value is retrieved.

Mapped Variable

Text

The name of the process variable that is set according to the value of the column field in the current record of the table. Mapped variables are also necessary when using table data editing mechanisms.

Column Width [%]

Percent

Specifies the percentage width of the column. The value 0 means that the column width is to be calculated based on the width of the object, the width of other columns and the selected operating mode in the Auto Columns Width property.

In the case of operation in the automatic width mode, the sum of the property values for all columns may not exceed 100%. Columns with a width of 0 occupy the entire remaining width of the object. In particular, if only one column has a width of 0, it will take up all the remaining space after taking into account the width of the other columns.

In the mode without automatic width calculation, if the sum of the column width exceeds 100%, a horizontal slider will be displayed.

Column Header

Texst

Specifies the column header text. If the property is not defined, the header content will be determined based on the field name.

Horizontal Text Align

Enumerated: Left, Center, Right

Specifies how to align texts in table row cells.

Field Value Format

Text

Specifies how the field values are converted to text. The format string must be compatible with the .Net format. A more detailed description of content formatting methods is provided in the Format function description.

Example:

Number {0: d4}

The result of the above formatting is a combination of the text Number with a 4-character fill filled with zeros from the left, e.g. Number 0001

Surrogate Text

Text

The text that will be displayed in the column cells for which there is no data.

Font Color

Colour

Specifies the color of the texts displayed in the cells of table rows. If the property is not set, then the value of the state property is the Rows Font Color.

Background Color

Colour

Specifies the background color of table row cells. If the property is not set, the value of the state property Rows Background Color applies.

Action

Operator Action

It allows you to define an operator action that will be performed when the operator clicks on the contents of a column cell. It can be used, for example, to display a window with details or to drill data. In the action, you can use the EventContext function to reference the details associated with the click: ColumnIndex, RowIndex, FieldName, MappedVariable, CellValue.

State Properties

Name | Value Type | Description
Background Color | Colour | Specifies the background color of the table - used when the value rows do not occupy the entire table space.
Grid Color | Colour | Specifies the color of the grid separating the fields and table rows.
Header Font Color | Colour | Specifies the color of the texts describing the headers.
Header Back Color | Colour | Specifies the background color of the column heading lines.
Rows Font Color | Colour | Specifies the color of the texts displayed in the value row cells. Only relevant for columns the Font Color property of which has not been set.
Rows Background Color | Colour | Specifies the cell background color of the odd-value value rows. Only relevant for columns the Background Color property of which has not been set.
Alternating Rows Background Color | Colour | Specifies the background color of the even rows of value rows. Only relevant for columns the Background Color property of which has not been set.
Selected Rows Font Color | Colour | Specifies the color of the texts displayed in the cells of the currently selected table row.
Selected Row Back Color | Colour | Specifies the background color of the cells of the currently selected table row.
Buttons Color | Colour | Specifies the color of toolbar buttons.


Flap Object

Object Functions

Flap is used for graphical presentation of inclination of rotating elements (flaps, blinds, shutters, etc.). For each object you can define the start/end angles of element deflection, specify the type of element (single or two-armed) and specify the shape of caps.

Fig. Examples of the Flap Object.

Flap does not have any built-in interactive / control features. However, you can add this functionality by using operator actions to handle events.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Minimum Value | Number | The lower limit of the flap position, corresponding to From Angle.
Maximum Value | Number | The upper limit of the flap position, corresponding to To Angle.
From Angle | Number | Determines the flap slope for the minimal value, expressed as an angle calculated in relation to the horizontal (right) position of the pointer. The extrem maximal deflection is defined by the property To Angle. The interrelation of both properties of angles determines the direction of the pointer rotation. If necessary, use angles greater than 360 degrees. In the followin examples, the minimum and maximum values are respectively 0 and 100, and the current values is 30. From Angle: 0, To Angle: 90: From Angle: 0, To Angle: 180: From Angle: 0, To Angle: 360: From Angle: 0, To Angle: 270:
To Angle | Number | Determines the slope of the flap for the maximum value.
Flap width | Number | Determines the flap width.
Two Arms | Logical | Determines whether the flap has two arms.
Center Cap Size | Number | Specifies the cap size of the flap rotation axis.
First Cap Style | Enumerated type: Flat, Round, Triangle. | Specifies the tip type of the first arm of the flap.
Second Cap Style | Enumerated type: Flat, Round, Triangle. | Specifies the tip type of the second arm of the flap.

State Properties

Name | Value Type | Description
Value | Number | Specifies the current position of the meter pointer. The property value should be a number from the range specified by the properties: Minimum Value and Maximum Value.
First Arm Color | Color | Specifies the color of the first arm of the flap.
First Arm Gradient Color | Color | Specifies the color used to display the first arm. The color will be changed smoothly between the base color and the gradient color.
Second Arm Color | Color | Specifies the color of the second arm of the flap.
Second Arm Gradient Color | Color | Specifies the color used to display the second arm. The color will be changed smoothly between the base color and the gradient color.
Center Cap Color | Color | Specifies the cap color of the flap rotation axis. The transparent color allows you to turn off the cover displaying.
Center Cap Gradient Color | Color | Specifies the color used to display the axis cover. The color will be changed smoothly between the base color and the gradient color.

Events

See: Visualization Elements > Standard Events of Objects


7 Gauge Object

Home > Objects > Gauge Object

Gauge Object

Object Functions

The Gauge object is used to display numerical values of the measurements in the form of an analogue clock. The following properties may be defined for each gauge: value range, the number of major and minor divisions of the scale, start and end angles of the scale displayed. It is possible to display the limits (LL, L, H, HH) with color set individually.

Fig. Examples of the Gauge Object.

Fig. Example Use of the Gauge Object in Conjunction with the Picture Object.

The Gauge object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Without background

Logical

This property allows displaying of the gauge in a simplified form in which only the scale and the pointer of the gauge are shown. This mode is designed to create gauges with two pointers by overlaying two gauges, one of which is displayed in the Without background mode.

The scale may be removed by setting the Calibration Color and Font Color property to the Transparent.

Background Picture

Image Name

This specifies the name of the picture that appears as the gauge background.

Show Limits

Logical

Specifies whether the ranges within the limits are to be indicated with different colors.

Show Limits on Background

Logical

Specifies whether the ranges within the limits are to be indicated on the whole background of a gauge.

Font

Font Name

The system name of the font used to display the value of the gauge scale divisions.

Font Style

Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout

Determines the used font style. Multiple styles can be used simultaneously.

Divisions Count

Number

Specifies the number of gauge scale major divisions.

Subdivisions Count

Number

Specifies the number of minor divisions between each pair of major divisions.

Value

Number

Indicates the current position of the gauge pointer. The property value should be a number within the range defined by the Minimum Value and Maximum Value.

Minimum Value

Number

Low limit of the gauge scale.

Maximum Value

Number

High limit of the gauge scale.

Value LL

Number

Low Limit (LL) (critical minimum) of the gauge scale.

Value L

Number

Low Limit (L) (minimum) of the gauge scale.

Value H

Number

High Limit (H) (maximum) of the gauge scale.

Value HH

Number

High Limit (LL) (critical maximum) of the gauge scale.

From Angle

Number

Specifies the location of the start point of the gauge scale defined as an angle measured from the horizontal (to the right) position of the pointer. End point of the scale is defined by the To Angle property. Mutual dependence of both the properties of scale angles determines the pointer rotation direction. If necessary, angles over 360 degrees may be used.

The start angle 0, the end angle 90:

The start angle 90, the end angle 0:

The start angle 90, the end angle 360:

The start angle 135, the end angle 405:

To Angle

Number

Specifies the location of the end of the gauge scale.

Proper Value Color

Color

Specifies the color indicating normal value range.

LL Color

Color

Specifies the color indicating LL range (critical minimum).

L Color

Color

Specifies the color indicating L range (minimum).

H Color

Color

Specifies the color indicating H range (maximum).

HH Color

Color

Specifies the color indicating HH range (critical maximum).

State Properties

Name | Value Type | Description
Pointer Color | Color | Specifies the pointer color.
Background Color | Color | Specifies the gauge background color.
Outline Color | Color | Specifies the gauge outline color. The Transparent color disables outline visibility.
Calibration Color | Color | Specifies the gauge scale division color. The Transparent color disables scale division visibility.
Font Color | Color | Specifies the gauge scale division tags color. The Transparent color disables scale division tags visibility.

Events

See: Visualization Elements > Standard Events of Objects


15 Historical Alarms Viewer Object

Home > Objects > Historical Alarms Viewer Object

Historical Alarms Viewer Object

Object Functions

The Historical Alarms Viewer object is an object that allows displaying and advanced filtering of the historical alarms recorded. The table presents the alarms from the selected alarm domain. The data set shown in the table is freely configured. The use of an integrated toolbar is also possible - a set of available features is parameterized.

Fig. Examples of the Historical Alarms Viewer Object.

The Historical Alarms Viewer object is a control type object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Domain

Domain name

Specifies the name of the alarm domain the alarms of which are shown in the table.

Groups

Text

Specifies the initial filter for group selection of the shown alarms. The user can change the filter using the Alarm groups filtering window. The property definition is in the form of a text consisting of pairs: <grouping_attribute_ID> = <attribute_value> separated by a semicolon.

Example:

Zone = "B1" Zone= "B2", Type = "Electrical";

The alarms whose Zone attribute is equal to B1 or B2 and the Type attribute is equal to Electrical will be displayed.

Header font size

Number

Specifies the size of the font used to display the column headers.

Message font size

Number

Specifies the size of the font used to display information in the alarm rows.

Visible rows count

Number

If the property is equal to 0, the number of displayed rows is determined by the font size and object size. It changes if the object size changes as a result of the diagram scaling. If the property is greater than 0, then the same specified number of rows is always displayed - the font size is automatically modified when the object is resized.

Toolbar buttons

Multiple enumerated type: No toolbar, Selection criteria, Description searching, First alarm, Previous page, Previous alarm, Next alarm, Next page, Last alarm, Details, Print

Specifies the content of a table toolbar. The following types of buttons are available:

  • Selection criteria - opening of a displayed alarm selection window;

  • Description searching - opening a window for alarm filtering or searching according to the description;

  • First alarm - positioning on the first row of a table, function identical to pressing the Ctrl-Home button;

  • Previous page - forces movement up by a number of rows equal to the page size, function identical to pressing the Page Up button;

  • Previous alarm - positioning by one row up, function identical to pressing the up arrow button;

  • Last alarm - positioning on the last row of a table, function identical to pressing the Ctrl-End button;

  • Next page - forces movement down by a number of rows equal to the page size, function identical to pressing the Page Down button;

  • Next alarm - positioning by one row down, function identical to pressing the down arrow button;

  • Details - opening a window with alarm details, function identical to double-clicking on the alarm row;

  • Print - opening the alarm printout window.

Filter expression

Text

Specifies an initial alarm selection filter. The user can change this filter during operation using the Selection Criteria box. The filter is in the form of an SQL expression for the alarm database polling - the easiest method to set this property is to use the property editor box.

Example:

(Priority = 1 OR priority = 0)

The filter selects urgent and critical alarms only.

If you use the time filter, you can use the dynamic components of the form ’r;$Time(opc_time)’ in the expression content. It allows you to get the initial filtering condition that depends on the diagram open time. Example:

StartTime >= '$Time(NOW-2H)'

The filter selects alarms that started within the last two hours.

Toolbar Height

Number

Specifies the height of the toolbar in pixels. The size of the button icons depends on the toolbar height.

Column headers visible

Logical

Specifies whether to show the column header line.

Alarms order

Enumerated type: Sequentially, According to start time, According to alarm detection time

Specifies the method of sorting alarms in a table. In the sequence mode, the alarms are sorted according to the order of events occurrence in the system.

Invert alarms order

Logical

Specifies the order of displaying the alarms. The Yes value means that the latest alarm is displayed in the first (top) line of the table.

Row indicator visible

Logical

Displays additional columns for signaling the selected rows.

Time format

Text

Specifies the format of displaying the alarm time columns. The yyyy'-'MM'-'dd' 'HH':'mm':'ss'.'fff default format displays times in the form of 2011-06-17 11:10:09.345. It is possible to customize this format using any of the field designations from the default format. Field separators can be arbitrary, but must be located between apostrophes.

Column Properties

Name

Value Type

Description

Column type

Enumerated type: Id, Priority, Category, Status, Description, Event time, Begin time, Begin description, End time, End description, Begin detection time, End detection time, Accepted, Accept time, Accept by, Accept on, Filtered

Specifies the information type displayed in a column. Information concerning the alarm derives from the log of historical alarms or from the alarm definition database. The alarms table does not have to include columns that show all information types. The user can use the Alarm Details window in order to gain access to all information related to an alarm. The following types of buttons are available:

  • Id - the alarm identifier;

  • Priority - the alarm priority (critical, message etc.) in the form of an icon;

  • Category - information specifying whether an alarm is of standard or notification type;

  • Status - the event status in the form of an icon (initiated, initiated and confirmed, terminated, terminated and confirmed);

  • Description - an alarm text description, depending on whether the displayed event has been started or terminated, start or termination description is displayed;

  • Event time - displays one of the registered alarms time depending on the event type. For an initiated and unacknowledged alarm, the alarm start time is displayed; for an initiated and acknowledged alarm, the acknowledgement time is displayed; for a terminated alarm, the alarm termination time is displayed, and for a terminated and confirmed alarm, the later termination or confirmation time is displayed;

  • Begin time - recorded time of an alarm start;

  • Begin description - text description of the start of an alarm created on the basis of the alarm definition including the alarm notification parameters;

  • End time - recorded time of an alarm termination;

  • End description - text description of an alarm termination created on the basis of the alarm definition including the alarm notification parameters;

  • Begin detection time - recorded time of an alarm start detection;

  • End detection time - recorded time of an alarm termination detection;

  • Accepted - information specifying whether the alarm was acknowledged by the operator;

  • Accept time - recorded time of an alarm acknowledgement;

  • Accept by- - ID of the user ​​who confirmed the alarm;

  • Accept on - workstation name at which the alarm was acknowledged;

  • Filtered - information specifying whether at the moment of the alarm notification it was subject to the mechanism of alarm detection filter.

Column width [%]

Percent

Specifies the percentage width of a column. A value of 0 means that the width of the column is to be adjusted automatically. If only one column width will be 0, it will occupy the whole remaining place, taking into account the width of other columns.

Column header

Text

Specifies the text of a column header, if it is to be different from the default description.

State Properties

Name | Value Type | Description
Background color | Color | Specifies the table background color - used when there are more alarms than rows in the table.
Grid color | Color | Specifies the color of the grid lines separating the table fields and rows.
Header font color | Color | Specifies the color of the header text.
Header back color | Color | Specifies the background color of column header line.
Message color | Color | Specifies the color of the texts for the alarms rows of a message type.
Message background color | Color | Specifies the background color for the alarms rows of a message type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Warning color | Color | Specifies the color of the texts for the alarm rows of a warning type.
Warning background color | Color | Specifies the background color for the alarm rows of a warning type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Alarm color | Color | Specifies the color of the texts for the alarm rows of a standard alarm type.
Alarm background color | Color | Specifies the background color for the alarm rows of a standard alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Urgent alarm color | Color | Specifies the color of the texts for the alarm rows of an urgent alarm type.
Urgent background color | Color | Specifies the background color for the alarm rows of an urgent alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Critical alarm color | Color | Specifies the color of the texts for the alarm rows of a critical alarm type.
Critical background color | Color | Specifies the background color for the alarm rows of a critical alarm type. Selecting the color Transparent means that the background color is specified based on the Alarm back color and Alternating alarm back color properties.
Alarm back color | Color | Specifies the background color for the odd rows.
Alternating alarm back color | Color | Specifies the background color for the even rows. Setting a different value than for the Alarm back color property allows obtaining the effect of alternate display of alarms in different colors.
Selected alarm font color | Color | Specifies the color of the text for the currently selected row. Indication of an active row can be disabled by selecting the Transparent color.
Selected alarm back color | Color | Specifies the background color for the currently selected row. Indication of an active row can be disabled by selecting the Transparent color.
Row indicator color | Color | Specifies the background color for cells of the rows indicator column.
Selected row indicator color | Color | Specifies the background color for indicator cell of the currently selected row.
Buttons color | Color | Specifies the background color of the toolbar buttons.


2 Keyboard Object

Home > Objects > Keyboard Object

Keyboard Object

Object Fnctions

The Keyboard object is a tool allowing entering text and numeric values using the mouse or touch screens. It can operate in either full alphanumeric keyboard mode or as a simple numeric keypad. The colors of text, outline, background, keys and pressed keys as well as key rounding radius may be set for each Keyboard object.

The user after selecting the field designed for text entering may use Keyboard object keys to type a character string. The Keyboard may operate in auto launch mode - the object appears on text entering attempt. It can be also automatically positioned - then the object sets in the vicinity of the text being edited.

Fig. Examples of the Keyboard Object.

Fig. Example Use of the Keyboard Object in Conjunction with the Picture Object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
KeyboardType | Enumerated type: Classic, Numerical | Specifies whether the displayed keyboard has complete set of alphanumerical keys or just numerical keys.
Keys Rounding Radius | Number | Specifies the rounding radius of the keys.
Automatic Show | Logical | The value of True means that the keyboard is hidden during normal operation and appears only on text entering attempt.
Automatic Location | Logical | Specifies whether the position of the keyboard is to be automatically adjusted to location of the text being edited.

State Properties

Name | Value Type | Description
Font Color | Color | Specifies the key description colors.
Background Color | Color | Specifies the color of the keyboard area outside the keys.
Keys Color | Color | Specifies the key background colors.
Keys Outline Color | Color | Specifies the key outline colors.
Selected Keys Color | Color | Specifies the color of the pressed keys.

Events

See: Visualization Elements > Standard Events of Objects


6 Line Object

Home > Objects > Line Object

Line Object

Object Functions

The Line object allows to create single sections of line or any plane geometric figures composed of a series of sections. The shape of the object is defined by a coordinate series for each vertex of the line. It is possible to define the shape of the line ends and use dashed lines.

Fig. Examples of the Line Object.

The Line object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Verticles | List of coordinates | List of X, Y coordinate pairs for consecutive vertex of lines. The vertex X and Y coordinates are expressed in pixels and are measured from the top left corner of the diagram. Consecutive vertex pairs are separated by a semicolon.
Thickness | Number | Specifies the line thickness in pixels.
Rounded joins | Logical | Specifies whether the connections between particular line sections should be rounded.
Start Cap | Enumerated type: None, Flat, Round, Triangle, Arrow | Specifies the drawing style for the first vertex of the line.
End Cap | Enumerated type: None, Flat, Round, Triangle, Arrow | Specifies the drawing style for the last vertex of the line.
Dash style | Enumerated type: None, Dash, Dot, Dash-Dot, Dash-Dot-Dot | Allows drawing of dashed lines and specifies the gap layout.

State Properties

Name

Value Type

Description

Color

Color

Specifies the line color.

Stripes Color

Color

Specifies the color for the gaps in the dashed line. The Transparent color means that the gaps will be transparent.

Fill offset

Number

In the dashed-line drawing mode it allows shifting the draw model, which provides a motion animation effect. The shift unit is the width of the gap between the dashes of the line.

Example:

=Variable(Counter)/10.0

This expression animates the motion of the line according to the changes of the Counter system variable. Division (or multiplication) of the variable is used to control the speed and smoothness of the animation.

Events

See: Visualization Elements > Standard Events of Objects


1 Log Viewer Object

Home > Objects > Log Viewer Object

Log Viewer Object

Object Functions

The Log Viewer object enables displaying a table with latest system messages on the diagram. These are the same messages that are displayed in the Messages panel in the architect mode. It is recommend to use at least one Log Viewer object in the application - it facilitates diagnosis of the application operation.

It is possible to set predefined message type filters and messages source filers at the stage of the log viewer configuration. Additionally, the sorting and filtering functions may be made available or blocked for the operators during the operation.

Fig. Example of Log Viewer Object.

An alternative method of access to the Message Log in the run mode is the message window, which may be opened via the Control Panel window.

The Log Viewer object is a control type object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Allow sorting

Logical

Specifies whether the user can change the order of the messages displayed. The order change initiated by clicking on the column header.

Allow filtering

Logical

Specifies whether the user can configure filters for the message selection. The filter may refer to the type or source of the message. The filter may be switched by right-clicking on the Type or Source column.

The filer conditions may be pre-defined using the Message type filter and Message source filter properties.

Header font size

Number

Specifies the size of the font used to display the column headers.

Message font size

Number

Specifies the size of the font used to display the messages.

Message type filter

Multiple enumerated type: None, Info, Error, Warning, Exception

Specifies the types of messages that are to be displayed.

Message source filter

Text

Specifies the name of the message source, from which the messages are to be displayed.

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the object background color.
Grid color | Color | Specifies the color of the grid lines separating the fields and the object rows.
Header font color | Color | Specifies the color of the header text.
Header back color | Color | Specifies the background color of column header line.
Message font color | Color | Specifies the color of texts displayed in the message rows.
Message back color | Color | Specifies the background color of message rows.
Selected message font color | Color | Specifies the color of texts displayed in the selected message row.
Selected message back color | Color | Specifies the background color of the selected message row.


3 Messages Object

Home > Objects > Messages Object

Messages Object

Object Functions

The Messages object is used to display text descriptions of the states defined in the message set file. The object functioning is similar to that of the MESSAGES class object of the classic Asix system. The object states are defined in message set files. The description of each state consists of the state value, the text describing the status and display attributes. During the application runtime, a suitable text description is searched in a message set file according to the current state value. The state value may take the form: numeric, value range, text or the '*' character. The '*' means a default state displayed when the main object variable does not match to predefined state values.

State description, e.g.: Temperature exceeded 10 degrees !!!

Fig. Examples of the Messages Object.

The appearance options for the text to be displayed are limited to the color and font selection. The object does not have any built-in control functions. If the advanced text formatting or control functions are required, please use the Text class objects.

The message set is created with the use of Utwórz zestaw komunikatów command executed after double-click on the Message sets node in the Application Explorer panel (menu View > Application Explorer). This command creates a set of messages with the default name 'MessageSet1' (the name can be changed by right-clicking on the selected message set, and selecting the Rename command). When creating a message set the message set file (.msf) is created in the application subdirectory 'MessageSets'. See: Defining the Message Set Files.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Lines count | Number | Controls the way of matching the font height with the text length. The value of 0 means that the font should be reduced to the level allowing a whole text to be fit inside the object area. This allows, depending on the text length, to use another type of font. A value greater than 0 means that the font height is determined only by the size of the object. If necessary, the text may be shortened or split into several lines.

State Properties

Name | Value Type | Description
Value | Number or text | This indicates the current state value. According to this property value the current state description is searched in the message set file.
Message Set | The name of the message set | Filename of the Message Set, from which the state descriptions are read.
Color | Color | Specifies the default color for the texts displayed. Used when the text color is not specified in the state definition.
Cross Out Color | Color | Specifies the color of the keyboard area outside the keys.
Background Color | Color | Specifies the default color for the background of the displayed texts. Used when the text background color is not specified in the state definition.
Horizontal Align | Enumerated type: Left, Centre, Right | Specifies the method for horizontal positioning of the texts inside the object area.
Vertical Align | Enumerated type: Top, Centre, Right | Specifies the method for vertical positioning of the texts inside the object area.
Font | Font Name | System name of the font used to display the text.
Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Determines the used font style. Multiple styles can be used simultaneously.

Events

See: Visualization Elements > Standard Events of Objects

Defining the Message Set Files

The Message Set files are defined in the Message set edit panel called by double-click on specified message set in the Message sets node.

Fig. Message Sets.

The following data types are allowed for the Value column:

  • Symbol: *

Default state, used when it is impossible to match the state of any other message to the current value.

  • State number

The state number as an integer. The state is chosen when the current state value is equal to the number specified.

  • Number range number_from..number_to

Range of the state numbers expressed as two integers separated by .. . The state is chosen when the current state value is within the range specified.

  • State name

Name of the state in the form of a text. The state is chosen when the current value of the state in the form of a text is identical with the name specified.

It is also possible to edit the Message Set files with any external editor supporting Unicode code. The set file can be found in the subdirectory MessageSets of the application definition directory.


8 Picture Object

Home > Objects > Picture Object

Picture Object

Object Functions

The Picture object is used to display a picture form the application picture library. The following picture formats are supported: BMP, JPG, GIF, PNG, TIFF, WMF, EMF, ICO. Also the animated GIF pictures are supported.

Fig. Examples of the Picture Object (the Rotating Fan is an Animated GIF file).

The displayed picture may be proportionally or unproportionally scaled. The picture may also be transformed in many ways: rotations (by 90, 180, 270 degrees), mirror, color, brightness and saturation change.

The Picture object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Scaled

Logical

Specifies whether the picture should be proportionally resized along with the object size change. This also applies to object size change related to a diagram resizing.

When the scaling feature is disabled, the picture is always displayed in its original size and may be truncated on the left or bottom side.

Keep Aspect Ratio

Logical

Specifies whether the picture scaling process fitting the picture to the size of the object should keep the original aspect ratio of the picture.

Picture align

Enumerated type: None, Top, Bottom, Left, Right

Determines how the picture is to be placed in the area of an object.

This property is of significance only if the mode of picture scaling without keeping aspect ratio is not active. No align to the edge means that the picture will be centred.

State Properties

Name | Value Type | Description
Picture Name | Image Name | Displayed name of the picture. The picture must be contained in the application picture library.
Cross Out Color | Color | When a different color than Transparent is defined, a cross out line will be drawn on the picture.
Rotation | Enumerated type: None, 90, 180, 270 | Specifies the rotation angle for the picture. It is possible to determine precisely the rotation angle for SVG pictures (in SVG Rotation property).
Flip | Enumerated type: None, X, Y, XY | Specifies whether the picture will be transformed by mirroring about a selected axis.
SVG Rotation | Number | Specifies the rotation of the image to the right by an angle given in degrees. The property applies only to images in SVG format.
Hue | Number <-1.1> | Specifies the level of a picture color modification. A value of 0 means that the picture will remain in the original version.
Saturation | Number <-1.1> | Specifies the level of a picture color saturation modification. A value of 0 means that the picture will remain in the original version.
Brightness | Number <-1.1> | Specifies the level of a picture brightness modification. A value of 0 means that the picture will remain in the original version.

Events

See: Visualization Elements > Standard Events of Objects


12 Pipe Object

Home > Objects > Pipe Object

Pipe Object

Object Functions

The Pipe object is used to present the state of the pipelines. The shape of the object is defined by a coordinate series for each vertex of the pipe. By an appropriate selection of the shape of the pipe ends it is possible to combine several objects into a single flow diagram. The object allows simulation of the flow effect by manipulation of the properties that define object filling method.

Fig. Examples of the Pipe Object.

Fig. An Example of a Pipe Type Object Application (With an Option of Movement Animation: Liquid "Flows" in the Pipe) in Combination with the Picture Object.

The Pipe object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Vertices

List of coordinates

The list of the X, Y coordinates pairs of consecutive pipe vertex. The vertex X and Y coordinates are expressed in pixels and are measured from the top left corner of the diagram. Consecutive vertex pairs are separated by a semicolon.

Thickness

Number

Specifies the pipe thickness expressed in the number of pixels.

Start Cap

Enumerated type: Flat, Round End, Round, Triangle, Oblique left, Oblique right

Specifies the ending method of the pipeline beginning.

By an appropriate selection of the ends, different Pipe objects can be visually connected.

End Cap

Enumerated type: Flat, Round End, Round, Triangle, Oblique left, Oblique right

Specifies the ending method of the pipe end.

State Properties

Name

Value Type

Description

Color

Color

Specifies the basic color of the pipe. If a gradient is used, the basic color is used on the outer elements of the pipe.

Gradient Color

Color

Specifies the color used for the gradient filling of the object interior. The color will change smoothly between the basic color and the gradient color.

Stripes Color

Color

Specifies the basic color for strips displayed across the pipe. Strips, in conjunction with the Fill Offset property, allow obtaining the flow effect.

Stripes Gradient Color

Color

Specifies the color for the gradient strips filling displayed across the pipe.

Border Color

Color

Specifies the color used to mark the contour of the pipe.

Picture Name

Image Name

The image name used for the filling texture of the pipeline background.

The picture must be contained in the application picture library.

Fill Offset

Number

The display mode of the pipe with transverse stripes (or with texture filling) feature allows shifting of the draw model, which provides a motion animation effect. The shift unit is a pixel.

Example:

=-Variable (Counter)

This expression animates the motion of the pipe according to the changes of the Counter system variable. The minus symbol means that simulated movement is toward the pipe beginning. Alternatively, the variable value multiplying (dividing) allows controlling the speed and smoothness of the animation.

Events

See: Visualization Elements > Standard Events of Objects


19 Polygon Object

Home > Objects > Polygon Object

Polygon Object

Object Functions

The Polygon object allows creating flat closed geometric figures of any shape. The shape of the object is defined by a coordinate series for each vertex of the shape. The inside area color, thickness and color of the outline can be specified for each figure.

The Polygon object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Verticles | List of coordinates | List of X, Y coordinate pairs of consecutive figure vertex. The vertex X and Y coordinates are expressed in pixels and are measured from the top left corner of the diagram. Consecutive vertex pairs are separated by a semicolon.
Outline Width | Number | Specifies the width (in pixels) of the outline drawn along the edge of the figure. This property is of significance only if the outline color is set in the Outline Color property.

State Properties

Name | Value Type | Description
Color | Color | Specifies the fill color for a figure. Setting the color as Transparent and setting a non-zero width for the outline allows to draw only the outline of the figure.
Outline Color | Color | Specifies the outline color.
Outline Style | Enumerated type: None, Dash, Dot, Dash-Dot, Dash-Dot-Dot | Specifies how to draw the outline. The value None means drawing the outline with a full line.

Events

See: Visualization Elements > Standard Events of Objects


Power_Guard_Chart

Home > Objects > Power Guard Chart

Power Guard Chart Object

Object Functions

The Power Guard Chart object is used to display the graph for the selected Power Guard module meter, which allows you to observe intervals and the average value forecast in the current cycle. In addition, the graph displays a vertical current time line, horizontal limit lines, and a horizontal line showing what value is safe for the other intervals - so that the total cycle average does not exceed the limit. The chart also allows you to view historical cycles using the navigation buttons on the right.

Fig. Examples of the Object “Power Guard Chart” (Bar).

Fig. Examples of the Object “Power Guard Chart” (Tringular).

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Meter Id | Text | Specifies the Power Guard module meter the data of which will be shown.
Triangle Mode | Logical | Allows you to switch the graph display mode to triangular (incremental) mode.
Allow Mode Change | Logical | Specifies whether to display a button on the right of the graph to allow operators to switch the display mode.
Show Title | Logical | Specifies whether to draw a title line. The description of the meter given in its definition is used as the content of the title.
Show Footer | Logical | Specifies whether to draw a footer containing basic data regarding the meter period displayed.
Show Buttons | Logical | Specifies whether to draw navigation buttons.
Show Predicted Intervals | Logical | Specifies whether to display predicted intervals.
Show Current Time | Logical | Specifies whether to draw a cursor line showing the current time moment.
Show Safe Value Line | Logical | Specifies whether to draw a line showing the maximum value of the meter at which the permissible limit at the end of the cycle will not be exceeded.
Vertical Axis Min | Number | Lets you specify the upper value of the value axis scale rigidly.
Vertical Axis Max | Number | Lets you specify the bottom value for the value axis scale rigidly.
Value Precision | Number | Specifies the number of decimal places for the displayed average and limit value.

State Properties

Name | Value Type | Description
Background Color | Colour | Specifies the background colour.
Grid Color | Colour | Specifies the grid colour.
Axis Color | Colour | Specifies the color of the axis and edges of the chart.
Axis Description Color | Colour | Specifies the color of the chart axis descriptions (divisions).
Title Color | Colour | Specifies the color of the title line.
Text Color | Colour | Specifies the color of the text in the footer of the chart.
Intervals Color | Colour | Specifies the color of the bars for the values of completed intervals.
Uncertain Intervals Color | Colour | Specifies the color of the bars of values of completed intervals with uncertain calculation status.
Predicted Intervals Color | Colour | Specifies the color of the bars for predicted values for unfinished intervals.
Predicted Uncertain Intervals Color | Colour | Specifies the color of the bars for the predicted values of unfinished intervals with an uncertain calculation status.
Average Value Color | Colour | Specifies the color of the average value bar when it is below the limit.
Exceeded Average Value Color | Colour | Specifies the color of the average value bar when the limit is expected to be exceeded.
Limit Line Color | Colour | Specifies the limit line color.
Time Line Color | Colour | Specifies the cursor line color of the current time.
Safe Line Color | Colour | Specifies the color of the meter value line at which the permissible limit at the end of the cycle will not be exceeded.

Events

The object does not handle any events.


5 Shape Object

Home > Objects > Shape Object

Shape Object

Object Functions

The Shape object enables displaying four basic shapes: rectangle, square, circle and ellipse. The inside area color, rim thickness and color, depth and color of the shadow, depth and color of the convexity (streaks), direction and color of the gradient may be specified for each geometrical figure; additionally, for the rectangle and the square the radius of rounded corners may be specified.

Fig. Examples of the Shape Object.

The Shape object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Shape Kind | Enumerated type: Rectangle, Square, Elipse, Round | Specifies the type of the shape being drawn.
Gradient direction | Enumerated type: Horizontal, Vertical, Forward Diagonal, Backward Diagonal | Specifies the way of gradient filling for the background of the shape being drawn. This property is of significance only if the gradient color is set in the Gradient Color property.
Depth of shadow | Number | A value greater than 0 enables displaying shadow for shapes. The shadow is drawn as shifted down and to the right by the specified number of pixels. This property is of significance only if the shadow color is set in the Shadow color property. The shadow is not drawn if the Depth of convexity property has been set.
Depth of convexity | Number | A value greater than 0 enables the convexity effect (streak) for the shapes being drawn. The convexity color is a modified basic fill color or modified outline color (if the outline is drawn). Convexity is blurred - unless the outline is additionally applied.
Convexity direction | Enumerated type: Top left, Top right, Bottom left, Bottom right | Specifies the direction of convexity effect drawing.
Outline Width | Number | Specifies the width (in pixels) of the outline drawn along the edge of the shape. This property is of significance only if the outline color is set in the Outline Color property.
Rounding Radius | Number | In the case of rectangular and square shapes, this property specifies corner rounding radius expressed in pixels.
Start Angle | Number | In the case of round and ellipse shapes, the property determines the beginning of drawing a round (ellipse) segment. It only matters if the Sweep Angle property is less than 360. The following examples show sections with a 145 degree sweep angle and start angles of 0 and 90 degrees.
Sweep Angle | Number | For circle and ellipse shapes, the property specifies the angle of the circle segment (ellipse) drawn. The value 360 means drawing a full circle (ellipse). The following examples show slices with an initial angle of 0 and an opening angle of 45 and 315 degrees.
Outline Only | Logical | Specifies whether to draw only the outer shell of the object. In particular, the property allows you to draw arcs.

State Properties

Name | Value Type | Description
Color | Color | Specifies the basic fill color for a shape. Setting the color as Transparent and setting a non-zero width for the outline allows to draw only the outline of the shape.
Gradient Color | Color | Specifies the color used for the gradient fill for the shape background. The background color will change smoothly between the basic color and the gradient color. The filling direction is specified by the Gradient Direction property.
Background Picture | Picture Name | The name of the picture displayed as the shape background filling. The image is always displayed in tile mode.
Outline Color | Color | Specifies the outline color.
Outline Style | Enumerated type: None, Dash, Dot, Dash-Dot, Dash-Dot-Dot | Specifies how to draw the outline. The value None means drawing the outline with a full line.
Shadow Color | Color | Specifies the color of the shape shadow.

Events

See: Visualization Elements > Standard Events of Objects


SQL_Alarms_Viewer

Home > Objects > SQL Alarms Viewer

SQL Alarms Viewer Object

Object Functions

The SQL Alarm Viewer object is an object that allows displaying and advanced filtering of historical alarms registered in the MS SQL database. The table shows alarms from the selected alarm domain. For event alarms to be available, at least one SQL database must be defined in the alarm domain to which historical alarm events are saved. The set of data shown in the table is freely defined. It is possible to use the integrated toolbar - the set of available functions is parameterized.

Fig. Examples of the SQL Alarm Table Object.

The Historical Alarms Viewer object is a control type object.

Properties

See: Visualization Elements> Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Domain

Domain name

Specifies the name of the alarm domain the alarmsof which are shown in the table.

Alarms Order

Enumerated type: Events sequence, Events detection sequence, Alarm time, Alarm detection time

Defines how the alarms are ordered in the table. In the event sequence and event detection sequence, the lines contain full information about the occurrence of a given alarm (start, end, confirmation). In alarm time and alarm detection time mode, each line indicates a separate alarm event.

Time horizon

Enumerated type: from 5 minutes to 1 year

Specifies the length of time period for which alarm events are displayed.

Time

date and time

Specifies the start time of the time period for which alarm events are displayed.

Alarm priority filter

Multiple enumerated type: Message, Warning, Alert, Urgent, Critical, System

Specifies the initial priority state of the alarms shown. The operator can change the setting via the toolbar priority selection button.

Criteria

Enumerated type: Normal, Start only, Begins, Ends, Accepted, Unaccepted

Specifies additional criteria for filtering alarm events

Group

Text

Specifies the initial filter for the selection of the group of displayed alarms. The user can change this filter during operation using the top toolbar . The property definition is in the form of text consisting of <grouping_ attribute_identifier>=<attribute_value> pairs separated by a semicolon.

Example:

Zone = "B1";Zone = "B2";Type="Electric";

Alarms the Zone attribute of which is equal to B1 or B2 and the Type attribute is equal to Electric will be shown.

Header Font Size

number

Specifies the font size used to display the column headers.

Row Font Size

number

Specifies the font size used to display information in the alarm lines.

Visible Rows Count

number

If the property is 0, the number of lines displayed is based on the font size and size of the object. It changes if the object size changes as a result of the diagram scaling. If the property is greater than 0, the same number of lines is always displayed - the font size is automatically modified when the object size is changed.

Filter expression

Text

Specifies the initial alarm selection filter. The user can change this filter during operation using the Historical alarm selection window. The filter has the form of an SQL expression used to query the alarm database - the easiest way to set this property is to use the property editor window.

Example:

(Priority = 1 OR Priority = 0)

The filter only selects urgent and critical alarms.

If you use time filters, you can use dynamic form components in the expression body

'$Time(opc_time)'. This allows you to get the initial filtering condition, depending on the time the diagram was opened. Example:

StartTime >= '$Time(NOW-2H)'

The filter selects alarms that started in the last two hours.

Column Headers Visible

logical

Specifies whether to show the column header line.

Row Indicator Visible

logical

Displays an additional column used to signal selected rows.

Time Format

Text

Specifies the format for displaying alarm time columns. Default format yyyy'-'MM'-'dd'HH':'mm':'ss'.'fff displays times in the form 2011-06-17 11:10:09.345. You can freely construct your own format using selected field markings from the default format. The field separators can be any, but they must be placed between single quotation marks.

Filters Toolbar Vsible

logical

Specifies whether the top bar is visible for filtering events.

Toolbar Height

number

Specifies the height in pixels of the bottom toolbar (0 - no bar).

Table Properties

Name

Value Type

Description

Column Type

Enumerated type: Id, Priority, Category, Begin Time, End time, Begin detection time, End detection time, Accepted, Accept time, Accept by, Accept on, Accept note, Filtered, Description, Status, Event Note

Specifies the type of information shown in the column. Information on the alarm comes from the historical alarm log or from the alarm definition database. The alarm table does not have to contain columns showing all types of information. The user can use the Alarm Details pane to access all information related to the alarm. The following column types are available:

Id - the identifier of the alarm;

Priority - the alarm priority (critical, message etc.) in the form of an icon;

Category - information specifying whether the alarm is normal or notification type;

Begin time - the recorded start time of the alarm;

End time - the recorded time when the alarm ended;

Begin detection time - the recorded time for detecting the beginning of the alarm;

End detection time - the recorded time for detecting the end of the alarm;

Accepted - information determining whether the alarm has been confirmed by the operator;

Accept time - the recorded alarm confirmation time;

Accept note - a note entered by the operator when the alarm was acknowledged

Filtered - information specifying whether the alarm was subject to the alarm detection filter mechanism when the alarm was reported.

Description - the text description of the alarm, depending on whether the event shown relates to the beginning or end of alarms, the description of the beginning or end is displayed, respectively;

Status - the status of the event in the form of an icon (started, started and confirmed, completed, ended, ended and confirmed);

Event time - displays one of the recorded alarm times depending on the type of event. For an started and unconfirmed alarm, it shows the alarm start time, for started and acknowledged alarms, it shows the confirmation time, for completed and unconfirmed - the time of the alarm end, and for completed and confirmed - the later of the end or confirmation times;

Column Width [%]

Percent

Specifies the percentage width of the column. The value 0 means that the column width is to be chosen automatically. If only one column has a width of 0, it will take up all the remaining space after taking into account the width of the other columns.

Column Header

Text

Specifies the column header text if it is to be different from the default description.

State Properties

Name | Value Type | Description
Background Color | Colour | Specifies the background color of the table - used when the number of alarms is less than the number of rows in the table.
Grid Color | Colour | Specifies the color of the grid separating the fields and table rows.
Header Font Color | Colour | Specifies the color of the texts describing the headers.
Header Back Color | Colour | Specifies the background color of the column heading lines.
Message Color | Colour | Specifies the color of texts for message lines of type alarm.
Message Background Color | Colour | Specifies the background color for message rows. Selecting the Transparent color means that the background color is determined by the Alarm Background Color and Alternating Alarm Back Color properties.
Warning Color | Colour | Specifies the color of the texts for the warning alarm lines.
Warning Background Color | Colour | Specifies the background color for the warning alarm lines. Selecting the Transparent color means that the background color is determined by the Alarm Background Color and Alternating Alarm Back Color properties.
Alarm Color | Colour | Specifies the color of texts for alarm lines of the normal alarm type.
Alarm Background Color | Colour | Specifies the background color for alarm lines of the normal alarm type. Selecting the Transparent color means that the background color is determined by the Alarm Background Color and Alternating Alarm Back Color properties.
Urgent Alarm Color | Colour | Specifies the text color for urgent alarm lines.
Urgent Background Color | Colour | Specifies the background color for urgent alarm rows. Selecting the Transparent color means that the background color is determined by the Alarm Background Color and Alternating Alarm Back Color properties.
Critical Alarm Color | Colour | Specifies the color of texts for critical alarm lines.
Critical Background Color | Colour | Specifies the background color for the critical alarm lines. Selecting the Transparent color means that the background color is determined by the Alarm Background Color and Alternating Alarm Back Color properties.
Alarm Back Color | Colour | Specifies the background color for odd rows.
Alternating Alarm Back Color | Colour | Specifies the background color for even rows. Setting a different value than for the Alarm background color property allows for the effect of alternating display of alarms in different colors.
Selected Alarm Font Color | Colour | Specifies the color of the texts for the currently selected line. The active line can be turned off by selecting the Transparent color.
Selected Alarm Back Color | Colour | Specifies the background color for the currently selected row. The active line can be turned off by selecting the Transparent color.
Row Indicator Color | Colour | Specifies the background color for the row indicator column cells.
Selected Row Indicator Color | Colour | Specifies the background color for the indicator cell of the currently selected row.
Button Color | Colour | Specifies the background color of the toolbar buttons.
Grid Border Visible | logical | Specifies whether to display the table border line.


21 Tank Object

Home > Objects > Tank Object

Tank Object

Object Functions

The Tank object allows displaying the shapes of tanks. The size and style of each tank top (right) and bottom (left) inlet/outlet may be defined. Additionally, it is possible to specify if the outline and separators are to be displayed and to define their colors. 3D effect is achieved by suitable adjustment of the color gradient.

Fig. Examples of the Tank Object.

The Tank object does not have any built-in interactive and control features. However, it is possible to add this functionality by using the operator actions within the event handling.

See: Techniques of Diagram Creation > Parameterization of Interactive Functions of Passive Objects

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Horizontal Orientation

Logical

Specifies whether the tank is to be drawn in a horizontal or vertical position.

Begin Cap Style

Enumerated type: None, Flat, Flange, Round, Oblique left, Oblique right, Rounded, Conical.

Specifies the style of the left (top) inlet (begin cap)

End Cap Style

Enumerated type: None, Flat, Flange, Round, Oblique left, Oblique right, Rounded, Conical.

Specifies the style of the right (bottom) outlet (end cap).

Begin Cap Size [%]

Percent

Specifies the length of the left (top) inlet (begin cap) The length is determined as a percentage value of the total tank length (height).

End Cap Size[%]

Percent

Specifies the length of the right (bottom) outlet (end cap). The length is determined as a percentage value of the total tank length (height).

Inlet Size [%]

Percent

Specifies the width of the left (top) inlet (begin cap) The width is determined as a percentage value of the total tank length (height).

Outlet Size [%]

Percent

Specifies the width of the right (bottom) outlet (end cap). The width is determined as a percentage value of the total tank length (height).

Show Separators

Logical

Specifies whether the inlet separator lines are to be displayed.

The separator line color is determined by the Border Color property.

State Properties

Name | Value Type | Description
Color | Color | Specifies the basic color for the tank background.
Gradient Color | Color | Specifies the color for the gradient background fill. The background color will smoothly change from the basic color into the gradient color.
Border Color | Color | Specifies the tank and separator border color.

Events

See: Visualization Elements > Standard Events of Objects


18 Text Object

Home > Objects > Text Object

Text Object

Object Functions

The Text object is used to display information in a text form. The displayed texts may be either static or may be linked to the process variable values. The object allows executing the control operations. Two input modes for new values are available: direct text edition or selection from a set of predefined states.

Fig. Examples of the Text Object.

The object allows displaying one- or multi-line texts. The color, thickness and color of the outline, color and depth of the shadow, depth and color of the convexity (blur), direction and color of the gradient, typeface and style of the font as well as the angle of rotation may be specified for each text.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Minimum Control Value

Number

Lower limit for the allowed control values.

Maximum Control Value

Number

Upper limit for the allowed control values.

Rotation Angle

Number

The angle in degrees, measured from the horizontal direction at which the text is displayed. A 90 degree angle means a vertical downward direction.

Gradient Direction

Enumerated type: Horizontal, Vertical, Backward Diagonal, Forward Diagonal

Specifies the gradient application method for a text to be displayed. This property is of significance only if the gradient color is set in the Gradient Color property.

Rotation Height

Number

Specifies the text height in pixels when the rotation angle is applied.

In the case of horizontal texts, the font height is automatically determined on the basis of the object size and the text length.

State Selection Mode

Logical

Specifies the control operation execution mode. The Yes value means that the control value will be determined by choosing from the predefined set of states (the descriptions and values of states are defined in the state properties). The No value means that the user will directly enter the control value.

In any case, setting of the Active property to the True value and specifying the controlled variable name is additionally required.
State Selection by menu Logical This property is meaningful only when the State Selection Mode property is equal to True. It specifies the way of selecting the new controlling state. The value True means selection from the context menu created automatically on the basis of defined object states. The value False means that every time you click on the object, the cyclic switching over to the consecutive state will be occuring.

Edit on Selection

Logical

Specifies whether an object enters the edit mode immediately after it has been chosen (selected), or whether a double clicking of the mouse button will be required.

Initial Edit Value

Enumerated type: Empty, Last, Current

Specifies the initial control value after entering the edit mode for a text. The Last option indicates the value entered during previous edition and the Current option indicates the current content of the text being displayed.

Editor Type

Enumerated type: Text, Data & time, Time span

Specifies the way of entering a new control value. Text value means freely text edition by the user. In other cases, entering the value is done by specialized dialog boxes.

Lines Count

Number

Controls the way of matching the font height with the text length. The value of 0 means that the font should be reduced to the level allowing a whole text to be fit inside the object area. This allows, depending on the text length, to use another type of font. A value greater than 0 means that the font height is determined only by the size of the object. If necessary, the text may be shortened or split into several lines.

Text padding [%]

Logical

Specifies the size of the margin left around the text. The property useful in the case of an opaque background color or the text in the frame.

Immediate Control

Logical

Specifies whether a new control value being entered should be automatically sent to the controlled variable. If not, then in order to execute the control, the use of the SendControls operator action is required.

Control Group

Text

Specifies the group name of the control objects. If the object switches into pending state before control sending (waiting for the SendControls action) all the other objects of the group abort the pending state. The mechanism guarantees that if the operator had any alternative methods of setting the same value (e.g. the Bar and Text objects), then only the last control will be executed.

State Properties

Name

Value Type

Description

Text

Text

Content of the text being displayed. This may be static text or any expression the result of which is a text value. Most viewed texts are created based on the process variable values.

Example:

#

Displays the object main variable value using a default conversion into text.

=Attribute(Description) + ” ” + Variable()

Displays the main variable description linked to its value.

Color

Color

Specifies the text color.

Gradient Color

Color

Specifies the gradient color. The background color will smoothly change from the basic color into the gradient color. The gradient application method is specified by the Gradient Direction property.

Edit Color

Color

Specifies the text color when entering a new value.

Cross out Color

Color

When a different color than the Transparent is defined, a cross out line will be drawn on the text.

The property is used for signalling failed variable readout.

Example:

=VarIsNotGood()?Red:Transparent

Outline Color

Color

Specifies the letter outline color.

Shadow Color

Color

Specifies the letter shadow color.

Background Color

Color

Specifies the text background color.

Edit Background Color

Color

Specifies the text background color when editing a new control value.

Horizontal Align

Enumerated type: Left, Center, Right

Specifies the method for horizontal positioning of the texts inside the object area.

Vertical Align

Enumerated type: Top, Centre, Button

Specifies the method for vertical positioning of the texts inside the object area.

Outline Width

Number

Specifies the letter outline thickness.

Depth of Shadow

Number

A value greater than 0 enables displaying shadow for all letters of the text. The shadow is drawn as shifted down and to the left by the specified number of pixels. This property is of significance only if the shadow color is set in the Shadow Color property.

The shadow is not drawn if the Depth of convexity property has been set.

Depth of Convexity

Number

A value greater than 0 enables the convexity effect (blur) for the text being displayed. The convexity color is a modified basic color.

Convexity direction

Enumerated type:

Top left, Top right, Bottom left, Bottom right

Specifies the direction of convexity effect drawing.

Frame style

Enumerated type: None, Single, Concave, Convex

Specifies how to draw a frame around the text.

Frame color

Color

It has meaning only for the single frame. For three-dimensional frames colors are selected automatically.

Font

Font Name

System name of the font used to display the text.

Font Style

Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout

Determines the used font style. Multiple styles can be used simultaneously.

State Value

Text

The value sent to the controlled variable when the object operates in the state selection mode and the user has selected an item corresponding to this state from the contextual menu.

State BitMask

Number

The modifier of value sent to the controlled variable in the state selection mode. A new value is calculated on the basis of the current process variable value, the State value property and the specified bit mask. The effect of the algorithm execution is as follows:

  • Only those bits of the controlled variable value which have the value of 1 in the mask are changed;

  • the value of the bits changed is compatible with the values of bits in the state value.

When the property is not defined (blank), the bit mask is not used.

Example:

State value = 1

State BitMask = 1

The least significant bit of the controlled variable will be set to 1, the other bits remain unchanged.

Wartość zmiennej = 1

State BitMask = 3

The two least significant bits of the controlled variable will be set to 01, the other bits remain unchanged.

State Selectable

Logical

Specifies whether the state appears in the state selection menu. This property is of significance only when the object operates in the state Selection mode.

For all the states the State Selectable property of which is equal to True, an item is created in the open contextual menu when the user clicks on the object. The text in the menu item results from the current value of the Text property in the state definition corresponding to the item.

Events

See: Visualization Elements > Standard Events of Objects


Tree_List

Home > Objects > Tree List

Tree List Object

Object Functions

The Tree list object is used to visualize data in the form of a hierarchical drop-down list. In its basic application, it is used to create navigation that controls the selection of the displayed diagram.

An operator action can be associated with each node of the list, which is executed when the user clicks in the node area.

The list structure can be specified directly in the object definition. The list structure download mode from an external file is also available. In this case, the file can be created dynamically by external software or script. In this application, the object can be used, for example, to present hierarchical information retrieved from the database describing manufactured products.

Properties

See: Visualization_ Elements > Standard Object Properties

Basic Properties

Name | Value Type | Description
Direct Structure of Elements | Text | Description of the drop-down list structure in text form. The structure is described by XML text, which contains the definitions of the properties of all nodes of the list and their mutual hierarchy. The structure can be edited directly, but the recommended mode is to run the interactive structure editor, which can be opened with the button in the property definition editing panel.
File with Structure of Elements | Text | The name of the file containing the structure description. Using this property is an alternative to direct definition. The content of the file has the same form as the description in the Direct Structure of Elements property. The content of the file can be edited with the help of independent tools, created in a software way or saved in the structure editor window.
Font Size | Number | Specifies the font size used to display node descriptions.
Font | Font name | The system name of the font used to display node descriptions.
Font Style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Specifies the style of font used. You can use multiple styles at the same time.
Visible Rows Count | Number | If the property is 0, the number of row nodes displayed is based on the font size and object size. It changes when the object size changes as a result of the diagram scaling. If the property is greater than 0, the same number of nodes is always displayed - the font size is automatically modified when the object size is changed.
Text Padding [%] | Number | The percentage of the margin left around the text. The property allows you to control the spacing between descriptions of individual nodes.
Show Plus/Minus | logical | Specifies whether the plus / minus icon used to expand and collapse nodes is to be shown.
Show Icons | logical | Specifies whether to display the icons associated with the list nodes.
Full Background of Elements | logical | Specifies how to color the background of node descriptions. Full background means filling the entire line of the line. Otherwise, the background is filled only for the length of the text.
Action on Double Click | logical | Specifies the type of click on the node description that triggers the execution of the action associated with the node.
Collapse / Expand with Double Click | logical | Specifies whether the node expansion requires a single or double click on the node description. It does not matter for expanding by the plus / minus icon, for which a single click is always used.
Keep Selection | logical | Specifies whether the chart should remember the last selected node.

State Properties

Name | Value Type | Description
Background Color | Colour | Specifies the background color of the list area.
Element Font Color | Colour | Specifies the default color for texts describing nodes.
Element Back Color | Colour | Specifies the default background color of texts describing nodes. Background coloring can be turned off by selecting the Transparent color.
Selected Element Font Color | Colour | Specifies the color of the text describing the currently selected node.
Selected Element Back Color | Colour | Specifies the background color of the text describing the currently selected node. Background coloring can be turned off by selecting the Transparent color.
Disabled Element Font Color | Colour | Specifies the color of texts describing inactive nodes.
Disabled Element Back Color | Colour | Specifies the background color of texts describing inactive nodes. Background coloring can be turned off by selecting the Transparent color.
Icon of Elements | Text | Specifies the default icon associated with list nodes.
Background Picture of Elements | Text | Specifies the default image used to fill the background of nodes.

Events

The object does not support standard events. Operator actions performed are defined as part of the properties of individual nodes of the list.

List Structure Editor

The list structure editor is opened through the editing panel of the Direct Structure of Elements properties.

The left side of the window displays a list of defined nodes. The integrated toolbar allows you to create nodes and change their order. You must use the node pulling technique to change the hierarchy of nodes. On the right side of the window there is a panel for defining the value of the property of the selected node on the list.

Name | Value Type | Description
Always Expanded | logical | Specifies whether the node is always expanded.
Text | Text | Specifies the text displayed in the node row.
Description | Text | Specifies an additional node description. It appears in the balloon that opens when you hover over the node area.
Enabled | logical | Specifies whether the node is active.
Icon | Text | Specifies the icon associated with the node.
Background Picture | Text | Specifies the image used to fill the node background.
Text color | Colour | Specifies the individual color of the text describing the node.
Background colour | Colour | Specifies the individual background color of the text describing the node.
Share | Text | Specifies the operator action to be performed when clicking on a node.


16 Variable Table Object

Home > Objects > Variable Table Object

Variable Table Object

Object Functions

The Variable table object is an object that allows displaying in a tabular form any of variable sets defined during editing or automatically loaded based on the selected values of variable attributes (including the use of the '*' and '?' wild cards). Each table cell can contain any expression created on the basis of the variable attributes and its value, fixed text, a hyperlink associated with an action, variable bit values or texts and descriptions of variable states. Each row may contain a defined variable name in the context of which all expressions specifying the cell appearance and content are calculated. The expressions can be defined for columns or individually for each row. In each column, the cell text and background color may be linked to any expression.

In the application run mode, the table allows the user to insert and delete rows corresponding to the selected variables, to replace the variables in the rows and to save the variable set modified this way. In the Auto Fill Mode with variables, it is also possible to force sorting according to the variable names.

The contents of the table can be saved in a text file of CSV format at any time moment. For this purpose, use the action ObjectAction.

Fig. Examples of the Variable Table Object.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name

Value Type

Description

Header font size

Number

Specifies the size of the font used to display the column headers.

Message font size

Number

Specifies the size of the font used to display information in the value rows.

Font

Font Name

System name of the font used to display all texts in the table.

Font Style

Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout

Determines the used font style. Multiple styles can be used simultaneously.

Visible rows count

Number

If the property is equal to 0, the number of rows displayed is determined by the font size and object size. It changes if the object size changes as a result of the diagram scaling. If the property is greater than 0, then the same specified number of rows is always displayed - the font size is automatically modified when the object is resized.

Column headers visible

Logical

Specifies whether the column header line should be displayed.

Selection attribute name

Attribute Name

Specifies the attribute name of variables according to which the variables whose state will be monitored in the table will be selected. The property functions in conjunction with the Selection attribute value property.

In the case of dynamic determining of a set of rows, the rows defined explicitly are ignored.

Selection attribute value

Text

Specifies the template used for dynamic selection of variables monitored in the table. The property functions in conjunction with the Selection attribute name property.

Example

B11_ *

Assuming that the attribute selection name is specified as Name, rows will be created in the table for all the variables whose name starts with B11_.

Sorting attribute name

Attribute Name

If the table row set is created using a dynamic method, the property specifies the attribute name used to sort the rows of selected variables in the table.

Editable

Logical

Specifies whether the user can interactively change the content of the table. The True value makes available the context menu with commands for information management shown in the table, in particular the monitored variables selection.

Sortable

Logical

Specifies whether the user can interactively change the order of rows displayed in the table. Reordering is done by clicking on the column header.

Adjust window size

Logical

Specifies whether a window size is to be adjusted to the table size. This option is useful for the tables for which the number of rows results form the variable definition database content (the number of variables meeting the selection criteria). The Matching Mode is active only when one panel with a diagram with only one object in the form of a variable table is located in the window.

Column Properties

Name

Value Type

Description

Column Visible

Logical

Specifies whether the column is visible. The property allows the use to select the columns in application execution mode.

Column width [%]

Percent

Specifies the percentage width of a column. A value of 0 means that the width of the column is to be adjusted automatically. If only one column width will be 0, it will occupy the whole remaining place, taking into account the width of other columns.

Column header

Text

Specifies the text of a column header.

Horizontal Text Align

Enumerated type: Left, Centre, Right

Specifies the text aligning method in the cells of value rows.

Display value

Text

Specifies the text which is to be displayed in the row cell. A property used when the text calculating method is uniform for all the rows in the table. The expression used in the property is calculated individually for each row - the contextual variable is the variable defined in the Variable name property of a row.

Example:

#

Displaying the row variable value.

= Attribute (Description)

Displaying the row variable description.

Value source

Enumerated type:

Column value, Row value, Row description

Specifies the method of obtaining the text displayed in the row cell:

  • Column value- text loaded from the Display value property of a column.

  • Row value- text loaded from the Display value property of a row. If not defined, then loaded from the Display value property of a column.

  • Row description- text loaded from the Description property of a row. If not defined, then from the Display value property of a column.

Font color

Color

Specifies the color of the texts displayed in the cells of value rows. If the property is not set, then the Font color state property value of the rows is valid.

Example

VarIsGood() ? Green : Red

The font color is specified on the basis of the row variable state (defined in the Variable name property of a row).

Background color

Color

Specifies the background color of the cells of value rows. If the property is not set, then the Row background color state property value is valid.

Underline Hiperlink

Logical

Specifies whether to display the contents of the cell in hyperlink mode (with emphasis). The property has meaning only if the property Action of the column has been defined.

Action

Operator action

The Operator Action content associated with the cell of a value row. If the value of the property is defined, then clicking on the text displayed will execute the Action. The Action is performed in the context of a specific row, i.e. the row variable can be referenced in the Action content.

Example

SetVariable(””,1)

The variable row (as defined in the Variable name property of the row) will be set to the value of 1.

Row Properties

Name

Value Type

Description

Variable name

Variable name

Row main variable name. All the expressions and actions used in the row properties or inherited from a column settings are executed in the context of this variable.

Display value

Text

Specifies the text which will be displayed in a cell row if the Value source property of a column is equal to the Row value. The property should be used when the column text calculating method is not consistent for all the table rows.

Example

=(Variable() &1)?Yes:No

In the row being defined, the text associated with the least significant bit of the row variable will be displayed - in the column in which the Value source property is equal to the Row value property.

In the other rows, the expressions that e.g. test states of the other bits may be used.

Description

Text

Specifies the text which will be displayed in a cell row if the Value source property of a column is equal to the Row description. The property should be used when the column text calculating method is not consistent for all the table rows. The Description and Display value properties of row allow defining two individually calculated columns.

Example

Status bit

In the row being defined, the Status bit text will be displayed - in the column in which the Value source property is equal to the Row description.

State Properties

Name | Value Type | Description
Background Color | Color | Specifies the table background color - used when the value rows do not occupy the entire area of the table.
Grid Color | Color | Specifies the color of the grid lines separating the table fields and rows.
Header forn color | Color | Specifies the color of the header text.
Header back color | Color | Specifies the background color of column header line.
Rows font color | Color | Specifies the color of the texts displayed in the cells of value rows. It is of significance only for those columns the Font color property of which is not set.
Rows background color | Color | Specifies the odd cells background color of the value rows. It is of significance only for those columns the Background color property of which is not set.
Alternating rows background color | Logical | Specifies the even cells background color of the value rows. It is of significance only for those columns the Background color property of which is not set.


Vector Image Controller

Object Functions

The Vector Image Controller object is an object that allows you to control the appearance of the image placed on the diagram. It can be the image defined as the diagram background or image displayed by the Picture object. The controlled picture must be of SVG vector type.

The connection between the controller and the image is realized by indication of the Picture name or diagram name and specification of the name of the element within a controlled image.

You can control the the following attributes of the image element: visibility, color, text (text elements).

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Picture Object Name | Text | Specifies the picture to be controlled by the object. It may be the name of any named object of Picture type, placed on the same diagram, or the name of diagram. The diagram name (or no name) means control of the picture of the diagram background.
Picture Element Id | Text | Specifies the picture element (defined by the Picture Object Name property) to be modified by the controller.

State Properties

Name | Value Type | Description
Element widoczny | Logical | Specifies whether the controlled picture element is to be visible.
Kolor | Color | Specifies the color of the controlled picture element.
Kolor otoczki | Color | Specifies the outline color for the controlled image element.
Tekst | Text | Sets the text of the controlled element. The element has to be of text type.


10 Web Browser Object

Home > Objects > Web Browser Object

Web Browser Object

Object Functions

A Web Browser object is a universal object used to display the content of the selected web page or any document supported by the IE browser (such as PDF, certain Office documents, films, etc.) on the diagram. One of the applications of this object may be displaying pictures from web or industrial cameras if the source of the picture is available as a service or HTML page. The object also allows displaying of the contents specified directly in the object definition.

Fig. Examples of the Web Browser Object.

The Web Browser object is a control type object.

NOTE:

When the application is running in the browser mode, then the object of Web Browser type used in the application will be functional only when used on a diagram which will be opened beyond the main window of the browser inside an independent window of the Asix.Evo application (not opened in the browser).

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Navigation Enabled | Logical | Specifies whether the user can change the page by using the links present on the page currently displayed.
Scrollbars enabled Enabled | Logical | Specifies whether the browser object will show slides.

State Properties

Name | Value Type | Description
Url | Text | HTML page URL or path to a local file in a format supported by the IE browser. Example: http://www.asix.com.pl – HTML page address c:\manuals\m1.pdf – path to the pdf file saved in the local directory
Content | Text | It allows defining the content to be displayed directly in the object definition. The property value may be calculated by an expression or may be set by a script using the SetProperty action. The Content property takes precedence over the Url property. Example: <b>some text</b> – displaying text in bold fonts


1 Work Point Object

Home > Objects > Work Point Object

Work Point Object

Object Functions

The Work Point object is used to visualize the position of 'work point', computed as a function of two values of X and Y coordinates. The position of Work Point can be displayed on the image background being the part of the object or on the background of other objects. The value calibration can be displayed within the object.

The position of Work Point can be displayed with the use of one of predefined coursors or any image. Drawing the trail of work point position last changes is also possible.

Fig. Examples of Work Point.

Properties

See: Visualization Elements > Standard Properties of Objects

Basic Properties

Name | Value Type | Description
Value X | Number | The value of work point X coordinate. The position on the screen is calculated taking into account the properties: Minimum X Value and Maximum X Value. If the calibrations are displayed, the work point is shifted on all area of the object. Otherwise, the area occupied by the calibration is omitted.
Minimum X Value | Number | The value corresponding to the extreme left position of the work point.
Maximum X Value | Number | The value corresponding to the extreme right position of the work point.
Value Y | Number | The value of work point Y coordinate. The position on the screen is calculated taking into account the properties: Minimum X Value and Maximum X Value.
Minimum Y Value | Number | The value corresponding to the extreme bottom position of the work point.
Maximum Y Value | Number | The value corresponding to the extreme upper position of the work point.
Pointer style | Enumerated type: None, Cross, X, Round, Picture | Specifies the pointer display method. The pointer is used to present the current position of the work point. The Picture value means using any image declared in the Pointer picture property.
Pointer size [%] | Number | Specifies what percentage of the object work area the pointer occupies. The value of 0 means using the pointer of fixed size - that is unchanged when you resize the object.
Trail points count | Number | Specifies the number of points of the trail of work point position changes.
Line Width | Number | Specifies the thickness of the trail line of the work point position changes.
Allow clearing points | Logical | Specifies whether the clicking in the area of the object will be clearing the trail of work point position changes during the object operation.
Show X calibration | Logical | Specifies whether the horizontal calibration of the working area is drawn.
Show Y calibration | Logical | Specifies whether the vertical calibration of the working area is drawn.
Font | Font Name | The system name of the font used to display the value of the work point calibration divisions.
Font style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Determines the used font style. Multiple styles can be used simultaneously.
Divisions Count X | Number | Specifies the number of major divisions on the horizontal calibration of the working area.
Subdivisions Count X | Number | Specifies the number of minor divisions between each pair of major divisions on the horizontal calibration.
Divisions Count Y | Number | Specifies the number of major divisions on the vertical calibration of the working area.
Subdivisions Count Y | Number | Specifies the number of minor divisions between each pair of major divisions on the vertical calibration.

State Properties

Name | Value Type | Description
Pointer Color | Color | Specifies the color of the work point current position pointer.
Pointer picture | Picture name | Specifies the name of picture used as the work point current position pointer. The picture must be contained in the application picture library.
Trail color | Color | Specifies the color of the trail line of the work point position changes.
Background color | Color | Specifies the object background color (the area occupied by the calibration).
Background picture | Picture name | Specifies the name of the picture that appears as the object background. The picture must be contained in the application picture library.
Canvas color | Color | Specifies the color of the object working area. If the pointer is displayed on the other object background, the Transparent color should be selected.
Calibration color | Color | Specifies the calibration color.

Events

See: Visualization Elements > Standard Events of Objects


Welcome

Home > External Objects

>> Help for Asix

www.asix.com.pl

Asix.Evo - External Objects


1 Implementation of Custom Made Objects into the Asix.Evo

Home > External Objects > 1 Implementation of Custom Made Objects into the Asix Evo Application

1 Implementation of Custom Made Objects into the Asix.Evo Application

External objects for the Asix.Evo application should be provided in the form of compiled .NET libraries in the form of (.dll) files. These libraries and all other libraries and resources associated with them should be placed in the Addons directory which is a subdirectory of the Asix.Evo application. New or modified objects and libraries will be visible after restarting both the Asix.Evo program and the application. The name of the objects library dedicated for Asix.Evo must be preceded by an "EvoObject." prefix, e.g.: EvoObject.SQLTables.dll .

NOTE:

Since external objects are provided in the form of .NET libraries, they can contain any code, especially a dangerous or unstable one. Controls should be coded as free of resource-intensive operations which may hang-up the main running thread (synchronous pending calls), cause memory leaks and other unwanted effects. ASKOM can not be held responsible for incorrect or unstable operation of Asix.Evo addons delivered by the users.


2.1 Programming Language

It is recommended to use Microsoft development tools for creating custom controls: Visual Studio (2008 or later) or free Visual C # Express, compatible with the .NET Framework 3.5.


2.2 The Base Class of Control

  /// <summary>

/// Base class for Asix.Evo diagram external objects

/// / Klasa bazowa dla zewnętrznych obiektów diagramowych

/// </summary>

   public partial class EvoObjectBase : UserControl, AsixEvoAddon

   {

     /// <summary>

/// Override to return unique EvoObject ID. The proper ID is required.

/// / Należy przeciążyć, aby zwracać identyfikator obiektu. Wymagane!

/// </summary>

public virtual string EvoObjectID { get { return null; } }

/// <summary>

/// Override to return Evo object description

/// / Można prtzeciążyć, aby zwracać nazwę (krótki opis) obiektu

/// </summary>

public virtual string EvoObjectDescription { get { return null; } }

/// <summary>

/// Override to initialize or reset control (e.g. register variable events)

/// / Można przeciążyć, aby dokonać inicjalizacji lub reinicjalizacji kontrolki

/// (n.p. rejestrowanie zdarzeń zmiennych)

/// </summary>

public virtual void Reset() { }

/// <summary>

/// Override to cleanup when control is inactive/hidden etc. (e.g. unregister variable events)

/// / Można przeciążyć, aby posprzątać (n.p. wyrejestrowanie zdarzeń zemiennych)

/// </summary>

public virtual void Disconnect() { }

/// <summary>

/// Override and return true to enable transparency for object in control mode

/// / Można przeciążyć i zwrócić true, aby włączyć obsługę przeźroczystości dla

/// obiektu kontrolkowego

/// </summary>

public virtual bool EvoObjectUsesTransparency { get { return false; } }

/// <summary>

/// Override and return true to determine if object is in OwnerDraw mode (vector, not control)

/// / Należy przeciażyć i zwrócić true, aby określić że obiekt

/// jest w trybie OwnerDraw (wektorowy, nie kontrolkowy)

/// </summary>

public virtual bool OwnerDraw { get { return false; } }

/// <summary>

/// Overide to draw object if object is in OwnerDraw mode

/// / Należy przeciażyć, aby malować obiekt, gdy jest on w trybie OwnerDraw

/// (wektorowy, nie kontrolkowy)

/// </summary>

/// <param name="aGraphics">GDI + interface / Interfejs GDI+</param>

/// <param name="aArea">Object bounds / Połozenie i rozmiary obiektu</param>

public virtual void Paint(Graphics aGraphics, Rectangle aArea) { }

/// <summary>

/// Overide to handle mouse click events

/// / Można przeciążyć, aby obsłużyć zdarzenia kliknięcia myszy

/// </summary>

/// <param name="e">Mouse events data / Szczegóły zdarzenia myszy</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseClick(MouseEventArgs e, Rectangle aArea) { }

/// <summary>

/// Overide to handle object focused events

/// / Można przeciążyć, aby obsłużyć zdarzenia aktywacji obiektu

/// </summary>

public virtual void PerformFocus() { }

/// <summary>

/// Overide to handle object focus lost events

/// / Można przeciążyć, aby obsłuyżyć zdarzenia dezaktywacji obiektu

/// </summary>

public virtual void PerformFocusLost() { }

/// <summary>

/// Overide to handle mouse double click events

/// / Można przeciążyć, aby obsłużyć zdarzenia podwójnego klikniecia myszy

/// </summary>

/// <param name="e">Mouse events data / Szczegóły zdarzenia myszy</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseDoubleClick(MouseEventArgs e, Rectangle aArea) { }

/// <summary>

/// Overide to handle mouse down events

/// / Można przeciążyć, aby obsłużyć zdarzenia wciśnięcia klawisza myszy

/// </summary>

/// <param name="e">Mouse events data / Szczegóły zdarzenia myszy</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseDown(MouseEventArgs e, Rectangle aArea) { }

/// <summary>

/// Overide to handle mouse up events

/// / Można przeciążyc aby obsłuyżyć zdarzenia puszczenia myszy

/// </summary>

/// <param name="e">Mouse events data / Szczegóły zdarzenia myszy</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseUp(MouseEventArgs e, Rectangle aArea) { }

/// <summary>

/// Override to handle mouse move events

/// / Można przeciążyć, aby obsłużyć zdarzenia ruchu myszy

/// </summary>

/// <param name="aPoint">Cursor location on object/ Położenie kursora nad obiektam</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseMove(System.Drawing.Point aPoint, Rectangle aArea) { }

/// <summary>

/// Override to handle mouse enter events

/// / Można przeciążyć, aby obsłużyć zdarzenia najechania kursora myszy na obiekt

/// </summary>

public virtual void PerformMouseEnter() { }

/// <summary>

/// Override to handle mouse leave events

/// / Można przeciążyć, aby obsłużyć zdarzenia opuszczenia przez kursor obszaru obiektu

/// </summary>

public virtual void PerformMouseLeave() { }

/// <summary>

/// Override to handle mouse hold events

/// / Można przeciążyć, aby obsłużyć zdarzenia przytrzymania myszy nad obiektem

/// </summary>

/// <param name="e">Mouse events data / Szczegóły zdarzenia myszy</param>

/// <param name="aArea">Current object area / Bieżący obszar obiektu</param>

public virtual void PerformMouseHold(MouseEventArgs e, Rectangle aArea) { }

/// <summary>

/// Override to handle key down events

/// / Można przeciążyć, aby obsłuyżyć zdarzenia wciśnięcia klawisza

/// </summary>

/// <param name="e">Key events data / Szczegóły zdarzenia klawisza</param>

public virtual void PerformKeyDown(KeyEventArgs e) { }

/// <summary>

/// Override to handle key up events

/// / Można przeciążyć, aby obsłużyć zdarzenia puszczenia klawisza

/// </summary>

/// <param name="e">Key events data / Szczegóły zdarzenia klawisza</param>

public virtual void PerformKeyUp(KeyEventArgs e) { }

/// <summary>

/// Override to handle key pressed events

/// / Można przeciążyć, aby obsłużyć zdarzenia wciśniecia klawisza znaku

/// </summary>

/// <param name="e">Key events data / Szczegóły zdarzenia klawisza</param>

public virtual void PerformKeyPressed(KeyPressEventArgs e) { }

   }


2.3 Creating a Class of Control

It is recommended to include classes of object controls for Asix.Evo in the library created as a project of Class Library type. This class must be a public class, derived from the class Askom.AddonManager.EvoObjectBase whose definition is included in the AsixEvoAddonManager.dll library. A reference to the AsixEvoAddonManager.dll library should be added to the project. The AsixEvoAddonManager.dll file is stored in the installation directory of the Asix.Evo program.

The most preferred method to create the control is using the Add New Item->Windows Forms->Inherited User Control wizard in the project, and in this wizard selecting (Browse...) of the AsixEvoAddonManager.dll file and then the EvoObjectBase component from the list.

The EvoObjectID property in the control class (the derived class of Askom.AddonManager.EvoObjectBase) must be obligatorily overridden so as to return a unique text identifier of the object. The objects which do not return this ID and return blank or previously used ID will not be visible in the application.

Optionally, it is also possible to override the Evo ObjectDescription property, to force it to return short descriptive name of the object, which will be displayed in the toolbox and will be used as the object type name displayed on the diagrams. If the name is not defined, the ID from EvoObjectID will be used.

The object may operate in the control or vector mode. The object operating in the control mode is a .NET control on which other standard or custom .NET controls may be put. In the vector mode, the object is not control but is drawn using GDI+ for .NET interface and this object handles relevant events by overriding corresponding virtual methods. By default, the object is working in the control mode. For the object to work in a vector mode, the OwnerDraw property needs to be overridden in order to return the true value.

If any initialization or cleaning operations are to be performed on the object when this object is being connected to the diagram (e.g.: when the diagram is being opened), the Reset method should be overridden().

Cleaning and releasing the resources while closing and releasing the control can be performed either by connecting to the Disposed event, accessible in the base class or by overriding the Dispose method.


2.4 Defining Custom Properties of Object

The properties of the object, which are to be accessible for Asix.Evo application, need to be declared in the control class as ordinary public properties with mandatory set accessors or optional get accessors. The get accessors may be used to collect default values for the properties of Evo objects.

Any property of the component to be visible in the Evo application must be marked with the following attribute Askom.AddonManager.EvoObjectProperty. In the attribute a short text description of the properties can be optionally defined by the Description parameter. Otherwise, the description will remain the same as the property name. By default, this property will be located in the group of basic properties of the Evo application object. If the property is to be located in the state group, the optional parameter PropertyGroup should be used for the attribute and its value should be Askom.AddonManager.EvoObjectPropertyGroup.StateGroup. The properties can also be located in their own groups. To do this, the optional parameter PropertyGroup should be used for the attribute and its value should be Askom.AddonManager.EvoObjectPropertyGroup.CustomGroup, and the CustomGroupName parameter should be used to specify the name of their own group. Several properties using the same group name will be located in this group altogether.

To indicate the value editor to be used in the property editor the Askom.AddonManager.EditorType attribute parameter is used. If this parameter is not used or set to Default value, a simple property editor will be determined on the basis of the property type.

Tab. Property Editor for Property Type.

Property Editor | Type recommended
Default | string
Text | int
Logical | int
Color | int
Cursor | Int
Integer | Int
Double | bool
Variable | bool
FontName | int
FontStyle | int
PictureName | string
Shortcut | string
Attribute | string


2.5 Access to Object Standard Properties

Access to object standard properties (such as: Main Variable, Active etc.) is achieved by declaring, in the control class, public properties of any name with mandatory set accessors and marking them with the Askom.AddonManager.EvoObjectStandardProperty attribute. The mandatory EvoObjectStandardProperty attribute parameter is the name of a standard property (Askom.AddonManager.EvoObjectStandardPropertyName enumeration type). For each available standard property, a correct property type should be used.

Tab. Property Type for Standard Property.

Property Name | Type Required | Description
Name | String | Object Name
X | int | X coordinate (the relative value for the diagram, from 0 to 1 000 000)
Y | int | X coordinate (the relative value for the diagram, from 0 to 1 000 000)
Width | int | Width (the relative value for the diagram, from 0 to 1 000 000)
Height | Int | X height (the relative value for the diagram, from 0 to 1 000 000)
Z | Int | Layer
Active | bool | Informs whether the object is active
Visible | bool | Informs whether the object is visible
MinVisibleWidth | int | The minimum visibility width (in pixels)
MinVisibleHeight | int | The minimum visibility height (in pixels)
MainVar | string | The name of the object main variable
ControlVar | string | The name of the object controlled variable
Hint | string | Hint text
CursorType | string | Cursor type name

From the perspective of the external control, the standard properties are of read-only type. Setting their values with the use of the control has no effect on the application working.


2.6 Defining Custom Events of Object

To make the specific events of the object visible in the Asix.Evo application, they need to be defined as public events of the Askom.AddonManager.EvoObjectEventHandler type in the control class and marked with the Askom.AddonManager.EvoObjectEvent attribute. A short description may be optionally defined by the Description parameter in this attribute - similarly as for custom properties.


2.7 Using Transparency in Control Class Objects

For an external object to support transparency (no background) in the control mode, the EvoObjectUsesTransprancy property needs to be overridden in the control class (the derived class of Askom.AddonManager.EvoObjectBase) in such a way that it always returns the true value. Additionally, to prevent the control from filling the background, it is necessary to override the CreateParams system property, as shown below:

     protected override CreateParams CreateParams

      {

         get

         {

            const int WS_EX_TRANSPARENT = 0x20;

            CreateParams cp = base.CreateParams;

            cp.ExStyle |= WS_EX_TRANSPARENT;

            return cp;

         }

      }


2.8 Loading the Variable States and Values

To load the current variable value, the following function should be used:

VariableState GetVariableState(string aVarName);

aVarName - the variable name

This feature is available directly in the base class of the control and the AsixEvo.Application class. If the variable exists - the function returns the variable state descriptor object. The descriptor contains information on current value ​​(raw, simple and formatted), variable time and OPC status. When the variable of a given name does not exist, the function returns null. The function does not guarantee that the retrieved state will correspond to the actual current value if the variable has not been previously registered for continuous monitoring (refreshing).


2.9 Loading the Variable Attribute Values

To load the attribute values of the variable, use the following function:

object GetVariableAttribute(string aVarName, string aAttributeName);

aVarName - the variable name

aAttributeName - the attribute name

This feature is available directly in the base class of the control and the AsixEvo.Application class. If the variable and attribute exist, the function returns the attribute value of the variable - otherwise it returns null.


2.10 Variable Control

To control the variables, the AsixEvo.Application.SetVariableValue (...) function should be used. Two versions of the function are available:

bool SetVariableValue(string aVarName, object aValue, bool aVerifyPrivileges);

bool SetVariableValue(string aVarName, object aValue, uint aStatus, bool aVerifyPrivileges);

aVarName - the variable name

aValue - the new value

aStatus - OPC status

aVarifyPrivileges - specifies whether to check the control authority or not. In case of the control involving checking the permissions, the lack of such permissions results in a window being displayed allowing to login temporarily (for the time of control) on an authorized user account.

The version of the function without the aStatus parameter sets the OPC status as good, by default.

The functions are also available directly in the base class of the control.


2.11 Registering and Unregistering Events of Variable State

Home > External Objects > 2 Creating Object Controls > 2.11 Registering and Unregistering Events of Variable State Changes

2.11 Registering and Unregistering Events of Variable State Changes

To register the events of variable state change, the following function should be used:

bool RegisterVariable(string aVarName);

aVarName - the variable name

This function is available in the base class of the control. If the variable exists and has managed to connect in order to register its events, the function returns the true value.

To capture the events of registered variable state changes in the control, the function of free name but being in accordance with the following scheme should be defined in the class:

void VarRefreshTest_VariableStateChangedEvent(string aVariableName, VariableState aVariableState)

{

}

Then the events should be connected to the control in the constructor using the VariableStateChangedEvent event located in the base class of the control:

VariableStateChangedEvent += VarRefreshTest_VariableStateChangedEvent;

The function defined that way will capture the following events for all registered variables: value changes, state changes or time changes. The first argument of the aVariableName function indicates the variable that has been changed. The second argument provides the variable state descriptor.

To terminate capturing of the events for the selected variable, the following function should be used:

void UnregisterVariable(string aVarName);

aVarName - the variable name

This function is available in the base class of the control.

To terminate capturing of the events for all registered variables, the following function should be used:

void UnregisterAllRegisteredVariables();

This function is available in the base class of the control.


2.12 Access to the Multilingual Texts of the Application

To load the current language texts, the following function should be used:

string Askom.AddonManager.AsixEvo.Application.GetApplicationText(string aTextId);

The numerical code of the current language of the application can be loaded by the property:

int Askom.AddonManager.AsixEvo.Application.CurrentApplicationLanguageCode

To capture the events of application language change, the following function should be used:

event EventHandler Askom.AddonManager.AsixEvo.Application.CurrentApplicationLanguageChanged;


2.13 Access to the Application Images

To load images from the application image set, the following function should be used:

Image EventHandler Askom.AddonManager.AsixEvo.Application.GetImage(string aImageName)


2.14 Handling Events in Vector Mode

For the object to work in a vector mode, the OwnerDraw property needs to be overridden in order to return the true value.

The basic method to be overridden and handled when the object works in the vector mode is:

public virtual void Paint(Graphics aGraphics, Rectangle aArea) { }

The function allows to fill the object contents, by the Graphics class object, which in .NET technology is equivalent to GDI+. The current dimensions of the object available in the aArea parameter need always to be taken into account so that the object looks properly regardless of its scale or location.

Other virtual methods available in the base class (listed and described in the chapter 2.2 The Base Class of Control) may be overridden and used to handle interactive events, such as: mouse clicks, key presses etc.


2.15 Example 1 - Defining the Properties and Events

Example custom object class definition for Asix Evo can be found below. The object consists of two buttons arranged vertically, two text edit boxes, check boxes and labels. The first button of fixed height is located at the top. Pressing of this button executes the action determined by the creator of the diagram. The second button is located in the central part and controls the variables. The first edit box is used for entering the variable name, the default value is loaded from the Controlled variable standard property of the object. The second button allows to enter variable values. The check box determines whether the control process involves checking the permissions. The control has its custom defined properties and events (visible in the Asix.Evo application) as well as references to standard properties. In addition, the control loads specific application strings form the application (if these exist) and responds to changes of the current language.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Drawing;

using Askom.AddonManager;

namespace TestowaKontrolkaEvo

{

   /// <summary>

        / / / Example control class of an object for Asix.Evo.

  /// </summary>

   public class SampleEvoControl : Askom.AddonManager.EvoObjectBase

   {

      private System.Windows.Forms.Button button1;

      private System.Windows.Forms.Button button2;

      private System.Windows.Forms.TextBox textBox1;

      private System.Windows.Forms.TextBox textBox2;

      private System.Windows.Forms.CheckBox checkBox1;

      private System.Windows.Forms.Label label1;

      private System.Windows.Forms.Label label2;

      public SampleEvoControl()

      {

         // Inicjalization...

         SuspendLayout();

        / / Button 1

        button1 = new System.Windows.Forms.Button();

         button1.Dock = System.Windows.Forms.DockStyle.Top;

         button1.Name = "button1";

         button1.Text = "Rób coś";

         button1.UseVisualStyleBackColor = true;

         button1.Click += button1_Click;

         Controls.Add(button1);

        / / Button 2

        button2 = new System.Windows.Forms.Button();

         button2.Dock = System.Windows.Forms.DockStyle.Fill;

         button2.Name = "button2";

         button2.Text = "Steruj";

         button2.Click += button2_Click;

         Controls.Add(button2);

        / / Label 1

        label1 = new System.Windows.Forms.Label();

         label1.Dock = System.Windows.Forms.DockStyle.Bottom;

         label1.Name = "label1";

         label1.Text = "Zmienna:";

         Controls.Add(label1);

        / / Text Box 1

        textBox1 = new System.Windows.Forms.TextBox();

         textBox1.Dock = System.Windows.Forms.DockStyle.Bottom;

         textBox1.Name = "textbox1";

         Controls.Add(textBox1);

        / / Label 2

        label2 = new System.Windows.Forms.Label();

         label2.Dock = System.Windows.Forms.DockStyle.Bottom;

         label2.Name = "label2";

         label2.Text = "Wartość:";

         Controls.Add(label2);

        / / Text Box 2

        textBox2 = new System.Windows.Forms.TextBox();

         textBox2.Dock = System.Windows.Forms.DockStyle.Bottom;

         textBox2.Name = "textbox2";

         Controls.Add(textBox2);

        / / Check Box

        checkBox1 = new System.Windows.Forms.CheckBox();

         checkBox1.Dock = System.Windows.Forms.DockStyle.Bottom;

         checkBox1.Name = "checkBox1";

         checkBox1.Text = "Uprawnienia";

         checkBox1.Checked = true;

         Controls.Add(checkBox1);

         Name = "SampleEvoControl";

         ResumeLayout(false);

         if (AsixEvo.Application != null)

         {

        / / Updating the descriptions based on the application strings

        UpdateTexts();

            AsixEvo.Application.CurrentApplicationLanguageChanged += Application_CurrentApplicationLanguageChanged;

         }

      }

      public override string EvoObjectID

      {

         get

         {

            return "SampleEvoControl"; // Unique object ID

        }

      }

      public override string EvoObjectDescription

      {

         get

         {

            return "Kontrolka z przyciskami"; // Object brief description

         }

      }

      public override void Reset()

      {

        / / Object reinitialisation

  base.Reset();

      }

      /// <summary>

        /// Capturing the event of a language change

         /// </summary>

      void Application_CurrentApplicationLanguageChanged(object sender, EventArgs e)

      {

         UpdateTexts();

      }

       /// <summary>

        /// Updating the element descriptions based on the application strings

         /// </summary>

      void UpdateTexts()

      {

         if (AsixEvo.Application != null)

         {

            string txt = AsixEvo.Application.GetApplicationText("action");

            if (!string.IsNullOrEmpty(txt))

               button1.Text = txt;

            txt = AsixEvo.Application.GetApplicationText("control");

            if (!string.IsNullOrEmpty(txt))

               button2.Text = txt;

             txt = AsixEvo.Application.GetApplicationText("var");

            if (!string.IsNullOrEmpty(txt))

               label1.Text = txt;

            txt = AsixEvo.Application.GetApplicationText("val");

            if (!string.IsNullOrEmpty(txt))

               label2.Text = txt;

             txt = AsixEvo.Application.GetApplicationText("priv");

            if (!string.IsNullOrEmpty(txt))

               checkBox1.Text = txt;

         }

      }

      /// <summary>

        /// Text property on the first button. Primary group. Visible as 'Text 1' in the application.

         /// </summary>

      [Askom.AddonManager.EvoObjectProperty]

      public string Text1

      {

         get { return button1.Text; }

         set { button1.Text = value; }

      }

      /// <summary>

        /// Text property on the second button. Custom group named "Group1". Visible as 'Text 2' in the application.

         /// </summary>

      [Askom.AddonManager.EvoObjectProperty(Description = "Napis 2",

         PropertyGroup = Askom.AddonManager.EvoObjectPropertyGroup.CustomGroup, CustomGroupName="Grupa1")]

      public string Text2

      {

         get { return button2.Text; }

         set { button2.Text = value; }

      }

      /// <summary>

        /// Background colour property of the first button. State group. Visible as 'Colour 1' in the application.

          /// </summary>

      [Askom.AddonManager.EvoObjectProperty(Description = "Kolor 1", PropertyGroup = Askom.AddonManager.EvoObjectPropertyGroup.StateGroup)]

      public Color Color1

      {

         get { return button1.BackColor; }

         set { button1.BackColor = value; }

      }

      /// <summary>

        /// The background colour property of the second button. State group. Visible as 'Colour 2' in the application.

         /// </summary>

      [Askom.AddonManager.EvoObjectProperty(Description = "Kolor 2", PropertyGroup = Askom.AddonManager.EvoObjectPropertyGroup.StateGroup)]

      public Color Color2

      {

         get { return button2.BackColor; }

         set { button2.BackColor = value; }

      }

      /// <summary>

        /// Access to 'Main variable' standard property - the value displayed in the edit box

          /// </summary>

      [Askom.AddonManager.EvoObjectStandardProperty(Askom.AddonManager.EvoObjectStandardPropertyName.MainVar)]

      public string MainVariable

      {

         set;

         get;

      }

      /// <summary>

        /// Access to the 'Controlled variable' standard property - associating the property with the textBox1

   /// </summary>

      [Askom.AddonManager.EvoObjectStandardProperty(Askom.AddonManager.EvoObjectStandardPropertyName.ControlVar)]

      public string ControlVariable

      {

         get { return textBox1.Text; }

         set { textBox1.Text = value; }

      }

       /// <summary>

        /// First button click on event. Group of events. Visible as 'Press 1' in the application.

         /// </summary>

      [Askom.AddonManager.EvoObjectEvent(Description = "Wciśnięcie 1")]

      public event Askom.AddonManager.EvoObjectEventHandler click1;

      /// <summary>

        /// The first button pressed

          /// </summary>

      private void button1_Click(object sender, EventArgs e)

      {

        // If some functions are registered, the event is called

          if (click1 != null)

            click1();

      }

      /// <summary>

        /// The second button pressed

         /// </summary>

      private void button2_Click(object sender, EventArgs e)

      {

         // Sending the variable control

         if(AsixEvo.Application != null)

            AsixEvo.Application.SetVariableValue(ControlVariable, textBox2.Text, checkBox1.Checked);

      }

       protected override void Dispose(bool disposing)

      {

        / / Cleaning up ...

          if (disposing)

         {

            if (AsixEvo.Application != null)

            {

               AsixEvo.Application.CurrentApplicationLanguageChanged -= Application_CurrentApplicationLanguageChanged;

            }

            button1.Click -= button1_Click;

            button2.Click -= button2_Click;

         }

         base.Dispose(disposing);

      }

   }

}


2.16. Example 2

Home > External Objects > 2 Creating Object Controls > 2.16 Example 2 - Working with Variables

2.16 Example 2 - Working with Variables

The code below presents the definition of the Asix.Evo object. It uses direct access to the variables, their status, values and attributes. The object consists of three buttons. The text of the first button shows the current values of the 'Counter' system variable. The text of the second button shows the current values of the variable whose name was given as the Other variable property value of the object. Additionally, this value is preceded by a text loaded from the 'Description' attribute of this variable. The text of the third button shows the current values of the object main variable.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Drawing;

using Askom.AddonManager;

namespace TestowaKontrolkaEvo

{

/// <summary>

/// Example control class of object for Asix Evo which directly uses the variables.

/// </summary>

public class VarRefreshTest : Askom.AddonManager.EvoObjectBase

{

private System.Windows.Forms.Button button1;

private System.Windows.Forms.Button button2;

private System.Windows.Forms.Button button3;

public VarRefreshTest()

{

/ / Initialisation ...

SuspendLayout();

/ / Button 1

button1 = new System.Windows.Forms.Button();

button1.Dock = System.Windows.Forms.DockStyle.Top;

button1.Name = "button1";

button1.Text = "";

Controls.Add(button1);

/ / Button 2

button2 = new System.Windows.Forms.Button();

button2.Dock = System.Windows.Forms.DockStyle.Fill;

button2.Name = "button2";

button2.Text = "";

Controls.Add(button2);

/ / Button 3

button3 = new System.Windows.Forms.Button();

button3.Dock = System.Windows.Forms.DockStyle.Bottom;

button3.Name = "button3";

button3.Text = "";

Controls.Add(button3);

Name = "Refresh";

ResumeLayout(false);

VariableStateChangedEvent += VarRefreshTest_VariableStateChangedEvent;

}

public override string EvoObjectID

{

get

{

return "Refresh"; // The unique object ID

}

}

public override string EvoObjectDescription

{

get

{

return "Listening to variables"; // Object brief description

}

}

string mDefaultVarName = "Counter"; / / Counter is a system variable so it is always there.

public override void Reset()

{

VariableState vs = GetVariableState(mDefaultVarName);

if (vs != null)

{

RegisterVariable(mDefaultVarName);// Registering the built-in variable

button1.Text = vs.FormattedValue; // Setting the current value

}

base.Reset();

}

public override void Disconnect()

{

UnregisterVariable(mDefaultVarName); // Unregistering the built-in variable

base.Disconnect();

}

string mMainVarName = null;

/// <summary>

/// Access to 'Main variable' standard property - the value displayed in the edit box

/// </summary>

[Askom.AddonManager.EvoObjectStandardProperty(Askom.AddonManager.EvoObjectStandardPropertyName.MainVar)]

public string MainVariable

{

set

{

UnregisterVariable(mMainVarName); // Unregistering the previous variable

mMainVarName = value;

VariableState vs = GetVariableState(mMainVarName);

if (vs != null)

{

RegisterVariable(mMainVarName); // Registering the new variable

button3.Text = vs.FormattedValue; // Setting the current value

}

}

}

string mSecondVarName = null;

string mSecondVarDescription = string.Empty;

/ / / / <summary>

/// Text property on the second button.

/// </summary>

[Askom.AddonManager.EvoObjectProperty(Description = "Other variable", EditorType = EditorType.Variable)]

public string Var2

{

set

{

UnregisterVariable(mSecondVarName); // Unregistering the previous variable

mSecondVarName = value;

VariableState vs = GetVariableState(mSecondVarName);

if (vs != null)

{

object tob = GetVariableAttribute(mSecondVarName, "Description");

if (tob != null)

mSecondVarDescription = tob.ToString();

RegisterVariable(mSecondVarName); // Registering the new variable

button2.Text = mSecondVarDescription + " : " + vs.FormattedValue; // Setting the current value

}

}

         get

{

            return "DateTime";  // The default value

}

}

void VarRefreshTest_VariableStateChangedEvent(string aVariableName, VariableState aVariableState)

{

if (string.Equals(aVariableName, mDefaultVarName, StringComparison.OrdinalIgnoreCase))

button1.Text = aVariableState.FormattedValue;

if (string.Equals(aVariableName, mSecondVarName, StringComparison.OrdinalIgnoreCase))

button2.Text = mSecondVarDescription + " : " + aVariableState.FormattedValue;

if (string.Equals(aVariableName, mMainVarName, StringComparison.OrdinalIgnoreCase))

button3.Text = aVariableState.FormattedValue;

}

}

}


2.17 Example 3 - Vector Object

The following code shows the definition of a vector object for Asix.Evo. The object is displayed as a framed rectangle containing a smaller black rectangle. The position of the smaller rectangle depends on the state of the object. The state of the object can be changed by clicking the black rectangle or selecting the S key.

public class PaintedObjectTest : Askom.AddonManager.EvoObjectBase

   {

      bool switched = false;  // Object state

 public PaintedObjectTest()

      {

          // Initialization ...

         }

      public override bool OwnerDraw

      {

         get

         {

            return true;  // Object in the Vector Mode (not the Control Mode)

        }

      }

      public override string EvoObjectID

      {

         get

         {

            return "Vector object";  // Unique object ID

         }

      }

      public override string EvoObjectDescription

      {

         get

         {

            return "Vector object";        // Brief object description

        }

      }

      Color mColor1 = Color.Blue;

        / / / / <summary>

        /// Background colour properties

         /// </summary>

      [Askom.AddonManager.EvoObjectProperty(Description = "Color", EditorType = EditorType.Color, PropertyGroup = EvoObjectPropertyGroup.StateGroup)]

      public Color Color1

      {

         set

         {

            mColor1 = value;

            InvalidateObject();

         }

         get

         {

            return Color.Blue; // The default value

         }

      }

      /// <summary>

        /// Handling the colour filling event

        /// </summary>

      public override void Paint(Graphics aGraphics, Rectangle aArea)

      {

         using (Brush b = new SolidBrush(mColor1))

         {

            aGraphics.FillRectangle(b, aArea); //Background in the colour of property

         }

         aGraphics.DrawRectangle(Pens.Red, aArea);  / / Red frame

        / / The area of the small black rectangle depends on the state

          Rectangle swRect = Rectangle.Empty;

         if (switched)

         {

            swRect = new Rectangle((int)Math.Round((double)aArea.X + 0.25d * aArea.Width),

                                          (int)Math.Round((double)aArea.Y + 0.25d * aArea.Height),

                                          (int)Math.Round((double)0.25d * aArea.Width),

                                          (int)Math.Round((double)0.25d * aArea.Height));

         }

         else

         {

            swRect = new Rectangle((int)Math.Round((double)aArea.X + 0.5d * aArea.Width),

                                          (int)Math.Round((double)aArea.Y + 0.5d * aArea.Height),

                                          (int)Math.Round((double)0.25d * aArea.Width),

                                          (int)Math.Round((double)0.25d * aArea.Height));

         }

         aGraphics.FillRectangle(Brushes.Black, swRect); // Black rectangle

   }

      /// <summary>

        /// Handling the event of mouse click on the object

   /// </summary>

      public override void PerformMouseClick(System.Windows.Forms.MouseEventArgs e, Rectangle aArea)

      {

         Rectangle swRect = Rectangle.Empty;  // Current area of the small black rectangle

         if (switched)

         {

            swRect = new Rectangle((int)Math.Round((double)aArea.X + 0.25d * aArea.Width),

                                          (int)Math.Round((double)aArea.Y + 0.25d * aArea.Height),

                                          (int)Math.Round((double)0.25d * aArea.Width),

                                          (int)Math.Round((double)0.25d * aArea.Height));

         }

         else

         {

            swRect = new Rectangle((int)Math.Round((double)aArea.X + 0.5d * aArea.Width),

                                          (int)Math.Round((double)aArea.Y + 0.5d * aArea.Height),

                                          (int)Math.Round((double)0.25d * aArea.Width),

                                          (int)Math.Round((double)0.25d * aArea.Height));

         }

         if (swRect.Contains(e.Location))

         {       / / Clicking on the area of the small black rectangle changes the state

          switched = !switched;

            InvalidateObject();

         }

      }

      public override void PerformKeyDown(System.Windows.Forms.KeyEventArgs e)

      {

         if (e.KeyCode == System.Windows.Forms.Keys.S)

         {  // When the 'S' key is pressed, the state is changed

          switched = !switched;

            InvalidateObject();

         }

      }

   }


GIS_Map_Diagrams_intro

Home > GIS Map Diagrams

>> Help for Asix

www.asix.com.pl

Asix.Evo - GIS Map Diagrams


Introduction

Home > GIS Map Diagrams > 1 Introduction

1 Introduction

The purpose of GIS map diagrams is to display elements on geographic maps. Maps are from the OpenStreetMap service and may be downloaded online from the Internet or offline from the local buffer prepared earlier by the application designer. Visual elements (markers, (broken) lines, areas, texts or pictures) may be plotted onto GIS diagrams. The work with GIS diagrams is based on a somewhat different concept than the concept known from ordinary diagrams. First of all, the focus is on the layered organisation of elements plotted. Both the application designer and its user (operator) may freely control the visibility of chosen diagram layers. It is also possible to fill in the layers with elements automatically, based on geographic data obtained from MS SQL databases. This type of diagrams provides a broad range to set a zoom level.


GIS Diagrams

Home > GIS Map Diagrams > 1 Introduction > 1.1 GIS Diagrams

1.1 GIS Diagrams

GIS diagrams use geographic coordinates in the WGS 84 reference system (GPS); the working area is between coordinates -180.0 to 180.0 degrees longitude (equivalent to X coordinates) and -90.0 to 90.0 degrees latitude (equivalent to Y coordinates). The diagram (map) may be zoomed in from 2 to 25 exponentially, but it is also possible to impose limits to a defined range. You may scale or position the view with a mouse or set the relevant zoom and location by means of dedicated operator's actions. With the diagram, you may also configure several buttons displayed along one edge and assign any operator's actions to them.


Background Maps

Home > GIS Map Diagrams > 1 Introduction > 1.2 Background Maps

1.2 Background Maps

The diagram may be operated in one of three modes: without a background map, with a background map downloaded online from OSM (OpenStreetMap) servers or with a background map downloaded from the local buffer, where the designer has saved selected areas for specific zoom-in levels. You may use the no-OSM map mode to design diagrams (not necessarily geographic), with a large zoom-in scale. Optionally, you may apply your own raster or vector images in a layer as the background map. If you use OSM maps online or offline, you may display them in colour, in grey scale or in negative.


Layers

Home > GIS Map Diagrams > 1 Introduction > 1.2 Background Maps > 1.2.1 Layers

1.2.1 Layers

GIS diagram layers work differently from layers in ordinary diagrams. In ordinary diagrams, layers are not individual, definable beings; the layer number only assigned to the object determines the location of the object in relation to other objects (mutual covering). With GIS diagrams, you may define layers explicitly, name and describe them. It is also possible to make the visibility of GIS layers dependent on any conditions or the diagram zoom-in level. There is a special window for layer visibility management, where both the application designer and the operator (if allowed) gets a list of all the layers. In edit mode, the designer may use the window to select the active layer being edited at the moment. You may edit the active layer only. The other (inactive) layers may be displayed but their objects may not be selected or edited and thus they do not interfere with the edition of the active layer.

Fig. 'Layers' Window.


Visualisation Elements

Home > GIS Map Diagrams > 1 Introduction > 1.3 Visualisation Elements

1.3 Visualisation Elements

The application designer may use five types of visual objects and place them on GIS diagrams:

1. Line – scalable vertices object which represents a broken line

2. Region – scalable vertices object which represents an area

3. Text – scalable object which displays static or dynamic inscriptions

4. Marker – point object whose size is independent from the scale

5. Picture – scalable rectangular object used to display any raster or vector image

For objects, you may set up visibility ranges with reference to the diagram zoom-in level, a message to be displayed in a bubble or assign actions to be executed after the mouse right- or left-click. Further, you may link objects with a process variable and they will change their appearance dynamically depending on the process variable status.

The Region, Line or Text objects may have individual display and performance settings or download such settings from pre-defined templates in the application. GIS templates are sets of object properties and interaction modes defined by the designer. They are useful if you wish to configure multiple objects in the same, repeated manner. If it is necessary to change properties of many objects, you do not need to configure them over and over again for every object; it is enough to make changes to the template. Optionally, templates may have parameters.

The Marker-type object is displayed by default as a dot with a specified size and colour, but you may apply to the object any appearance defined by the application designer. Similarly to Lines and Regions, Markers may also use templates; in addition, the Marker template allows you to design it graphically. Defined and named Marker templates may also have parameters.


Cooperation with MS SQL Geographic Databases

Home > GIS Map Diagrams > 1 Introduction > 1.4 Cooperation with MS SQL Geographic Databases

1.4 Cooperation with MS SQL Geographic Databases

There is an alternative to the manual placement of objects on GIS diagram layers: it is possible to fill in layers with objects automatically, based on the contents of an MS SQL geographic database. To do this, you may define GIS datasources, in the Asix.Evo application, associated with a specific database and table containing the GEOMETRY type column. The data in the table will be mapped onto relevant objects, depending on the geometry type. The geographic database for objects is developed manually according to object definition standards. A data source may support geometry of points (POINT) – to be mapped onto Markers or Texts, of lines (LINESTRING) – to be mapped onto Line-type objects or of Polygons (POLYGON) – to be mapped onto Region-type objects. A single data source may only handle objects of a single type. The GIS data source allows you to define a default Line, Region, Text or Marker template to be used to visualise records in the table or indicate a table column which will contain individual template names for each record. Further, the data source may retrieve any other attributes besides geometry and the attributes will be assigned automatically to object parameters (e.g. texts, descriptions).


Map source configuration

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.1 Map Source Configuration

2.1 Map Source Configuration

Before designing GIS diagrams, declare the map provider and GIS service client ID in the global settings of the application.

Asix.Evo.exe > Global settings > Settings > Maps settings:

Map provider – a source of maps to be used by GIS diagrams; by default, diagrams work on a free and open map OpenStreetView;

GIS service client ID – the client's identifier required by map servers to download a map;

Fig Map Source Declaration.


Diagram creation

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.2 Diagram Creation

2.2 Diagram Creation

To create a GIS map diagram, right click Diagrams in the application explorer and select Create Diagram in the context menu.

An on-line map is loaded by default on the new diagram.

Fig. GIS Diagram Creation.

Fig. GIS Diagram with a Default OpenStreetView Map.


Definition of Diagram Basic Properties

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.3 Definition of Diagram Basic Properties

2.3 Definition of Diagram Basic Properties

The basic properties of a GIS map diagram:

Map mode – offline or online; default value: online; if you want to use offline maps, they need to be downloaded by the designer by means of the ‘Offline map manager’ window (see: chapter 2.14. Declaration of Offline Maps).

Display mode – normal, grey scale or negative;

Min zoom factor / Max zoom factor – to limit the possible zoom-in degree for the diagram/map;

Default zoom factor – the initial zoom-in degree from 2 to 25, set when a diagram is opened (in the range from 2 to 25, each subsequent zoom-in doubles the size (x2) of elements seen in the map and reduces by half (÷2) the size (length and width) of the map fragment displayed);

Min longitude / Max longitude / Min latitude / Max latitude - the parameters define the range of geographical coordinates to be displayed on the diagram;

Default longitude / Default latitude – default geographic coordinates of the centre of the displayed map area, set when the diagram is opened – the default values are set at: 470N, 110N (latitude of 470 north and longitude of 110 east);

Show map center – it attaches a map centre marker (x); by default: no; when zooming in/out a map area, the point where the cursor is located, automatically becomes the centre of the map area zoomed-in/out;

Map center color – it defines the colour of the map centre marker; pre-defined colours are available plus it is possible to use the swatch to pick any colour from the monitor screen;

Show toolbar – the option determines if the operator can see the toolbar in the diagram; by default, the toolbar is available to the operator; regardless of the parameter setting, the toolbar is always visible in the application design mode; the toolbar includes:

- the button Layers, to opens a window with pre-defined layers;

- information on the map zoom degree;

- the latitude and longitude of the map centre;

Background color – the diagram background colour;

Buttons alignment – it defines the location of buttons on the map: none – no buttons, top, bottom, left, right;

Buttons width/height – it defines the (pixel) size of buttons on the map;

Buttons color – it defines the colour of buttons on the map;

Buttons text color – it defines the colour of the text displayed on buttons on the map;

Buttons font name – it defines the typeface of the text displayed on buttons on the map

Buttons font size – it defines the font size for the text displayed on buttons on the map;

Buttons font style – it defines the font style (regular, bold, italic, underline, strikethrough) for the text displayed on buttons on the map;

Buttons opacity – it defines the transparency degree for buttons – from 0 to 1, where 0 stands for complete transparency and 1 stands for complete opacity.


Creation and Parameterisation of a Layer

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.4 Creation and Parameterization of a Layer

2.4 Creation and Parameterization of a Layer

It is possible to define any number of layers in the diagram.

Once you create a GIS diagram, a single ‘Base’ layer is created automatically. To create more layers, use ‘+’ in:

the diagram properties window > tab Layers > panel Layers

Fig. Adding a New Layer.

To parametrize a layer, go to the diagram properties window, tab Layers, panel Layers, select the layer and set the following properties:

Layer name;

Description;

Visible – the parameter controls the visibility of the layer on the diagram;

Min visibility zoom – it defines the zoom-in degree, at which the layer (its components) becomes visible in the diagram;

Max visibility zoom – it defines the maximum zoom-in degree, at which the layer (its components) is still visible in the diagram;

Datasource – it enables you to declare the GIS data source as an MS SQL base; the option will download objects defined in the GIS data source onto the layer; the objects will be taken from the source base and plotted on the layer dynamically, depending on the area being displayed on the GIS diagram;

It is possible to manage the layer visibility using a window invoked from the diagram toolbar (see: 2.6. Layer Visibility Management / Toolbar).

Once you define and select the layer, you may define visualisation components such as: Line, Region, Picture, Text, Marker.


Creation and Parameterisation of Buttons

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.5 Creation and Parameterization of Buttons

2.5 Creation and Parameterization of Buttons

Buttons are GIS diagram components and are used for operator's actions assigned to them.

To create buttons, use ‘+’ in:

the diagram properties window > tab Buttons > panel Buttons

Fig. Adding a Button.

To parameterize a button, go to the diagram properties window, tab Buttons, panel Buttons, select the relevant button and set the following properties:

Text – it defines the text to be displayed on the button;

Hint - it declares a hint, which will be displayed in the application execution mode when you move the mouse over the button;

Picture Name – it declares a picture to be downloaded as the button background;

Action – it assigns an action; besides standard actions, there is also a group of actions dedicated specifically to GIS diagrams – their names start with Gis….

Fig. A Sample Diagram with Buttons.


Layer Visibility Management / Toolbar

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.6 Layer Visibility Management / Toolbar

2.6 Layer Visibility Management / Toolbar

The toolbar is displayed at the bottom of the GIS diagram. It is always visible in the application edit mode, while in the application execution mode the operator may use the toolbar only when the designer makes it available by means of the property Show toolbar in the diagram basic properties.

The toolbar includes: button Layers, a field with information on the active layer and fields to display the zoom-on degree plus the geographic coordinates of the centre of the displayed map area.

The button Layers opens a window with a list of pre-defined layers, where you may uncheck/check the relevant layers – to hide/display them. The button [image] blocks the hiding of the window when it is inactive.

Fig. View of the Diagram with the Toolbar.


Creation and Parameterisation of a Line Object

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.7 Creation and Parameterization of a Line Object

2.7 Creation and Parameterization of a Line Object

To create a Line object, use the command Objects / Line in the context menu which is expanded when you right click the GIS diagram surface.

Fig. Creation of a Line Object.

To parameterize the Line object, select the Line object and define the following parameters in the object properties window:

Element Name – it defines the name of the object;

Layer name – the name of the layer where the object is located;

Hint – when you declare a hint text, the hint will be displayed in the application execution mode after you move the cursor over the object;

Min visibility zoom / Max visibility zoom – it defines the minimum and maximum zoom-in degree for a diagram area, from/to which the object is visible;

Vertices – it defines the geographic coordinates for Line vertices; the property enables you to add and remove Line vertices; (to add, right click the vertex coordinates line);

Template name – it enables you to declare the name for a GIS template with pre-defined selected properties of the Line;

Template parameters – it enables you to declare values for the parameters defined in the Line template;

Thickness – it defines the Line thickness in units defined in the property Thickness Unit;

Thickness Unit – it defines the unit to define the Line thickness; it could be metres or pixels; with metres, the Line thickness increases according to the diagram area zoom-in degree; with pixels, the Line thickness remains constant regardless of the diagram area zoom-in degree;

Start Cap – it defines the style for the Line beginning; available options: ‘None’, ‘Flat’, ‘Round’, ‘Triangular’, ‘Arrow’;

End Cap – it defines the style for the Line end; available options: ‘None’, ‘Flat’, ‘Round’, ‘Triangular’, ‘Arrow’;

Dash Style – it defines the Line style; available options: ‘None’, ‘Dash’, ‘Dot’, ‘Dash-Dot’, ‘Dash-Dot-Dot’.

***

It is possible to manage Line vertices. Once you right click the Line object, the context menu provides a set of commands Vertices:

- Edit vertices;

- Insert vertex;

- Remove vertex;

- End vertex edit;

- Vertex transforms: ‘Horizontal reflection of vertices’, ‘Vertical reflection of vertices’, ‘Rotation of vertices’.

The tab State properties enables you to define the following parameters for each object state:

- State description;

- Visible – to declare the object visibility;

- Color – the colour of the object;

- Stripes color – the colour of spaces between dashes/dots in a Line, when the Line style is defined with dashes and/or dots (‘Dash’, ‘Dot’, ‘Dash-Dot’, ‘Dash-Dot-Dot’).


Creation and Parameterization of a Region Object

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.8 Creation and Parameterization of a Region Object

2.8 Creation and Parameterization of a Region Object

To create a Region object, use the command Objects/Region in the context menu which is expanded when you right click the GIS diagram surface.

Fig. Creation of a Region Object.

To parametrise the Region object, select the Region object and define the following parameters in the object properties window:

Element Name – it defines the name of the object;

Layer name – the name of the layer where the object is located;

Hint – when you declare a hint text, the hint will be displayed in the application execution mode after you move the cursor over the object;

Min visibility zoom / Max visibility zoom – it defines the minimum and maximum zoom-in degree for a diagram area, from/to which the object is visible;

Vertices – it defines the geographic coordinates for Region vertices; the property enables you to add and remove Region vertices; (to add, right click the vertex coordinates line);

Template name – it enables you to declare the name for a GIS template with pre-defined selected properties of the Region;

Template parameters – it enables you to declare values for the parameters defined in the Region template;

The tab State properties enables you to define the following parameters for each object state:

- State description;

- Visible - to declare the object visibility;

- Color – the colour of the object;

- Opacity – it defines the transparency degree of the object;


Creation and Parameterization of a Marker Object

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.9 Creation and Parameterization of a Marker Object

2.9 Creation and Parameterization of a Marker Object

To create a Marker object, use the command Objects/Marker in the context menu which is expanded when you right click the GIS diagram surface.

Fig. Creation of a Region Object.

To parametrise the Marker object, select the Marker object and define the following parameters in the object properties window:

Element Name – it defines the name of the object;

Layer name – the name of the layer where the object is located;

Hint – when you declare a hint text, the hint will be displayed in the application execution mode after you move the cursor over the object;

Min visibility zoom / Max visibility zoom – it defines the minimum and maximum zoom-in degree for a diagram area, from/to which the object is visible;

Marker name – it enables you to declare the name of a GIS marker created individually by the designer; Markers created by the designer are available in the application explorer, node GIS Markers.

Marker parameters – it enables you to declare values for the parameters defined in the Marker created individually by the designer;

Default longitude / Default latitude – default geographic coordinates of the centre of the Marker object, corresponding to the location of the Marker when it is imposed on the diagram;

Dynamic longitude / Dynamic latitude – the properties enable you to allocate process variables, with which the Marker object will change is position as the variable values change;

Point size – the quantity is expressed in pixels and stands for the constant size of the Marker, which does not change regardless of the zoom-in degree; by default: 8 px;

The Marker has the shape of a black dot. If the user wants to have a different Marker, they can define their own Markers (see: 2.12. Creation of GIS Templates / Markers).

The tab State properties enables you to define the following parameters for each object state:

- State description;

- Visible – to declare the object visibility;

- Color – the colour of the object;

- Opacity – it defines the transparency degree of the object;

Fig. Markers on the Map.


Creation and Parameterization of a Text Object

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.10 Creation and Parameterization of a Text Object

2.10 Creation and Parameterization of a Text Object

To create a Text object, use the command Objects/Text in the context menu which is expanded when you right click the GIS diagram surface.

Fig. Creation of a Text Object.

Element Name – it defines the name of the object;

Layer name – the name of the layer where the object is located;

Hint – when you declare a hint text, the hint will be displayed in the application execution mode after you move the cursor over the object;

Min visibility zoom / Max visibility zoom – it defines the minimum and maximum zoom-in degree for a diagram area, from/to which the object is visible;

Template name – it enables you to declare the name for a GIS template with pre-defined selected properties of the Text;

Template parameters – it enables you to declare values for the parameters defined in the template;

Longitude / Latitude – geographic coordinates of the centre of the Text object, corresponding to the location of the Text when it is imposed on the diagram;

Font – it defines the typeface of the text displayed in the Text object;

Font style – it defines the font style (regular, bold, italic, underline, strikethrough) for the text displayed in the Text object;

Font size – the quantity is expressed in metres and stands for the dynamic size which depends on the diagram area zoom-in degree.

The object text is declared in the tab State properties in the object properties window. The tab State properties enables you to define the following parameters for each object state:

- State description;

- Visible – to declare the object visibility;

- Text – the text displayed in the object;

- Color – the colour of the text;

- Background color – the colour of the background in the Text area;

- Cross out color – the object is struck through; it is possible to set the strikethrough colour; the ‘Transparent’ colour hides the strikethrough.

.


Creation and Parameterization of a Picture Object

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.11 Creation and Parameterization of a Picture Object

2.11 Creation and Parameterization of a Picture Object

To create a Picture object, use the command Objects/Pictures in the context menu which is expanded when you right click the GIS diagram surface.

Fig. Creation of a Picture Object.

Element Name – it defines the name of the object;

Layer name – the name of the layer where the object is located;

Hint – when you declare a hint text, the hint will be displayed in the application execution mode after you move the cursor over the object;

Min visibility zoom / Max visibility zoom – it defines the minimum and maximum zoom-in degree for a diagram area, from/to which the object is visible;

Latitude top / Longitude left – geographic coordinates of the upper left-hand corner of the Picture field;

Latitude bottom / Longitude right – geographic coordinates of the bottom right-hand corner of the Picture field.

The object picture is declared in the tab State properties in the object properties window. The tab State properties enables you to define the following parameters for each object state:

- State description;

- Visible – it enables you to declare the object visibility;

- Picture name – it enables you to declare a graphic file whose content will be displayed in the Picture object.


Creation of GIS Templates / Markers

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.12 Creation of GIS Templates / Markers

2.12 Creation of GIS Templates / Markers

For objects: Line, Region and Text, it is possible to create exemplary sets of properties for these objects - GIS templates. Moreover, the designer may create their own individually-designed GIS Markers.

To create a GIS template, use the command Create GIS template set which is invoked by right clicking the node GIS Templates in the application explorer. Then, in the window of the tab GIS templates set Group… which is opened after you choose a GIS templates set, use ‘+’ to add a template and declare the template type (Line, Region or Text). The template properties window enables you to declare individual properties of an exemplary object.

A ready GIS template is called in the field Template name in the properties window of a Line, Region or Text object.

Fig. Creation of a GIS Object Template.

To create GIS Markers, use the command Create GIS marker which is invoked by right clicking the node GIS Markers in the application explorer. Then, in the window of the tab GIS Marker … which is opened after you choose a GIS Marker, you need to design the appearance of your Marker.

Fig. Creation of an Individual GIS Marker.

For GIS Marker design, the designer has a set of basic properties which define: Marker name, Hint, Width, Height and Background color and two objects: Rectangle and Text.

The Rectangle has the possibility to declare a process variable and states. The state properties include the possibility to declare a graphic file whose content will be displayed within the Rectangle. In particular, the Rectangle object has the following properties:

- Basic Properties:

- Element Name;

- Main variable;

- X,Y – coordinates of the position of the Rectangle in the GIS Marker area;

- Width / Height – dimensions of the Rectangle;

- State properties:

- State description;

- Visible – it allows you to control the object visibility;

- Color – the colour of the fill in the Rectangle;

- Color – the colour of the fill in the Rectangle;

- Rim width – the width of the Rectangle rim line; value in pixels;

- Strikethrough color – the object is struck through; it is possible to set the strikethrough colour; the ‘Transparent’ colour hides the strikethrough.

- Picture name – it allows you to declare a graphic file whose content will be displayed within the Rectangle object;

- Rounding radius – it allows for the effect of rounded vertices of the Rectangle; the higher the value, the more rounded the vertices are;

The Text object has the following properties;

- Element Name;

- Main variable;

- X,Y – coordinates of the position of the Text field in the GIS Marker area;

- State properties:

- State description;

- Visible – it allows you to control the object visibility;

- Text – the content of the text;

- Color – the colour of the text;

- Background color – the colour of the background in the text field;

- Strikethrough color – the object is struck through; it is possible to set the strikethrough colour; the ‘Transparent’ colour hides the strikethrough;

- Frame color – the colour of the frame around the text field; you may define this property only when the property Frame style is defined;

- Frame style – the frame around the text field may be: a single line, a line with the effect of a concave text area or a line with the effect of a convex text area; the property Frame color may only be defined for the ‘single line’ variant;

- Horizontal alignment – text alignment: left, right, centre;

- Font – it defines the text typeface;

- Font style – it enables you to format the text with the following styles: regular, bold, italic, underline and strikethrough;

- Font size – the font size in pixels.

Fig. Examples of GIS Markers.


Preparation of a GIS Data Source

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.13 Preparation of a GIS Data Source

2.13 Preparation of a GIS Data Source

To create GIS data sources, use the command Open GIS datasources configuration which is invoked by right clicking the node GIS datasources in the application explorer. Then, in the window of the tab GIS datasources, use ‘+’ to add a data source in the panel Datasources and set parameters in the tabs Connection settings and GIS data.

Fig. Declaration of a GIS Data Source – Connection Settings.

Connection settings require you to enter: Server name, Database name and Windows authorization/SQL Server authorization.

GIS data includes the following elements:

- Table or view name;

- Geometry column;

- Presentation mode – it defines the object into which geographic data from the base is to be converted; a point (POINT) may be presented as a Marker of Text; a line (LINESTRING) – as a Line object, and a polygon (POLYGON) – as a Region;

- Template/marker name column – it allows you to declare a template according to which the data from the base will be displayed; the template will be downloaded from the specified column in the base;

- Default template/marker – if no template for the display of base data is specified in the base, declare a default template;

- Columns of parameters – it allows you to declare the name of a column in the GIS data source, which contains any parameters other than geometry, the parameters will be assigned automatically to the defined parameters of the object; the parameter name needs to be the same as the column name.

Fig. Declaration of a GIS Data Source – GIS Data.

Exemplary creation of a GIS geometric data base:

Creation of an exemplary table:

CREATE TABLE [dbo].[GeometrySample]

(

[ID] [int] NOT NULL,

[Name] [nvarchar](50) NULL,

[Geom] [geometry] NULL,

CONSTRAINT [PK_GeometrySample] PRIMARY KEY CLUSTERED ([ID] ASC )

);

Insertion of data into the table (in succession: point, line, polygon):

INSERT INTO GeometrySample (ID, Name, Geom)

VALUES (1, 'P1', geometry::STGeomFromText('POINT (10 10)', 0));

INSERT INTO GeometrySample (ID, Name, Geom)

VALUES (2, 'L1', geometry::STGeomFromText('LINESTRING (5 5, 25 25)', 0));

INSERT INTO GeometrySample (ID, Name, Geom)

VALUES (3, 'R1', geometry::STGeomFromText('POLYGON ((10 10, 70 10, 80 30, 30 30, 10 10))', 0));


Declaration of Offline Maps

Home > GIS Map Diagrams > 2 Work with GIS Map Diagrams > 2.14 Declaration of Offline Maps

2.14 Declaration of Offline Maps

You may also work with background maps offline. To this end, save, in the application, map views to be used when working with the application without Internet access. Use the window ‘Offline map manager’ which is invoked with the command Map management in the main menu Tools. In the window, set and zoom in a map area as desired and save the fragment with the command Download visible map area. At this stage, you need to make provision for all the potential areas to be viewed in the GIS diagrams of the application and download them all. Otherwise, if you do not download areas with a high zoom-in degree, and the end user tries to zoom in on the map using the downloaded fragments with a lower zoom-in degree, they will not see a correct view but an area with a lower zoom-in degree stretched to a larger size (visible pixel effect).

Fig. Offline Map Manager.


Welcome

Home > Operator Actions

>> Help for Asix

www.asix.com.pl

Asix.Evo - Operator Actions


1 Use of Operator Actions

Operator actions are basic means of the operator's control of the running application. The system designer shares the actions with the operator via the following mechanisms:

  • Handling object events and synoptic diagrams

  • User menu

  • Schedule

  • Global keys

The general form of the actions is as follows:

action_name( parameter1, parameter2, … )

The number and significance of parameters depend on the action name. In the simplest case, all parameters can be specified directly, e.g.:

OpenWindow(WindowP1,MainPanel,Room121,””)

The above action opens a window called WindowP1, and the Room121 diagram will be inserted in the MainPanel panel.

Each of the action parameters may be also an optional expression. The same principles of building expressions as for synoptic object properties are valid for the actions. Upon execution of an action the values of all expressions used are calculated and only the actions formed that way may be executed, e.g.

OpenWindow(WindowP1,MainPanel,Room +Variable(RoomNo) ,””)

The diagram name parameter is created dynamically on the basis of the value of the RoomNo variable. If upon the action execution the variable value is equal to 101, the Room101 diagram will be opened.

The action execution is also dependent on the context of its use. The action executed as part of the event handling has a context-specific access to the properties and parameters of objects or diagrams for which the event has been activated. The actions executed from the schedule or global key do not have such possibility. The actions executed via the user menu may have access to the properties and parameters of objects and diagrams, if the menu is opened by ShowMenu action used within the event handling process - in this case the context of use is inherited.

OpenWindow(WindowP1,MainPanel,Room +Variable() ,””)

In the above case the diagram name is created based on the main variable value of the object for which the event has been activated - the parameterless Variable function retrieves the value of the contextual main variable. If upon the action execution the variable value is equal to 101, the Room101 diagram will be opened.

OpenWindow(WindowP1,MainPanel,Room +Parameter(RoomNo) ,””)

In the above case the diagram name is created based on the value of a parameter named RoomNo. This parameter is the parameter of a diagram or template (also depending on the context of use). If upon the action execution the parameter value is equal to 101, the Room101 diagram will be opened.

See also

- Expressions and Functions

- Visualization Elements: The Standard Object Events

The Diagram Events

Menu

- Application Parameterization: Configuring the Scheduler


2 Complex Actions

In the case where a need to perform a sequence of operations occurs, complex actions may be used. These are simply sets of regular operator actions which are executed sequentially.

The complex actions are defined in the Action Sets work panel via a tree of Application Explorer panel elements. A complex action is executed by the ActionSet operator action.

Generally, the complex action execution involves sequential execution of each of the component actions. The execution of a complex action may be conditionally aborted through the Break operator action, for example:

Break(Variable(RoomNo)==0)

If the RoomNo variable value is equal to 0, the component actions queued after the Break action will not be executed.

The operator actions constituting a complex action feature all the properties of regular operator actions. In particular, the values of expressions used to define the parameters are calculated not earlier than upon the execution. Standard inheritance of context also occurs; if the ActionSet action has been activated within the context of an event handling, all the component actions will be run in the same context.

NOTE:

In simple cases, instead of a complex action it is possible to alternatively use the simple Actions action which also allows to execute several component actions sequentially.


2.1. Parameters of Complex Actions

Home > Operator Actions > 2 Complex Actions > 2.1. Parameters of Complex Actions

2.1 Parameters of Complex Actions

Complex actions are characterised by action parameters. They should not to be confused with the diagram and template parameters available through the Parameter function. It is possible to define the action parameters while defining the complex action. The parameters are identified by name. Then, it is possible to call the parameter anywhere within the component actions by entering into the action content the parameter name preceded by the "@" character.

The complex action execution procedure is explained by the following example.

Prerequisites:

  • The A1 complex action is declared to use the Room and Setpoint parameters

  • One of the component actions is of the following form:

SetVariable(Setpoints+@Room,@Setpoint)

  • The complex action is executed through the action running within the context of the event handling:

ActionSet(A1,RoomNo+Parameter(RoomNumber),”10+1”)

Execution:

  • At the time of the ActionSet action execution the second parameter value of the action is calculated through a combination of the text RoomNo and the parameter value (of diagram or template) named RoomNumber. The value of the calculated parameter is handed over as Room parameter in a text format to the complex action. Let's assume that the calculated value is equal to "RoomNo99". The third parameter of the ActionSet action is handed over in an unchanged form of "10 +1" as the Setpoint parameter.

  • Upon execution of the SetVariable component action, the variable name is calculated by combining the text "Setpoints" and the value of the Room component action (which yields the name SetpointsRoomNo99). The value is controlled directly with the value of the Setpoint parameter and will be equal to the text "10 +1".

  • As a result, the SetpointsRoomNo99 variable will be set to the text value "10 +1".

If the aim was setting the value of 11, the ActionSet action of the following form should be used:

ActionSet(A1,RoomNo+Parameter(RoomNumber),10+1)

In this case, the calculation of the expression 10 +1 would be preformed before executing the complex action.


3 List of Operator Actions

Synoptic window management

CloseWindow - closing synoptic windows

CopyWindow - action serves to open a copy of the currently open synoptic window

GisHideLayer - action turns off the visibility of the indicated layer of the GIS diagram

GisRefreshLayer - action for manually refreshing (reloading) the content of the GIS diagram layer

GisShowLayer - action enables the visibility of the indicated layer of the GIS diagram

GisSwitchLayer - action toggles the visibility of the selected layer of the GIS diagram

GisZoom - action sets the GIS diagram zoom factor to a given value

GisZoomIn - action increases the magnification factor of the GIS diagram by a given value

GisZoomOut - action reduces the zoom factor of the GIS diagram by a given value

HidePanel - action hides the indicated or the current panel in the window

MaximizeWindow - action is used to maximize the open synoptic windows

MinimizeWindow - minimizing synoptic windows

NextDiagram - action is used to toggle the diagram in the selected panel of the synoptic window

OpenDiagram - opening a synoptic diagram in a dynamically created window

OpenWindow - opening a predefined synoptic window or replacing a diagram in the panel of a window opened previously

PreviousDiagram - action is used to toggle the diagram in the selected panel of the synoptic window

ResetWindows - action restores the start windows in the default position and size and closes the remaining windows

SetWindowSize - resizing synoptic windows

ShowPanel - action restores the hidden selected panel in the window

SwitchPanel - action switches the visibility of the indicated panel in the window

Zoom - action sets the diagram scaling degree to the selected percentage value in relation to the initial size of the diagram

ZoomIn - action increases the scaled diagram by a given percentage value in relation to the current state

ZoomOut - action reduces the scaled diagram by a given percentage value in relation to the current state

Access to process variables and monitoring of control operations

CancelControls - cancelling of pending control operations

PulseBit - action allows you to set the currently indicated bit of a variable

RefreshVariable - forced refreshing of a process variable value

SendControls - executing pending control operations

SetTableVariable - action allows for direct sending to the indicated process variable a control value in the form of an array of values

SetVariable - setting a process variable value

ToggleBits - changing bits of a process variable value

Transfer - action allows you to rewrite the current value and status of the source variable to the target variable

VariableInfo - displaying a window with information about the selected process variable

Application performance control

Restart - action performs a full restart of the application

ShowControlPanel - opening the control panel window

SwitchLanguage - changing the current application interface language

SwitchWorkMode - switching the working mode of the application

Terminate - closing the application

Operator action execution control

Actions - executing a sequence of component actions

ActionSet - executing a complex action

Ask - action for use in complex actions; it displays a message box with the query specified in the action parameter and two buttons: OK and Cancel

Break - conditional breaking of a complex action running

Execute - executing an action the content of which is constructed dynamically

Nothing - blank action

Perform - conditional executing of an action

SwitchAction - action assigned to the first compare value equal to the checked value is performed

Audiable signals

PlaySound – playing an audio file

PlaySoundLooping - playing an audio file in loop mode

Speak - action causes any given text to be read by Windows Narrator

StopSound - stopping an audio file playing

Integration with the alarm system

AcceptAlarm - alarm acknowledgement

AcceptAlarmsOnTable - action is used to confirm the alarms currently shown in the open active alarm tables

EndAlarm - alarm termination

ExcludeAlarm - excluding an alarm from handling

IncludeAlarm - resuming alarm handling

StartAlarm - starting an alarm

Integration with authorisation system

AddNote - action opens a dialog where the system operator can enter a text note

ChangePassword - changing the user password

ConfirmRole – verification of the assignment of a user to the role

DeactivateNote - action deactivates the last active note or all active operator notes from the indicated segment

Login – user login

Logout - user logout

SecurityBrowser - opening the security system logs browsing window

SecurityManager - opening a users' permissions management window

ShowNotes - action displays the preview window of the last operator notes with the possibility of entering new ones

Running the application components

AsreportDisplay - action is used to open the viewer of reports created in the Reporting Services technology with the use of the AsRaport module of Asix package

PowerGuardManager - action opens the management window of the Power Guardian module

PowerGuardMeter - action is used to open the graph window of the Power Guard module

ReportGenerate - action is used to generate the report content and / or display it

ReportsManager - action opens the script reports management window

Run – running an external programme or file

Script – running a user script

ScriptClose - action is used to end the running of the user script

ScriptRestart - action is used to restart (end and restart) the work of the previously run user script

ShowMenu - opening a context menu

SydelShow - action is used to control the work of the SydelEko program by Technicon

Controlling the operation of AsTrend application

AstrendAsix6 - controlling AsTrend application operation. Action used only for automatic conversion of the application from Asix6 system.

AstrendDisplay - displaying a trend with AsTrend application

AstrendPrint - printing a trend with AsTrend application

AstrendPrintToPdf - action is used to export a selected trend or report to a PDF file by means of the AsTrend program

Communication with AsBase module

AsbaseAdd - adding a new record within the connection

AsbaseClose - closing a connection between the Asix.Evo application and AsBase module

AsbaseDelete - action deletes the current record within the connection established earlier with the AsbaseOpen action

AsbaseLoad - loading a value from the selected recipe to the set of process variables

AsbaseLoadByValue - action allows you to load settings from a record in a selected group of recipes to process variables associated with this group in AsBase

AsbaseNavigate - controlling browsing and management of data within the connection.

AsbaseOpen – establishing a connection between the Asix.Evo application and AsBase module

AsbasePrint - printing data selected from the AsBase module archive

AsbaseSave - action adds a new record to the registration set or recipe group

AsbaseShow - displaying an AsBase module window with an option of switching to the desired set of data

AsbaseUpdate - changing the field values of the current record within the connection

AsbaseWait - action is waiting for the completion of previously called Asbase family actions ...

Additional

ClearSelection - action removes the selection from the currently selected diagram object

EditPatterns - opening a model trend editor window

EditTimetables - action opens the timetable cycles edition window

GetVarNames - action saves the names of variables used in objects located under the current mouse cursor position to the clipboard

IfAction - action assigned to the first condition that is true is performed

Message - recording information into the event log

ObjectAction - action allows you to perform operations on selected diagram objects

PrintScreen - saving an image of the current window, diagram or screen into the system clipboard or file

RemoveAppData - deletes application data

ResetGlobalProperty - action sets the value of the global property as it was originally defined

SelectPattern - action allows the interactive selection of the reference curve

SetAppData - action allows you to set or change the value of an application data

SetBounds - changing the position and size of object, template or object group

SetGlobalProperty - action allows you to change the value of a global property (only for local station)

SetParameter - action allows you to change the value of the indicated parameter of the context diagram

SetParameters - action allows you to change the value of the context diagram parameters

SetPosition - changing the position of object, template or object group

SetProperty - setting properties of an object or synoptic diagram

SetSelection - action is used to force the transition to the selection state for a given diagram object

SetSize - changing the size of object or template

ShowKeyboard - displaying the window of on-screen keyboard

ShowNumericKeyboard - displaying the window of on-screen numeric keyboard


4.1 AcceptAlarm

Intended use

The action is used to acknowledge the alarm by the user. An alternative method for the alarm acknowledgement is to use the Accept function of IAlarm interface in the user script code. Alarms may also be acknowledged with the use of the Active Alarms Viewer object.

Syntax

AcceptAlarm(domain_name, alarm_ID)

Parameters

domain_name

Name of the alarm domain related to the action. If the name is not provided, the action relates to the default domain (the first one).

alarm_ID

Alarm ID to be acknowledged.

See also

- Alarm System

- Objects > Active Alarms Viewer Object

- Scripts > IAlarm interface


AcceptAlarmsOnTable

Home > Operator Actions > 4 Description of operator actions > 4.2 AcceptAlarmsOnTable

4.2 AcceptAlarmsOnTable

Intended use

The action is used to confirm the alarms currently shown in the open active alarm tables. It is an alternative to the confirmation mechanisms built into the user interface of alarm tables. In the action parameter, you can specify which tables the action concerns.

Syntax

AcceptAlarmsOnTable(table_name)

Parameters

table_name

The name of the active alarm table for which alarms should be confirmed. It can be used special characters * and ?. In particular, the name * means: confirm all alarms shown by all open tables.

See also

- System of Alarms

- Active Alarm Table

- AcceptAlarm action


4.2 Actions

Home > Operator Actions > 4 Description of operator actions > 4.3 Actions

4.3 Actions

Intended use

The action is used for sequential execution of a component action set. Its functioning is similar to the complex action. It may be implemented in simpler cases where the number of the component actions and their complexity are not too great.

Syntax

Actions(action1, action2, ...)

Parameters

action1, …, actionN

The component actions which will be executed sequentially.

Examples

Actions( SetVariable(v1,1), SetVariable(v2,1))

The action runs consecutively two component actions that set the values​ of two process variables.

See also

2. Complex Actions


4.3 ActionSet

Home > Operator Actions > 4 Description of operator actions > 4.4 ActionSet

4.4 ActionSet

Intended use

The action is used to run a complex action.

Syntax

ActionSet(name, parameter1, parameter2, ...)

Parameters

name

The name of a complex action.

parameter1, …, parameterN

The values of complex action parameters. The number of parameters used in the call must be in accordance with the number of parameters in the definition of a complex action. Successive call parameters will be substituted for the parameters of the complex action in the order of their occurrence in the definition of the complex action.

Examples

ActionSet(switchoff_aggregate, agr100, agr101)

This action runs the complex action called switchoff_aggregate. Assuming that the action switchoff_aggregate has two parameters named variable1 and variable2 defined in this order, upon the action execution the parameter variable1 will be equal to agr100, and the parameter variable2 will be equal to agr101.

See also

2. Complex Actions


AddNote

Home > Operator Actions > 4 Description of operator actions > 4.5 AddNote

4.5 AddNote

Intended use

The action opens a dialog where the system operator can enter a text note.

Syntax

AddNote (segment_ID)

Parameters

segment_ID

In the parameter you can specify the segment identifier with which the entered note will be associated. The parameter value may be empty.

See also

- Application Parameterization > Security System


4.4 AsbaseAdd

Home > Operator Actions > 4 Description of operator actions > 4.6 AsbaseAdd

4.6 AsbaseAdd

Intended use

This action adds a new record within the connection established earlier with the AsbaseOpen action. The field values ​of the new record result from the values of the process variables of the variable set used in the connection.

Syntax

AsbaseAdd (connection_ID)

Parameters

Connection_ID

The identifier used earlier in the AsbaseOpen action should be specified in the parameter.

See also

- Application Parameterization > Operation with the AsBase Application

- AsbaseOpen action


4.5 AsbaseClose

Home > Operator Actions > 4 Description of operator actions > 4.7 AsbaseClose

4.7 AsbaseClose

Intended use

This action closes the connection established earlier with the AsbaseOpen action.

AsbaseClose action should be used in the Diagram Closed event handling of the diagram for which the connection was established.

Syntax

AsbaseClose (connection_ID)

Parameters

Connection_ID

The identifier used earlier in the AsbaseOpen action should be specified in the parameter.

See also

- AsbaseOpen action

- Application Parameterization > O peration with the AsBase Module


4.6 AsbaseDelete

Home > Operator Actions > 4 Description of operator actions > 4.8 AsbaseDelete

4.8 AsbaseDelete

Intended use

This action deletes the current record within the connection established earlier with the AsbaseOpen action.

Syntax

AsbaseDelete (connection_ID)

Parameters

Connection_ID

The identifier used earlier in the AsbaseOpen action should be specified in the parameter.

See also

- AsbaseOpen action

- Application Parameterization > Operation with the AsBase Module


4.7 AsbaseLoad

Home > Operator Actions > 4 Description of operator actions > 4.9 AsbaseLoad

4.9 AsbaseLoad

Intended use

The action allows to load setpoints from a record in a selected group of recipes into process variables associated with this group in AsBase module. The record of setpoints may be selected by direct entering of the recipe name or by ​​interactive selection of the name.

If the connection mode is employed, the AsbaseNavigate action with the $Load option should always be used as the action for recipe load.

Syntax

AsbaseLoad(recipe_group_ID, variable_set_ID, recipe_name)

Parameters

recipe_group_ID

The recipe group ID from which the recipe field values are loaded

variable_set_ID

The ID of the variable set which will be provided with values from the selected recipe.

recipe_name

The name of the recipe to be loaded. If the recipe name is not specified, the window with a list of all the recipes defined within the group of recipes will be displayed. From this list the user can choose the recipe to be loaded.

Examples

AsbaseLoad( Setpoints,Tank1 ,”” )

The action will display a message box with a list of names of all the recipes within the group Setpoints. The user will be able to choose the recipe whose field values are ​​to be loaded into the process variables from the set called Tank1.

See also

- AsbaseNavigate action

- Application Parameterization > Operation with the AsBase Application


AsbaseLoadByValue

Home > Operator Actions > 4 Description of operator actions > 4.10 AsbaseLoadByValue

4.10 AsbaseLoadByValue

Intended use

The action allows you to load settings from a record in a selected group of recipes to process variables associated with this group in AsBase. Record of settings is selected by specifying a reference value for any recipe field.

Syntax

AsbaseLoadByValue(recipe_group_id, variable_set_id, field_id, field_value)

Parameters

recipe_group_id

Recipe group identifier from which the recipe field values are retrieved.

variable_set_id

Identifier of the set of variables to which the values from the selected recipe will be sent.

field_id

Recipe field ID for which the value compliance test will be performed. In addition to user-defined field IDs, you can use a Name ID, denoting the recipe name compliance test.

field_value

The reference value for the field specified in field_ID. The recipe for which the reference value meets the value of declared field will be loaded.

NOTICE:

A significant difference in the method of performing the AsbaseLoadByValue action compared to the action AsbaseLoad is that the fact that the recipe is loaded into the variables is not recorded in the table of performed loads for the recipe group. AsbaseLoadByValue action with the Name field works in the same way as the AsbaseLoad action, except for registering the fact that the operation was performed.

Examples

AsbaseLoadByValue( Settings,Preview ,ProdId,Variable(PID) )

The values from the Settings recipe group record, for which the value of the ProdId field will be consistent with the value of the PID variable, will be loaded into Preview set variables.

See also

- AsbaseNavigate action, AsbaseLoad action

- Application Parameterization > Operation with the AsBase Program


4.8 AsbaseNavigate

Home > Operator Actions > 4 Description of operator actions > 4.11 AsbaseNavigate

4.12 AsbaseNavigate

Intended use

- controlling browsing and management of data within the connection.

This action is used to control browsing and management of data within the connection established previously with the AsbaseOpen action. The action enables changing the current record within the connection, executing the recipe load operation and changing the connection parameters.

Syntax

AsbaseNavigate (connection_ID, operation_type, operation_parameters)

Parameters

connection_ID

The identifier used earlier in the AsbaseOpen action should be specified in the parameter.

operation_type

This parameter determines the operation to be executed within the connection. The possible values include one of the below:

$Count - recalculates the number of records displayed within the connection according to the current filter and puts this number in the appropriate variable of the set of variables.

$Filter - defines a new filter and, after the filter application, forces the movement to the last record of the connection. Details of the filter syntax - see: Operation with the AsBase Module (Asix.Evo_Application_Parameterization.PDF/CHM).

$First – forces the movement to the first record of the connection.

$Download – sends the current record content into the variables from the set of variables specified explicitly in the parameter operation_parameters.

$Last – forces the movement to the last record of the connection.

$Load - forces the movement to the record specified by the name of the recipe or selected interactively by the user. The operation is only available for connections related to groups of recipes.

$Next – forces the movement to the next record of the connection.

$Previous – forces the movement to the previous record of the connection.

operation_parameters

For the $Filter operation, the parameter specifies new content of the filter. For the $Download operation, the parameter specifies the name of the set of variables into which the values of the current record should be sent. For the $Load operation, the parameter should be filled out with the name of the recipe - a blank value means a list of all the available names will be displayed from which the user can select the recipe.

Examples

AsbaseNavigate(conn1, $Next, null)

This action forces moving on to the next record within the data of the connection conn1. The variables of the variable set located within the connection will be filled out with the values loaded from the new current record.

AsbaseLoad(conn1, $Load, RC_123)

This action forces the movement to the recipe called RC_123 within the recipe group resulting from the connection conn1. The variables of the variables set located within the connection will be filled out with the values loaded from the new current record.

See also

- AsbaseOpen action

- Application Parameterization > Operation with the AsBase Module


4.9 AsbaseOpen

Intended use

This action establishes a connection used to exchange data between the Asix.Evo Application and the AsBase application. The action parameters define which data will be exchanged and through which process variables. When the action execution is completed, the current record data of the connection will be recorded in the interface variables. The action may be used only after the AsBase application parametrisation.

The AsbaseOpen action should be used in the Diagram Opened event handling process for the diagram which must remain opened during data exchange. To close the connection within the Diagram Closed event, theAsbaseClose action must be used.

Syntax

AsbaseOpen (connection_ID, data_type, source_ID, variable_set_ID, slave_source_ID, slave_variable_set_ID, filter)

Parameters

Connection_ID

The ID that will uniquely identify the connection with the specified data source and the set of variables should be specified in the parameter. The ID is used later in the other actions of the family AsbaseXxx.

data_type

This parameter specifies the type of data source. The possible value is one of the below constants:

$Archive - the connection relates to the registration set

$Recipes - the connection relates to the recipe group

$Loads - the connection relates to the recipe load history

source_ID

The data source ID, depending on the data_type parameter, is the identifier of the registration set or recipe group.

variable_set_ID

The variable set ID which will be used in communication between the Asix.Evo application and AsBase module.

slave_source_ID

The slave data source ID, i.e. source which in the AsBase parameterization has been declared as being in relation with the master source.

slave_variable_set_ID

The variable set ID which will be used in communication between the Asix.Evo application and AsBase module. The set for communication with the slave source.

filter

This filtering expression allows limiting the range of data available through the connection. Details of the filter syntax - see: Operation with the AsBase Module (Asix.Evo_Application_Parameterization.PDF/CHM).

Examples

AsbaseOpen(conn1, $Archive, Paints, PaintsDgr, null, null, ”V_Akt=1” )

This action creates the connection called conn1. This connection provides the access to the data records of the registration set of Paints ID satisfying the condition saying that the value of the set field of Akt ID will be 1. The data will be replaced by the variables set of ID PaintsDgr. The active record data of the connection will be stored in variables of this set.

See also

- Application Parameterization > Operation with the AsBase Module

- AsbaseClose , AsbaseAdd , AsbaseDelete , AsbaseNavigate , AsbaseUpdate actions


4.10 AsbasePrint

Home > Operator Actions > 4 Description of operator actions > 4.13 AsbasePrint

4.13 AsbasePrint

Intended use

This action initiates printing the contents of selected tables by the AsBase module.

Syntax

AsbasePrint (data_type, source_ID, view_ID)

Parameters

data_type

This parameter specifies the type of data source. The possible values include one of the below:

$Archive - the connection relates to the registration set

$Recipes - the connection relates to the recipe group

$Loads - the connection relates to the recipe load history

source_ID

The data source ID, depending on the data_type parameter, is the identifier of the registration set or recipe group.

view_ID

The ID of the view associated in the Asbase application with the data source. This view specifies the records printing method and may also contain information used to filter the data.

Examples

AsbasePrint( $Recipes, Nastawy, ”” )

This action initiates printing all the records from the Nastawy recipe group in the default arrangement.

See also

- Application Parameterization > Operation with the AsBase Application


AsbaseSave

Home > Operator Actions > 4 Description of operator actions > 4.14 AsbaseSave

4.14 AsbaseSave

Intended use

The action adds a new record to the registration set or recipe group. The values of the new record fields result from the values of the process variables belonging to to the set of variables given in the action parameter.

The operation is performed in connectionless mode without having to meet any preconditions. In connection mode, the AsbaseAdd action should be used.

Syntax

AsbaseSave (data_type, source_ID, variable_set_ID)

Parameters

data_type

The parameter defines the type of saved data. Possible values are one of the following constants:

$Archive - the connection concerns a registration set

$Recipes - the combination applies to a group of recipes

source_ID

Data source ID - it is ID of registration set or recipe group, depending on the value of the data_type parameter.

variable_set_ID

Variable set ID. The values of the variables from this set will be saved into the appropriate fields of the new data record.

See also

- Application Parameterization > Operation with the AsBase Program


4.11 AsbaseShow

Home > Operator Actions > 4 Description of operator actions > 4.15 AsbaseShow

4.15 AsbaseShow

Intended use

This action activates the AsBase module window (brings it to front). The data to be displayed may be specified in the action parameters.

Syntax

AsbaseShow (data_type, source_ID, variable_set_ID, view_ID)

Parameters

data_type

This parameter specifies the type of data source. The possible values is one of the below constants:

$Archive - the connection relates to the registration set

$Recipes - the connection relates to the recipe group

$Loads - the connection relates to the recipe load history

source_ID

The data source ID - depending on the data_type parameter, this is the identifier of the registration set or recipe group.

variable_set_ID

Variable set ID. Set only when the view window with the values of variables for the variable set is to be displayed.

view_ID

The ID of the view associated in the AsBase module with the data source. This view specifies the records displaying method and may also contain information used to filter the data.

Examples

AsbaseShow( $Recipes, Setpoints, ””,V1 )

This action will display the data of the Setpoints recipe group in the AsBase module window. Displaying method and range of data are determined by the view of V1 ID defined in the AsBase module.

See also

- Application Parameterization > Operation with the AsBase Module


4.12 AsbaseUpdate

Home > Operator Actions > 4 Description of operator actions > 4.16 AsbaseUpdate

4.16 AsbaseUpdate

Intended use

This action changes the current record within the connection established earlier with the AsbaseOpen action. The new values​ of the record fields result from the values of the process variables of the variable set used in the connection.

Syntax

AsbaseUpdate (connection_ID)

Parameters

connection_ID

The identifier used earlier in the AsbaseOpen action should be specified in the parameter.

See also

- AsbaseOpen action

- Application Parameterization > Operation with the AsBase Module


AsbaseWait

Home > Operator Actions > 4 Description of operator actions > 4.17 AsbaseWait

4.17 AsbaseWait

Intended use

The action is waiting for the completion of previously called Asbase family actions ...

Operations ordered with the Asbase ... family actions are always performed in asynchronous mode. As a result, the execution of an operator action usually ends earlier than the execution of the operations ordered by that action. This can be a problem when using complex actions. If any actions require the end of operations performed by previous Asbase actions ... (e.g. they use variables set in the previous action), then in such a case the AsbaseWait action call should be added to the complex action.

Syntax

AsbaseWait ()


Ask

Home > Operator Actions > 4 Description of operator actions > 4.18 Ask

4.18 Ask

Intended use

Action for use in complex actions. It displays a message box with the query specified in the action parameter and two buttons: OK and Cancel. If the user selects the Cancel button, further execution of the complex action is interrupted.

Syntax

Ask (question)

Ask (question, waiting_time, default_value)

Parameters

question

The content of the query displayed in the message box.

waiting_time

The period of time in seconds after which the query window will close if the user does not select any response first. In the action variant without specifying the waiting time, the window remains open indefinitely.

default_value

Default query result (true / false), which will be used when the user chooses no answer.

Examples

Actions( Ask("Switch on the pump ?"),SetVariable(v1,1))

The operation of setting the variable v1 will be performed only when the user answers yes to the query.

See also

Complex Actions, Perform action, Actions action, Break action


AsreportDisplay

Home > Operator Actions > 4 Description of operator actions > 4.19 AsreportDisplay

4.19 AsreportDisplay

Intended use

The action is used to open the viewer of reports created in the Reporting Services technology with the use of the AsRaport module of Asix package. The window allows you to generate and view selected reports. Generation parameters can be set in action or set interactively.

The use of the action requires setting parameters for access to the report services server. These parameters are given in the Station Settings work panel in the Data sources tab.

In addition to the parameters provided directly in the action content, the accessibility of some functions of the browser window is also affected by the permissions (role) of the currently logged in user.

Syntax

AsreportDisplay (report_name, parameters,show_reports, X_coordinate, Y_coordinate, report_directory)

Parameters

report_name

The parameter is used to specify the name of the report which should be displayed in the browser window. The name must match the name of the report published on the server and may contain a relative path to the report directory. The parameter may be empty - the user will be able to select the report interactively.

parameters

The parameter is used to specify the values of the report generation parameters. The set of possible parameters results from the report definition. The parameter is in the form of text consisting of pairs of parameters_name = parameter_value separated by spaces, e.g. "@month=12 @section=A".

show_reports

Boolean parameter true / false, which determines whether to display the report parameter editing panel.

X_coordinate

The parameter specifies the X coordinate of the report viewer window (upper left corner).

Y_coordinate

The parameter specifies the Y coordinate of the report viewer window (upper left corner).

report_directory

The name of the subdirectory (or relative path of the subdirectory) on the report server whose contents (report names and subdirectories) should be placed in the report selection field of browser window. The value * means that all reports should be shown, and an empty value means that the report selection field will not be shown.


4.13 AstrendAsix6

Home > Operator Actions > 4 Description of operator actions > 4.20 AstrendAsix6

4.20 AstrendAsix6

Intended use

This action is used to control the AsTrend module operation. This is the exact equivalent for the AsTrend action of the Asix6 system. This action is used only for automatic conversion of application from the Asix6 system. In applications developed from scratch, the AstrendPrint and AstrendDisplay actions should be used.

Syntax

AstrendAsix6 (trend_name, start_time, X_coordinate, Y_coordinate, monitor, additional_parameters)

Parameters

trend_name

The file name with a trend definition. Entering the "?" character opens the window in which the user may select a trend to be displayed.

Using the trend file name it is possible to specify the variables that will be added to the chart of variables declared in the definition of the trend. If the variable names are separated by the character #, the variables will be added to the trend. If the variable names are separated by the character <, the variables will replace the ones included in the definition of the trend.

start_time

Specifying the start time for the trend displayed. This parameter may be an absolute time value in the form of yyyymmddhhnnss, sometimes in the OPC format or may be the process variable name. In a situation where the parameter is the name of a variable, its value is interpreted as the number of seconds elapsed since 1/1/1970 for numeric variables, and as the time in the form of yyyymmddhhnnss or OPC format for text variables. It is also possible to specify the trend start and end time, separating them by a semicolon.

X_coordinate

This parameter specifies the X coordinate (top left corner) for the AsTrend module window. The value of -1 means that the relevant coordinate is loaded from the trend definition.

Y_coordinate

This parameter specifies the Y coordinate (top left corner) for the AsTrend module window. The value of -1 means that the relevant coordinate is loaded from the trend definition.

monitor

This parameter specifies the number of monitor on which the AsTrend module window should be opened. The value of 0 relates to the monitor on which the cursor is currently positioned, -1 relates to the monitor resulting from the x, y coordinates specified.

additional_parameters

Additional action parameters in compliance with the description of the Asix6 system AsTrend action.

See also

- AsTrendDisplay , AsTrendPrint actions

- Application Parameterization > Operation with AsTrend Module


4.14 AstrendDisplay

Home > Operator Actions > 4 Description of operator actions > 4.21 AstrendDisplay

4.21 AstrendDisplay

Intended use

This action opens the AsTrend application window displaying the trend selected. The action may include the trend template and start time. Also the names of the trend variables may be optionally included.

Syntax

AstrendDisplay (trend_name, start_time, X_coordinate, Y_coordinate, monitor)

AstrendDisplay (trend_name, start_time, X_coordinate, Y_coordinate, monitor)

Parameters

trend_name

The file name with a trend definition. Entering the "?" character opens the window in which the user may select a trend to be displayed.

After the trend file name it is possible to specify the variables that will be added to the chart of variables declared in the definition of the trend. If the variable names are separated by the character #, the variables will be added to the trend. If the variable names are separated by the character <, the variables will replace the ones included in the definition of the trend.

start_time

Specifying the start time for the trend displayed. This parameter may be the DateTime value, an absolute time value in the form of yyyymmddhhnnss, time value in the OPC format or may be the process variable name. In a situation where the parameter is the name of a variable, its value is interpreted as the number of seconds elapsed since 1/1/1970 for numeric variables, and as the time in the form of yyyymmddhhnnss or OPC format for text variables.

end_time

Specifying the end time for the trend displayed. Specified in the same way as for the start time. If the parameter is not used, the length of the trend period results from the period defined in the trend definition file.

X_coordinate

This parameter specifies the X coordinate (top left corner) for the AsTrend module window. The value of -1 means that the relevant coordinate is loaded from the trend definition.

Y_coordinate

This parameter specifies the Y coordinate (top left corner) for the AsTrend module window. The value of -1 means that the relevant coordinate is loaded from the trend definition.

monitor

This parameter specifies the number of monitor on which the AsTrend module window should be opened. The value of 0 relates to the monitor on which the cursor is currently positioned, -1 relates to the monitor resulting from the x, y coordinates specified.

Examples

AstrendDisplay (“tr1.trnx#z1#z2”, start_variable ,””,””,””)

This actions displays the tr1.trnx trend. The variables declared in the trend file will be complemented with variables z1 and z2. The trend start time will be set based on the current value of the variable start_variable.

See also

- AsTrendPrint action

- Application Parameterization > Operation with AsTrend Module


4.15 AstrendPrint

Home > Operator Actions > 4 Description of operator actions > 4.22 AstrendPrint

4.22 AstrendPrint

Intended use

This action prints the trend selected with the AsTrend module displaying this trend. The action may include the trend template and start time. Also the names of variables displayed in the trend may be optionally included.

Syntax

AstrendPrint (trend_name, start_time, title, header, footer)

AstrendPrint (trend_name, start_time, end_time, title, header, footer)

Parameters

trend_name

The file name with a trend definition. Entering the "?" character opens the window in which the user may select a trend to be displayed.

Using the trend file name it is possible to specify the variables that will be added to the chart of variables declared in the definition of the trend. If the variable names are separated by the character #, the variables will be added to the trend. If the variable names are separated by the character <, the variables will replace the ones included in the definition of the trend.

start_time

Specifying the start time for the trend displayed. This parameter may be the DateTime value, an absolute time value in the form of yyyymmddhhnnss, time in the OPC format or may be the process variable name. In a situation where the parameter is the name of a variable, its value is interpreted as the number of seconds elapsed since 1/1/1970 for numeric variables, and as the time in the form of yyyymmddhhnnss or OPC format for text variables.

end_time

Specifying the end time for the trend displayed. Specified in the same way as for the start time. If the parameter is not used, the length of the trend period of time results from the period defined in the trend definition file.

title

This parameter specifies the new printout title, replacing the one included in the trend file.

header

This parameter specifies the new printout header, replacing the one included in the trend file.

footer

This parameter specifies the new printout footer, replacing the one included in the trend file.

Examples

AstrendPrint (tr1.trnx, ”NOW-1H” ,””,””,””)

This action prints the tr1.trnx trend with the default title, header and footer settings. The trend for the last hour is printed.

See also

- AsTrendDisplay action

- Application Parameterization > Operation with AsTrend Module


AstrendPrintToPdf

Home > Operator Actions > 4 Description of operator actions > 4.23 AstrendPrintToPdf

4.23 AstrendPrintToPdf

Intended use

The action is used to export a selected trend or report to a PDF file by means of the AsTrend program. The action is similar to the AstrendPrint trend printout. In the action, you can enter the name of the trend pattern (report) and the data start time. Optionally, you can enter the names of displayed variables used in the chart or report.

Syntax

AstrendPrint (trend_name, file_name, start_time, title, header, footer)

AstrendPrint (trend_name, file_name, start_time, end_time, title, header, footer)

Parameters

trend_name

The name of the file with the trend definition (report). Typing "?" opens a window where the user can select the trnx file.

After the file name, you can enter the names of variables that will be added to the chart (report).
If variable names are separated by # characters, the variables will be added. If variable names are separated by < signs, the variables will replace the variables included in the trend definition (report).

file_name

The name and path of the resulting file. If the path is not given, the file will be saved in the working directory of the application.

start_time

Defining the start time of the displayed data. The parameter can be a value of the DateTime type, absolute time in the form of yyyymmddhhnnss, sometimes in OPC format or the name of a process variable. If the parameter is a variable name, it is its the value is interpreted as the number of seconds since 1.1.1970 for variables with numerical values, and for text variables as the time in the form yyyymmddhhnnss or in OPC format.

end_time

Define the end time of the data. Served in the same way as for the start time.
If the parameter is not used, the length of the data period results from the range saved in the definition file.

title

The parameter defines a new print title, replacing the title defined in the trend file.

header

The parameter defines a new print header, replacing the header defined in the trend file.

footer

The parameter specifies a new printout footer text that replaces the footer defined in the trend file.

See also

- action AsTrendDisplay, AsTrendPrint

- Application Parameterization > 8. Operation with AsTrend Program


4.16 Break

Home > Operator Actions > 4 Description of operator actions > 4.24 Break

4.24 Break

Intended use

This action allows to conditionally break the currently running complex action. If the tested expression is of true value, the action will be interrupted. This action may also be used as one of the components of the action called Actions.

Syntax

Break (condition)

Parameters

condition

Logical condition, the value of which determines whether to stop execution of the complex action.

Examples

Break (Variable(v3)==0)

SetVariable ( v2, 0)

SetVariable ( v1, 0)

The control operation will be executed only if the current value of the variable v3 is not equal to 0.

See also

2 Complex Actions , Perform , Actions


4.17 CancelControls

Home > Operator Actions > 4 Description of operator actions > 4.25 CancelControls

4.25 CancelControls

Intended use

This action allows to cancel the selected pending control operations.

Some objects on the synoptic diagrams may be used in a delayed control mode. The CancelControls action restores normal operation mode for these objects and the control operations will not be executed.

Syntax

CancelControls(object_name)

Parameters

object_name

This parameter specifies the name of the objects for which the control operations are to be cancelled. The name may consists of special characters of the name templates, i.e. '*' and '?' .

The parameter may also be one of the following constants:

$All – the action applies to all objects in all windows and diagrams.

$AllVisible – the action applies to all objects in all visible windows. The window is visible when it is not hidden behind any other window.

$Window – the action applies to all objects in all diagrams of the current window (resulting from the context of the action use).

$Diagram – the action applies to all objects of the current diagram (resulting from the context of the action use).

Examples

CancelControls($Diagram)

All pending control operations on the active diagram (resulting from the context of use) will be aborted.

See also

- Techniques of Designing Diagrams > Organization of Control Operations

- SendControls action


4.18 ChangePassword

Home > Operator Actions > 4 Description of operator actions > 4.26 ChangePassword

4.26 ChangePassword

Intended use

This action displays a window used to change the password of the currently logged user. The password may also be changed in the object of Authorization field type embedded on the synoptic diagram.

Syntax

ChangePassword()

See also

- Application Parametrization > Permissions system

- Objects > Authorization Box Object


ClearSelection

Home > Operator Actions > 4 Description of operator actions > 4.27 ClearSelection

4.27 ClearSelection

Intended use

The action removes the selection from the currently selected diagram object.

Syntax

ClearSelection()


4.19 CloseWindow

Home > Operator Actions > 4 Description of operator actions > 4.28 CloseWindow

4.28 CloseWindow

Intended use

This action closes the opened synoptic windows. Closing of window groups based on the compliance with the name template is possible. Closing of windows may be limited to the selected monitor.

Syntax

CloseWindow (window_name, all)

CloseWindow (window_name, all, monitor)

Parameters

window_name

This parameter specifies the name of windows concerned by the action. You can specify the exact name or name template containing special characters '*' and '?'. The following rules apply to window searching:

  • if the name of the window is blank, only the window related to the context of use is closed - the window from which the CloseWindow action was executed.

  • if the name is specified, window searching is carried out ​​in the following order:

1 - context window

2 - active window

3 - remaining open windows

  • The application start-up windows can be closed only when the exact name of the window is specified.

all

If this parameter is false, only the first window meeting the conditions defined by parameters window_name and monitor is closed. If this parameter is true, all windows meeting the conditions are closed.

monitor

This parameter specifies the monitor the windows of which are to be closed. The following values of the parameter are available:

-1 - the action applies to all monitors.

0 - the windows of the monitor with the cursor on it are closed.

> 0 - the monitor number in accordance with the system numbering scheme - the action applies only to the specified monitor.

Examples

CloseWindow ( ”A*”, true, 0 )

This action closes all windows the names of which begin with an "A" and are located on the monitor pointed by the cursor.

See also

- OpenWindow , OpenDiagram , MinimizeWindow actions

- Techniques of Designing Diagrams > Rules for Opening and Closing Synoptic Windows


4.20 ConfirmRole

Home > Operator Actions > 4 Description of operator actions > 4.29 ConfirmRole

4.29 ConfirmRole

Intended use

This action is used to check whether the user is assigned the role being checked. The action is intended for use in complex actions. Depending on the mode the permissions of the currently logged user are checked or the login window is displayed, which forces the user identification upon the action execution.

The forced authorisation mode enables executing a complex action on the permissions of another user instead of those of the currently logged one. This action never causes a change of the currently logged user.

In the case of incorrect authentication or if no role is designated to the user, execution of the subsequent actions within the complex action is aborted.

This action may also be used as one of the components of the action called Actions.

Syntax

ConfirmRole(role_name, verification_mode)

Parameters

role_name

The role name, the assignment to which is verified.

verification_mode

This parameter specifies user permissions verification method. The following variants are possible:

$Always - confirmation of identity is required each time. Request for a user ID and password will be issued even if the currently logged user is assigned to the role being checked.

$Never - confirmation of identity is never executed. This action checks only whether the user is assigned to the role being checked.

$IfRequired – confirmation of identity will be executed only when the currently logged user is not assigned to the given role.

Examples

ConfirmRole (“SuperOperator”,$Never)

SetVariable ( v2, 0)

SetVariable ( v1, 0)

The control operations within the complex action will be executed only if the currently logged user is assigned to the SuperOperator role. The login window will not appear.

ConfirmRole (“SuperOperator”,$Always)

SetVariable ( v2, 0)

SetVariable ( v1, 0)

Regardless of the permissions of the currently logged user, the user verification proceeds. Proceeding to the next part of the action requires entering the ID and password of the user that is assigned to the SuperOperator role.

See also

- Application Parameterization >. Permissions System

- Techniques of Designing Diagrams > Controlling Permissions


CopyWindow

Home > Operator Actions > 4 Description of operator actions > 4.30 CopyWindow

4.30 CopyWindow

Intended use

The action serves to open a copy of the currently open synoptic window. A twin window is created for which the currently used diagram (including the current parameter values) is displayed in all panels.

Syntax

CopyWindow (window_name, X_coordinate, Y_coordinate)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window that is the object of the action is the window from which the action was used. If the name is given explicitly, then such a window must be currently open.

X_coordinate

The parameter determines the X coordinate of the window that opens (upper left corner). The parameter can be a direct numeric coordinate or one of the following constants:

$Default - the X coordinate results from the window definition.

$CursorLocation - the X coordinate determines the current position of the mouse cursor. The coordinate can be modified to prevent the window being opened partially extending beyond the monitor area.

$ActiveLocation - the X coordinate of the window being opened is identical to the X coordinate of the window that was active at the time the action was performed.

Y_coordinate

The parameter determines the Y coordinate of the window being opened (upper left corner). The rules for specifying the parameter are the same as for the X_ coordinate parameter.


DeactivateNote

Home > Operator Actions > 4 Description of operator actions > 4.31 DeactivateNote

4.31 DeactivateNote

Intended use

The action deactivates the last active note or all active operator notes from the indicated segment.

Syntax

DeactivateNotes(segment, all)

Parameters

segment

Name of the segment of operator notes. Acceptable wildcards '*' and '?'.

all

When False - only deactivates the last active note, while True - all active notes.

See also

- functions GetNote, IActiveNote

- actions AddNote, ShowNotes


4.21 EditPatterns

Home > Operator Actions > 4 Description of operator actions > 4.32 EditPatterns

4.32 EditPatterns

Intended use

Activates the model trend editor. The model trend editor activated with the EditPatterns action enables editing local curves only.

Syntax

EditPatterns()


EditTimetables

Home > Operator Actions > 4 Description of operator actions > 4.33 EditTimetables

4.33 EditTimetables

Intended use

The action opens the timetable cycles edition window. The window allows the operator to change the timetable execution cycles during the application execution. The action will be performed on condition that the currently logged in operator is authorized to edit the timetable cycles.

Syntax

EditTimetables ()

EditTimetables (timetable_ID)

Parameters

timetable_ID

The parameter defines the timetable whose cycles are to be edited. It is possible to use the special characters * and ?. This allows simultaneous editing of cycles for a group of timetables that meet the selection condition. In the action variant without specifying the timetable identifier, the cycles for all timetables are displayed and edited in the window.


4.22 EndAlarm

Home > Operator Actions > 4 Description of operator actions > 4.34 EndAlarm

4.34 EndAlarm

Intended use

This action notifies the alarm termination event. The alarm that is the object of the action must be part of an external or undefined strategy. An alternative method for the alarm termination is to use the Cancel function of IAlarm interface in the user script code.

Syntax

EndAlarm(domain_name, alarm_ID)

EndAlarm(alarm_ID, alarm_ID, parameter_1, …)

Parameters

domain_name

Name of the alarm domain related to the action. If the name is not provided, the action relates to the default domain (the first one).

alarm_ID

Alarm ID to be terminated.

parameter_1, …, parameter_n

Additional parameters are logged in the alarm log.

See also

- System of Alarms > Strategies of Alarm Detection

- Scripts > IAlarm interface

- StartAlarm action


4.23 ExcludeAlarm

Home > Operator Actions > 4 Description of operator actions > 4.35 ExcludeAlarm

4.35 ExcludeAlarm

Intended use

This action excludes the alarm from handling. If the alarm is excluded, subsequent events of the alarm start and end are ignored. The alarms may also be excluded with the use of the Active Alarms Viewer object.

Syntax

ExcludeAlarm(domain_name, alarm_ID)

Parameters

domain_name

Name of the alarm domain related to the action. If the name is blank, the action relates to the default domain (the first one).

alarm_ID

Alarm ID to be excluded.

See also

- System of Alarms

- Objects > Active Alarms Viewer object

- IncludeAlarm action


4.24 Execute

Home > Operator Actions > 4 Description of operator actions > 4.36 Execute

4.36 Execute

Intended use

This action executes another action specified in the call parameter. The action allows executing the actions defined in the variable definition database or created according to the application condition. In the latter case, the Execute action should be used only if the action type is not known in advance.

Syntax

Execute(action)

Parameters

action

Dynamically created content of the action to be executed.

Examples

Execute( Attribute(Action) )

In the above example, the action contents is loaded from the attribute Action of the contextual variable (the main variable of the object for which the Execute action was executed in response to an event).

Execute ( ”SetVariable (v1,” + Variable(v1)==0?1:0 )

In this case, the SetVariable action is created dynamically, the contents of which depends on the variable v1. Although the structure is correct, the simpler form acting the same way is recommended:

SetVariable (v1,Variable(v1)==0?1:0)

Execute (Variable(v1)==0? ”SetVariable (v1,1)”:”Nothing()“)

Depending on the value of variable v1, the SetVariable or Nothing action is executed. The same effect can be obtained with the Perform action:

Perform (Variable(v1)==0, SetVariable (v1,1), Nothing())

See also

Nothing , Perform actions


GetVarNames

Home > Operator Actions > 4 Description of operator actions > 4.37 GetVarNames

4.37 GetVarNames

Intended use

The action saves the names of variables used in objects located under the current mouse cursor position to the clipboard. The names of variables from the clipboard can then be used in AsTrend as a source of variable selection.

The variable names given in the variable name properties and the variables referenced by the property prefixes # and & are detected.

The action is typically used as the global keyboard shortcut execution action.

Syntax

GetVarNames ()


GisGoTo

Home > Operator Actions > 4 Description of operator actions > 4.38 GisGoTo

4.38 GisGoTo

Intended use

The action moves the center of the GIS diagram to the desired geographic coordinates and optionally sets the zoom factor.

Syntax

GisGoTo(window_name, panel_name, longitude, latitude)

GisGoTo(window_name, panel_name, longitude, latitude, zoom_factor)

Parameters

window_name

The name of the window in which the GIS diagram to which the action is performed is open. An empty name indicates references to the context window.

panel_name

Name of the panel in which the GIS diagram to which the action relates is opened.

An empty name indicates references to the context panel.

longitude

The longitude of the new position in the GIS diagram

latitude

The latitude of the new GIS diagram position

zoom_factor

The value of the new zoom factor (a number between 2 and 25).


GisHideLayer

Home > Operator Actions > 4 Description of operator actions > 4.39 GisHideLayer

4.39 GisHideLayer

Intended use

The action turns off the visibility of the indicated layer of the GIS diagram.

Syntax

GisHideLayer(window_name, panel_name, layer_name)

Parameters

window_name

Name of the window in which the GIS diagram to which the action applies. Empty name indicates references to the context window.

panel_name

Name of the panel in which the GIS diagram to which the action relates is opened. An empty name indicates references to the context pane.

layer_name

The name of the GIS diagram layer that will be hidden.


GisRefreshLayer

Home > Operator Actions > 4 Description of operator actions > 4.40 GisRefreshLayer

4.40 GisRefreshLayer

Intended use

The action for manually refreshing (reloading) the content of the GIS diagram layer.

Syntax

GisRefreshLayer(window_name, panel_name, layer_name)

Parameters

window_name

The name of the window in which the GIS diagram to which the action is performed is open. An empty name indicates references to the context window.

panel_name

The name of the panel in which the GIS diagram to which the action relates is opened.

An empty name indicates references to the context panel.

layer_name

The name of the GIS diagram layer to refresh.


GisShowLayer

Home > Operator Actions > 4 Description of operator actions > 4.41 GisShowLayer

4.41 GisShowLayer

Intended use

The action enables the visibility of the indicated layer of the GIS diagram.

Syntax

GisShowLayer(window_name, panel_name, layer_name)

Parameters

window_name

Name of the window in which the GIS diagram to which the action applies. Empty name indicates references to the context window.

panel_name

Name of the panel in which the GIS diagram to which the action relates is opened. An empty name indicates references to the context panel.

layer_name

The name of the GIS diagram layer that will be shown.


GisSwitchLayer

Home > Operator Actions > 4 Description of operator actions > 4.42 GisSwitchLayer

4.42 GisSwitchLayer

Intended use

The action toggles the visibility of the selected layer of the GIS diagram. If the layer is hidden, it will be shown. If it is shown, it will be hidden.

Syntax

GisSwitchLayer(window_name, panel_name, layer_name)

Parameters

window_name

Name of the window in which the GIS diagram to which the action applies. Empty name indicates references to the context window.

panel_name

Name of the panel in which the GIS diagram to which the action relates is opened. An empty name indicates references to the context panel.

layer_name

The name of the GIS diagram layer whose visibility will be toggled.


GisZoom

Home > Operator Actions > 4 Description of operator actions > 4.43 GisZoom

4.43 GisZoom

Intended use

The action sets the GIS diagram zoom factor to a given value.

Syntax

GisZoom(window_name, panel_name, zoom_factor)

Parameters

window_name

The name of the window in which the GIS diagram to which the action is performed is open. Empty name indicates references to the context window.

panel_name

The name of the panel in which the GIS diagram to which the action is performed is opened. An empty name indicates references to the context panel.

zoom_factor

The value of the new zoom factor (a number between 2 and 25).


GisZoomIn

Home > Operator Actions > 4 Description of operator actions > 4.44 GisZoomIn

4.44 GisZoomIn

Intended use

The action increases the magnification factor of the GIS diagram by a given value.

Syntax

GisZoomIn(window_name, panel_name, factor_change)

Parameters

window_name

The name of the window in which the GIS diagram to which the action is performed is open. Empty name indicates references to the context window.

panel_name

The name of the panel in which the GIS diagram to which the action is performed is opened. An empty name indicates references to the context panel.

factor_change

The amount by which the zoom factor will be increased.


GisZoomOut

Home > Operator Actions > 4 Description of operator actions > 4.45 GisZoomOut

4.45 GisZoomOut

Intended use

The action reduces the zoom factor of the GIS diagram by a given value.

Syntax

GisZoomOut(window_name, panel_name, factor_change)

Parameters

window_name

The name of the window in which the GIS diagram to which the action is performed is open. Empty name indicates references to the context window.

panel_name

The name of the panel in which the GIS diagram to which the action relates is opened. An empty name indicates references to the context panel.

factor_change

The amount by which the zoom factor will be reduced.


HidePanel

Home > Operator Actions > 4 Description of operator actions > 4.46 HidePanel

4.46 HidePanel

Intended use

The action hides the indicated or the current panel in the window.

Syntax

HidePanel()

HidePanel(panel_name)

HidePanel(window_name, panel_name)

Parameters

window_name

The name of the window where the panel is to be hidden.

panel_name

The name of the panel to be hidden.


IfAction

Home > Operator Actions > 4 Description of operator actions > 4.47 IfAction

4.47 IfAction

Intended use

The action assigned to the first condition that is true is performed. If none of the conditions are met, the default action (last argument) is performed.

Syntax

IfAction(Variable() < 20, SetVariable("Status", 1), Variable() > 80, SetVariable("Status", 2),SetVariable("Status", 0))Examples

If the value of the main variable is lower than 20, then the Status variable is set to 1, if the value of the main variable is higher than 80, then the Status variable is set to 2, in other cases the Status variable is set to 0.

See also

- SwitchAction, Perform


4.25 IncludeAlarm

Home > Operator Actions > 4 Description of operator actions > 4.48 IncludeAlarm

4.48 IncludeAlarm

Intended use

This action resumes handling of a previously excluded alarm. The alarms may also be excluded from handling with the use of the Active Alarms Viewer object.

Syntax

IncludeAlarm(domain_name, alarm_ID)

Parameters

domain_name

Name of the alarm domain related to the action. If the name is blank, the action relates to the default domain (the first one).

alarm_ID

Alarm ID with handling to be resumed.

See also

- System of Alarms

- Objects > Active Alarm Viewer object

- ExcludeAlarm action


4.26 Login

Home > Operator Actions > 4 Description of operator actions > 4.49 Login

4.49 Login

Intended use

This action displays a window used to log on the user. Other available login methods include:

  • The window of the control panel that can be opened in any application with the use of Ctrl-Shift-F1 keys

  • In the object of Authorization box type embedded on the synoptic diagram.

Syntax

Login()

See also

- Objects > Authorization box object

- Application Parameterization > Permissions System


4.27 Logout

Home > Operator Actions > 4 Description of operator actions > 4.50 Logout

4.50 Logout

Intended use

This acion logs current user out. Other available logout methods include:

  • The window of the control panel that can be opened in any application with the use of Ctrl-Shift-F1 keys

  • In the object of Authorization box type embedded on the synoptic diagram.

Syntax

Logout()

See also

- Objects > Authorization box object

- Application Parameterization > Permissions system


4.28 Message

Home > Operator Actions > 4 Description of operator actions > 4.51 Message

4.51 Message

Intended use

This action allows recording any message into the event log. The recorded messages are displayed in the message panel and in the objects of Log Viewer type.

Syntax

Message(message_typ, message_source, message_content)

Parameters

message_type

This parameter specifies the message priority. The following values are available:

$Info – information message

$Error – error message

$Warning – warning message

message_source

A short text identifying the source which has created the message.

message_contents

Any text included in the message.

Examples

Message($Info, ”Test”, ”Action executed for the user ” + Variable(CurrentUser))

The action records the information massage with information on the currently logged user into the Log Viewer.

See also

- Objects > Log Viewer object


MaximizeWindow

Home > Operator Actions > 4 Description of operator actions > 4.52 MaximizeWindow

4.52 MaximizeWindow

Intended use

The action is used to maximize the open synoptic windows. It is possible to maximize windows batch based on compliance with the name pattern. If the window is already maximized, the action restores its previous state.

Syntax

MaximizeWindow(window_name)

Parameters

window_name

The parameter specifies the name of the affected windows. You can specify an exact name or a name pattern containing the special characters * and?. When the window name is empty, only the window resulting from the context of use is maximized - the window from which the MaximizeWindow action was called.

Examples

MaximizeWindow("")

The action maximizes the window in the context it was used.

See also

- OpenWindow , CloseWindow , OpenDiagram, MinimizeWindow actions

- Techniques of Designing Diagrams > Rules for Opening and Closing Synoptic Windows


4.29 MinimizeWindow

Home > Operator Actions > 4 Description of operator actions > 4.53 MinimizeWindow

4.53 MinimizeWindow

Intended use

This action minimizes the opened synoptic windows. Minimizing of window groups based on the compliance with the name template is possible.

Syntax

MinimizeWindow(window_name)

Parameters

window_name

This parameter specifies the name of windows concerned by the action. You can specify the exact name or name template containing special characters '*' and '?'. If the name of the window is blank, only the window related to the context of use is minimized - the window from which the MinimizeWindow action was executed.

Examples

MinimizeWindow(””)

This action minimizes the window related to the context of the action use.

See also

- OpenWindow , CloseWindow , OpenDiagram actions

- Techniques of Designing Diagrams > Rules for Opening and Closing Synoptic Windows


NextDiagram

Home > Operator Actions > 4 Description of operator actions > 4.54 NextDiagram

4.54 NextDiagram

Intended use

The action is used to toggle the diagram in the selected panel of the synoptic window. Switching is based on the stored history of previously used diagrams. The action makes sense only if you previously used the PreviousDiagram action for the selected panel. The NextDiagram action displays the next diagram in history, reversing the PreviousDiagram action.

Syntax

PreviousDiagram (window_name, panel_name)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window being the action object is determined based on the context of use.

panel_name

Name of the panel where the diagram is to be switched. It can be empty, and then the panel which is the object of the action is determined based on the context of use.

See also

- action OpenWindow , action PreviousDiagram


4.30 Nothing

Home > Operator Actions > 4 Description of operator actions > 4.55 Nothing

4.55 Nothing

Intended use

This action does not perform any activities. Designed as a blank alternative in structures using the Perform and Execute actions.

Syntax

Nothing()

Examples

Perform ( HasRole(”SuperOperator”), SetVariable ( v, 0), Nothing())

If the logged-in user is assigned to the SuperOperator role, the control operation is executed. If not, then nothing will be done.

Execute( Attribute(Action) )

In the above example, the contents of the action is taken from the Action attribute of the contextual variable. If no operation should be performed for some variables, the Noting action must be used in the variable definition database.

See also

Execute , Perform actions


ObjectAction

Home > Operator Actions > 4 Description of operator actions > 4.56 ObjectAction

4.56 ObjectAction

Intended use

The action allows you to perform operations on selected diagram objects. The types of operations available depend on the type of selected objects.

Syntax

ObjectAction (object_name, operation_type, parameter1, parameter2, ...)

Parameters

object_name

The name of the objects on which the requested operation should be performed. You can use the characters '*' and '?' In the parameter.

When an action is used in the context of an object that is part of a pattern, searching for objects that match the given name typically applies only to objects of this pattern. The reference to an object that is not part of the pattern requires the prefix '!' to the object name.

operation_type

A constant that specifies the type of operation performed on the selected objects. The allowed set of operations depends on the type of objects.

The table below describes the types of operations available.

Drop-down list
$ColapseAll | All nodes in the list are collapsed.
$ExpandAll | Expands all list nodes.
$Reload | Recreate the list. It can be used to reread the list structure saved in a file.
Browser
$Reload | Reload the page.
$Print | Open the page print pane.
Asbase Table
$First | Go to the first line.
$Last | Go to the last line.
$Next | Go to the next line.
$NextPage | Go to the next page.
$Previous | Go to the previous line.
$PreviousPage | Go to the previous page.
$Download | Loading the selected recipe into the set of variables specified in the property Variables set for loading ID of the object. Operation allowed only for recipes.
$Reload | Reloading records from the database.
$Add | Adding a new record to the table. Adding a new record to the table. The record field values will be set based on the variable values from the set specified in the Variables set ID property.
$Delete | Delete active table record.
$Update | Change the field values of the active table record. The record field values will be set based on the variable values from the set specified in the Variables set ID property.
$Export | Save the table contents in a text file in CSV format.
Bar
$Decrease | Performs a control that sets the object control variable to a value less by a specified step from the current pointer position. The step size is determined by the first additional parameter of the action.
$Increase | Performs control that sets the object control variable to a value that is greater by a given step than the current pointer position. The step size is determined by the first additional parameter of the action.
Variable Table
$Export | Save the table contents in a text file in CSV format.
Text
$Decrease | Performs a control that sets the object control variable to a value less by a specified step from the current pointer position. The step size is determined by the first additional parameter of the action.
$Increase | Performs control that sets the object control variable to a value that is greater by a given step than the current pointer position. The step size is determined by the first additional parameter of the action.
Chart
$SetTimeRange | Opens the timeline range selection box.
$ZoomInX | Increase accuracy in the timeline.
$ZoomOutX | Decrease accuracy in timeline.
$ZoomInY | Increase the accuracy in the value axis.
$ZoomOutY | Decrease in accuracy in the value axis.
$MoveLeft | Move the graph to the left.
$MoveRight | Move the chart to the right.
$PageLeft | Move the chart left one page.
$PageRight | Move the chart right one page.
$MoveUp | Move the graph up.
$MoveDown | Move the chart down.
$PageUp | Move the chart up one page.
$PageDown | Move the chart down one page.
$CursorLeft | Move cursor left.
$CursorRight | Move cursor right.
$CursorUp | Move cursor up.
$CursorDown | Move cursor down.
$ResetX | Reset the X axis to the initial settings.
$ResetY | Reset the Y axis to the initial settings.
$Reset | Reset the X and Y axes to the initial settings.
$CenterCursor | Positioning the cursor in the middle of the graph.
$SwitchCursor | Enable / disable the cursor.
$Legend | Display the chart legend.
$Help | Display the help window.

parameter1, ..., parameterN

Values of parameters of operations performed on objects. The number and form of parameters used in the call must be compatible with the selected type of operation.


OPCTime

Home > Operator Actions > 4 Description of operator actions > 4.57 OPCTime

4.57 OPCTime

Intended use

The function creates a date and time value calculated in relation to the current moment or any other moment in time. The shift is described by an extended OPC format expression.

Syntax

OPCTime (base_moment, time_shift)

OPCTime (time_shift)

Parameters

base_moment

The moment of time against which the shift is calculated. In the case of the calling variant without the base moment, the shift is calculated in relation to the current moment.

time_shift

Specifies a base modification to compute the function result. The shift is described with an extended OPC format expression of the form:

[NOW|SECOND|MINUTE|HOUR|DAY|WEEK|MONTH|YEAR][cycle[/shift]] [[+|-][liczba][Y|MO|W|D|H|M|S]...]

The first part of the expression specifies the initial offset, eg NOW means exactly the base point, HOUR the beginning of the hour. The cycle and shift clauses allow for the implementation of cycles, e.g. HOUR8 / 6 allows for the computation of the beginning of an 8-hour shift, where the first shift starts at 8 o'clock. The final part of the expression allows you to additionally shift the time, eg HOUR-15M, means 15 minutes before the beginning of the hour.

Example

The examples below assume that the base moment (declared explicitly or by default) is 2011//05/09 11:06:30

NOW (or empty) 2011//05/09 11:06:30

NOW-1H 2011//05/09 10:06:30

HOUR 2011//05/09 11:00:00

HOUR8/6 2011//05/09 06:00:00

DAY+12H+15M 2011//05/09 12:15:00

MONTH-1D 2011//04/30 00:00:00


4.31 OpenDiagram

Home > Operator Actions > 4 Description of operator actions > 4.58 OpenDiagram

4.58 OpenDiagram

Intended use

This action allows to open the diagram in a dynamically, newly created window. If the diagram with the same name and identical set of parameters is already opened, the activation of a previously created window just occurs.

Syntax

OpenDiagram (diagram_name, parameters, title, opening_mode, X_coordinate, Y_coordinate, attributes, replacement_mode)

Parameters

diagram_name

This parameter specifies the name of the diagram to be displayed.

parameters

This parameter transfers the relevant parameter data to the diagram being opened. The set of parameters allowed depends on the definition of the diagram. The parameters are given as a sequence of pairs parameter_name = parameter_value separated by a semicolon, e.g.

Colour=Red;Variable=v1

title

This parameter specifies the text to be displayed on the window title bar.

opening_mode

This parameter specifies the behaviour of the window after opening. The possible values include one of the below:

$Normal – standard window

$ Dialog - dialogue box, switching to other open windows is disabled until the dialogue box is closed

$ Temp - temporary window, upon switching to any other window, the temporary windows will be closed

X_coordinate

This parameter specifies the window X coordinate (top left corner). The parameter may be a numerical value or one of the following constants:

&CursorLocation – X coordinate defines the current position of the cursor. The coordinate may be modified in order to prevent the window being opened from moving outside the monitor screen area.

& ActiveLocation - X coordinate of the window being opened is the same as the X coordinate of the window that was active upon the action execution.

Y_coordinate

This parameter specifies the X coordinate of the window being created (top left corner). The rules for providing the parameter are the same as for the X_coordinate parameter.

attributes

This parameter defines the layout of the window being created. The value of this parameter is a text string consisting of the following attribute names separated by a semicolon.

Noframe – the window will have no frame.

NoTitleBar– the window will have no title bar.

NoButtons – the window title bar will not display the system buttons.

NoMinButton – the title bar will not display the minimize button.

NoMaxButton– the title bar will not display the maximize button.

FixedSize – the window size will be fixed.

ToolWindow – the window layout will be similar to the system tool window (amongst others, the title bar height will be smaller).

TopMost – the window will be displayed as "always on top", i.e. the window will always be on the top of standard windows.

NoTaskBar – the window will not be displayed on the system task bar.

Maximized – the window will be displayed in full screen mode, according to the x and y coordinates.

Center - the window will be positioned in the centre of the monitor screen, according to the x and y coordinates.

replacement_mode

This parameter determines the additional actions which are undertaken when the window is opened. The possible values are one of the below constants:

$ None – no additional operations are to be performed.

$ Closable – all opened windows which have no closing interlock and are located on the screen of the newly opened window will be closed.

$ ExceptCurrent – all opened windows which have no closing interlock and are located on the screen of the newly opened window will be closed, except the window being active upon the action execution.

Examples

OpenDiagram ( diag1,”room=11”, null, $Dialog, $CursorLocation, $CursorLocation, “NoTitleBar,FixedSize”, $None )

This action opens the diag1 diagram inside the new window and transfers the room parameter value into it. This window is of dialogue type and its position is determined by the current cursor position. The title bar is not shown, and the window cannot change its size. Every other window of the application stays opened.

See also

- OpenWindow , CloseWindow , MinimizeWindow actions

- Techniques of Designing Diagrams > Rules for Opening and Closing Synoptic Windows


4.32 OpenWindow

Home > Operator Actions > 4 Description of operator actions > 4.59 OpenWindow

4.59 OpenWindow

Intended use

This actions is used to open predefined synoptic windows or to replace the diagrams displayed in the window panels. This is the basic action used to create a navigation scheme for the application.

Syntax

OpenWindow (window name, panel_name, diagram_name, parameters, new_window, X_coordinate, Y, replacement_mode)

OpenWindow (window name, panel_name, diagram_name, parameters, new_window)

OpenWindow (window name, panel_name, diagram_name, parameters)

Parameters

window_name

The name of the window associated with the action. It may be blank - then the window being the action object is determined by the context of use. For details, see Section Algorithm.

panel_name

The panel name, inside of which the diagram is to be opened. It may be blank - then the panel being the action object is determined by the context of use. For details, see Section Algorithm.

diagram_name

The name of the diagram associated with the action. It may be blank - then the action only opens the window leaving the diagram unchanged or opens the window with the default panel diagrams. For details, see Section Algorithm.

parameters

This parameter transfers the relevant parameter values to the diagram being opened. The set of parameters allowed depends on the definition of the diagram. The parameters are given as a sequence of pairs parameter_name = parameter_value separated by a semicolon, e.g.

Colour=Red;Variable=v1

new_window

The boolean true/false parameter which determines whether the new window should be created or not. For details, see Section Algorithm.

X_coordinate

This parameter specifies the X coordinate of the window being opened (top left corner). The parameter may be a numerical value or one of the following constants:

$ Default - the X coordinate results from the window definition or (for a window already opened) it is the current position. This is the default value when the action without X_coordinate parameter is used.

&CursorLocation – X coordinate defines the current position of the cursor. The coordinate may be modified in order to prevent the window being opened from moving outside the monitor screen area.

& ActiveLocation - X coordinate of the window being opened is the same as the X coordinate of the window that was active upon the action execution.

Y_coordinate

This parameter specifies the Y coordinate of the window being opened (top left corner). The rules for providing the parameter are the same as for the X_coordinate parameter.

replacement_mode

This parameter determines the additional actions which are undertaken when the window is opened. The possible values include one of the below:

$ None – no additional operations are to be performed (default value).

$ Closable – all opened windows which are not blocked against closing and are located on the screen of the newly opened window will be closed.

$ ExceptCurrent – all opened windows which are not blocked against closing and are located on the screen of the newly opened window will be closed, except the window being active upon the action execution.

Algorithm

1. If the diagram name is not specified:

  • If the window name is not specified either, the action object is the window associated with the context of use or the current window.

  • If the window name is specified and the new_window parameter is equal to true, the new window of the name specified including default diagrams is opened.

  • If the window name is specified and the new_window parameter is equal to false, the window of the name specified is searched between the currently opened windows (starting from the active one). If such a window is found, then it becomes the object of the action. If not, the new window of the name specified including default diagrams is opened.

2. If the diagram name is specified:

  • If the window name is not specified, the specified diagram is opened inside the context window (according to the place of the OpenWindow action execution) and inside the specified panel (or context panel).

  • If the window name is specified, it is checked whether the window with already opened diagram specified in the action call, with identical parameter set (in the order of search: context window, current window, other windows) is amongst the currently opened windows . If such a window is found, then it becomes the active window.

  • If in the procedure described above the relevant window is not found, and the new_window parameter is equal to false, the window with the specified name is searched amongst the currently opened windows (in the order of search: context window, current window, other windows). If such a window is found, the specified diagram is opened inside the panel indicated by the action contents. If the window is not found or the new_window parameter is equal to true, the new window of the name specified is opened. The specified diagram is opened inside the panel indicated by the action contents, and the default diagrams are opened inside other panels.

3. In any case, if the window being the action object is determined successfully, this windows becomes the active one, suitable correction of the window position is carried out, if necessary, and the windows indicated by the replacement_mode parameter are closed.

Examples

OpenWindow (start, scheme, engine, variable=s1)

If the window named start is already opened, the diagram engine along with the variable = s1 parameters will be opened inside the scheme panel. If such a diagram with the same parameters is already opened, only window activation occurs.

If the window called start is not already opened, it will be opened now. The diagram engine along with the variable = s1 parameters will be opened inside the scheme panel. The default diagrams will be opened inside the other panels.

OpenWindow ( null, scheme, engine, variable=s1, false, $Default, $Default, $Closable)

The diagram engine along with the variable = s1 parameters will be opened inside the scheme panel of the context window. The window position remains unchanged. In addition, all windows not blocked against closing will be closed.

See also

- OpenDiagram , CloseWindow , MinimizeWindow actions

- Techniques of Designing Diagrams > Rules for Opening and Closing Synoptic Windows


4.33 Perform

Home > Operator Actions > 4 Description of operator actions > 4.60 Perform

4.60 Perform

Intended use

This action enables checking the logical condition, and depending on its value, executing one of the two actions. The Perform action in some cases can replace the complex actions associated with the Break structure.

Syntax

Perform(condition, action_if_true, action_if_false)

Parameters

condition

A conditional expression, the value of which decides which of component actions is to be executed.

action_if_true

The action to be executed if the condition parameter is true.

action_if_false

The action to be executed if the condition parameter is false.

Examples

Perform ( Variable(ActiveZone)==1, SetVariable(Zone1,0), PlaySound(MustNot) )

If the ActiveZone variable is equal to 1, the Zone1 variable will be set to 0. Otherwise the sound called MustNot will be played.

See also

-2 Complex Actions , Break action


4.34 PlaySound

Home > Operator Actions > 4 Description of operator actions > 4.61 PlaySound

4.61 PlaySound

Intended use

The action plays the selected sound signal once. The sound signal must be previously added to the application sound set.

Syntax

PlaySound(sound_name)

Parameters

sound_name

The name of the sound signal to be played.

Examples

PlaySound(alert)

This action plays once a sound file declared in the sound set under the name alert.

See also

- System of Alarms > Sound Signaling

- PlaySoundLooping , StopSound actions


4.35 PlaySoundLooping

Home > Operator Actions > 4 Description of operator actions > 4.62 PlaySoundLooping

4.62 PlaySoundLooping

Intended use

The action plays the selected sound signal in loop mode. The sound signal is played in a loop until the StopSound action is executed or another sound signal starts to play.

The sound signal must be previously added to the application sound set.

Syntax

PlaySoundLooping(sound_name)

Parameters

sound_name

The name of the sound signal to be played.

Examples

PlaySoundLooping(alert)

This action plays in a loop mode a sound file declared in the sound set under the name alert.

See also

- System of Alarms > Sound Signaling

- PlaySound , StopSound actions


PowerGuardManager

Home > Operator Actions > 4 Description of operator actions > 4.63 PowerGuardManager

4.63 PowerGuardManager

Intended use

The action opens the management window of the Power Guardian module.

Syntax

PowerGuardManager ()


PowerGuardMeter

Home > Operator Actions > 4 Description of operator actions > 4.64 PowerGuardMeter

4.64 PowerGuardMeter

Intended use

The action is used to open the graph window of the Power Guard module.

Syntax

PowerGuardMeter (ID)

Parameters

ID

Identifier of the Power Guard meter for which the Graph window should be opened.


PreviousDiagram

Home > Operator Actions > 4 Description of operator actions > 4.65 PreviousDiagram

4.65 PreviousDiagram

Intended use

The action is used to toggle the diagram in the selected panel of the synoptic window. Switching is based on the stored history of previously used diagrams. It is selected the previously displayed diagram. The subsequent execution of the action causes deeper and deeper backwards in the history of diagrams.

Syntax

PreviousDiagram (window_name, panel_name)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window being the action object is determined based on the context of use.

panel_name

The name of the window the action applies to. It can be empty, and then the window being the action object is determined based on the context of use..

See also

- action OpenWindow, action NextDiagram


4.36 PrintScreen

Home > Operator Actions > 4 Description of operator actions > 4.66 PrintScreen

4.66 PrintScreen

Intended use

This action captures a picture of a selected area of the screen. It is possible to capture the active window or diagram. It is also possible to capture full screen. The captured picture is copied to the system clipboard or saved to a file. If the picture is saved to a file, the file format is png and it is saved in the Screenshots subdirectory of the application current working directory. The file name is generated automatically based on the current time and type of the picture captured.

Syntax

PrintScreen (area, save_to_file)

Parameters

area

This parameter defines the screen area to be captured. The following constants are available:

$ Diagram - an active diagram area will be captured.

$ Screen - a full area of the screen on which cursor is located will be captured.

$ Window - an active window area will be captured.

save_to_file

The boolean true/false parameter, which determines whether the picture should be saved to a file or not. The false value means that the picture will be copied only to the system clipboard.

Examples

PrintScreen($Window, true)

The captured picture of the active window area will be saved to a file in the Screenshots subdirectory of the application current working directory.


PulseBit

Home > Operator Actions > 4 Description of operator actions > 4.67 PulseBit

4.67 PulseBit

Intended use

The action allows you to set the currently indicated bit of a variable.

Action execution is controlled by the authorization system.

Syntax

PulseBit(variable_name, bit_number, duration)

Parameters

variable_name

The name of the process variable to which the control should be sent. An empty name means the use of an object controlled variable resulting from the context of the action usage. Suffix notation of the variable name with respect to the main variable of the object resulting from the context is possible.

bit_number

The bit number (the youngest is 0) which we want to temporarily set.

duration

Time after which the bit value will be reset to zero - pulse duration [ms]. The maximum value is 10,000 ms.

Examples

PulseBit("",2, 2000)

The third bit of the controlled variable of the object under which the action is performed will be set to 1, and set back to 0 after 2 seconds.

See also

- Techniques of Diagram Creation > Organization of Control Operations


4.37 RefreshVariable

Home > Operator Actions > 4 Description of operator actions > 4.68 RefreshVariable

4.68 RefreshVariable

Intended use

This action enables forcing the variable value readout beyond the period of its planned cyclic refreshing according to the definition.

Syntax

RefreshVariable(variable_name)

Parameters

variable_name

The name of the process variable the value of which is to be refreshed. A blank name indicates the use of the main variable of the object related to the context of use. Suffix notation of the variable name in relation to the main variable of the context object is possible.

Examples

RefreshVariable (””)

This action forces refreshing the main variable value of the object for which the action is executed.


RemoveAppData

Home > Operator Actions > 4 Description of operator actions > 4.69 RemoveAppData

4.69 RemoveAppData

Intended use

Deletes application data.

Syntax

RemoveAppData(data_name)

Parameters

data_name

Application data name


ReportGenerate

Home > Operator Actions > 4 Description of operator actions > 4.70 ReportGenerate

4.70 ReportGenerate

Intended use

The action is used to generate the report content and / or display it. It is an alternative to manually handling the report via the report management window.

Syntax

ReportGenerate(id_report, report_data, generation_options)

Parameters

id_report

ID of the report, the content of which should be generated / displayed.

report_data

Date of the day for which the report should be generated. It is possible to pass a value of the DateTime type, a text date or a text date of the OPC type (see description of the OPCTime function).

generation_options

A constant that specifies the details of an action. Possible values:

$Display - the report is computed and then displayed

$DisplayOnly - the report is only displayed (it is assumed to have been generated earlier)

In the variant of calling the action without specifying the generation_options parameter, the report is only generated (without displaying).

Examples

ReportGenerate(DailyReport, "NOW”, $Display)

The action generates the content of the report with the identifier DailyReport for today. After generating, the content of the report will be displayed.


ReportsManager

Home > Operator Actions > 4 Description of operator actions > 4.71 ReportsManager

4.71 ReportsManager

Intended use

The action opens the script reports management window.

Syntax

ReportsManager ()


ResetGlobalPropery

Home > Operator Actions > 4 Description of operator actions > 4.72 ResetGlobalPropery

4.72 ResetGlobalPropery

Intended use

The action sets the value of the global property as it was originally defined. Thus, it removes the effects of an earlier use of the SetGlobalProperty action.

Syntax

ResetGlobalProperty(property_name)

Parameters

property_name

The name of the global property whose value should be reset.


ResetWindows

Home > Operator Actions > 4 Description of operator actions > 4.73 ResetWindows

4.73 ResetWindows

Intended use

The action restores the start windows in the default position and size and closes the remaining windows.

Syntax

ResetWindows ()


Restart

Home > Operator Actions > 4 Description of operator actions > 4.74 Restart

4.74 Restart

Intended use

The action performs a full restart of the application: the currently executing application is exited and then restarted. Performing the action requires permission to close the application.

Syntax

Restart ()


4.38 Run

Home > Operator Actions > 4 Description of operator actions > 4.75 Run

4.75 Run

Intended use

This action is used to run an external application. The program directly specified in the parameters may be run or system association of programs with file name extensions may be used.

Syntax

Run(file_name)

Run(file_name, arguments)

Parameters

file_name

This parameter specifies the program to be run. This may be an exe file name or data file name. In the second case, the program associated within an operating system with the data file type will be run.

Searching procedure for an exe program is based on the system program path.

arguments

Text string of arguments transferred to the program being run. The format and meaning of the parameter is specific to the program.

Examples

Run(”pdffiles\plan.pdf”)

The pdf file browser declared within the system will be launched and plan.pdf file from the pdffiles subdirectory of the application directory will be opened.


4.39 Script

Home > Operator Actions > 4 Description of operator actions > 4.76 Script

4.76 Script

Intended use

This action is used to run a user script.

Syntax

Script(name, parameter1, parameter2, ...)

Parameters

name

User script name.

parameter1, …, parameterN

Values of script parameters. The number and form of the parameters used in the call must be in accordance with the requirements of the script.

Examples

Script( CalculateConsumption, v1 )

The action runs a script named CalculateConsumption, transferring to it a single parameter of the value of v1.

See also

- Scripts


ScriptClose

Home > Operator Actions > 4 Description of operator actions > 4.77 ScriptClose

4.77 ScriptClose

Intended use

The action is used to end the running of the user script. The script that must be terminated is identified by the name and the set of parameters with which it was run. The action terminates all scripts matching the calling parameters.

Syntax

ScriptClose(name, parameter1, parameter2, ...)

Parameters

name

The name of the user's script.

parameter1, ..., parameterN

Script parameter values. The number and form of parameters used in the call. It must be compatible with the parameters used when the script was run.

Examples

Perform(IsScriptWorking(S1),ScriptClose(S1),Nothing())

The action ends the script named S1 that had been run earlier without specifying any parameters.
Additionally, the use of the IsScriptWorking function is shown, which allows you to check whether such a script is running.

See also

- Scripts


ScriptRestart

Home > Operator Actions > 4 Description of operator actions > 4.78 ScriptRestart

4.78 ScriptRestart

Intended use

The action is used to restart (end and restart) the work of the previously run user script. The script that needs to be restarted is identified by the name and the set of parameters with which it was run. The action applies to all scripts matching the calling parameters.

Syntax

ScriptRestart(name, parameter1, parameter2,...)

Parameters

name

The name of the user's script.

parameter1, ..., parameterN

Script parameter values. The number and form of parameters used in the call. It must be compatible with the parameters used when the script was run.

See also

- Scripts


4.40 SecurityBrowser

Home > Operator Actions > 4 Description of operator actions > 4.79 SecurityBrowser

4.79 SecurityBrowser

Intended use

This action opens a dialogue box for viewing log files collected by the security system. The use of the action makes sense only if the security system is operating in the central mode. The access to the security system logs may be restricted according to the user permissions and the Asix system licence held.

Syntax

SecuritBrowser(log_type)

Parameters

log_type

This parameter specifies the log type, the contents of which must be shown at the window opening. The user can interactively switch to other types of logs.

The parameter may also be one of the following constants:

$ Messages - switch to the log of the security system messages

$ Controls - switch to the log of the completed control operations

$ actions - switch to the log of the operations carried out by the operator

$Notes - switch to the log of the operator's notes

See also

- Application Parameterization > Permissions System


4.41 SecurityManager

Home > Operator Actions > 4 Description of operator actions > 4.80 SecurityManager

4.80 SecurityManager

Intended use

This action opens a dialogue box for managing user permissions while the application is running.

Syntax

SecurityManager()

See also

- Application Parameterization > Permissions System


SelectPattern

Home > Operator Actions > 4 Description of operator actions > 4.81 SelectPattern

4.81 SelectPattern

Intended use

The action allows the interactive selection of the reference curve. The name of the selected curve is written to the process variable specified in the action call.

Syntax

SelectPattern(variable_name)

SelectPattern(variable_name, name_filter)

Parameters

variable_name

The name of the process variable to which the name of the pattern curve should be sent. An empty name means the use of an object controlled variable resulting from the context of the action usage. Suffix notation of the variable name with respect to the main variable of the object resulting from the context is possible.

name_filter

Filtr nazw przebiegów wzorcowych, które należy wyświetlić w oknie wyboru zmiennej. W filtrze należy stosować znaki dzikich kart * i ?. W wariancie akcji bez parametru filtr_nazwy w oknie wyboru wyświetlane są nazwy wszystkich zdefiniowanych krzywych wzorcowych.

Filter of pattern trend names to be displayed in the variable selection window.
Wildcards * and ? should be used in the filter. In the action variant without the name_filter parameter, the names of all defined pattern curves are displayed in the selection window.


4.42 SendControls

Home > Operator Actions > 4 Description of operator actions > 4.82 SendControls

4.82 SendControls

Intended use

Some objects on the synoptic diagrams may be used in a delayed control mode. The SendControls action makes these objects perform pending control operations.

Syntax

SendControls(object_name)

Parameters

object_name

This parameter specifies the name of the objects for which control operations are to be performed. The name may consists of special characters of the name templates, i.e. '*' and '?' .

The parameter may also be one of the following constants:

$All – the action applies to all objects in all windows and diagrams.

$AllVisible – the action applies to all objects in all visible windows. The window is visible when it is not hidden behind any other window.

$Window – the action applies to all objects in all diagrams of the current window (resulting from the context of the action use).

$Diagram – the action applies to all objects of the current diagram (resulting from the context of the action use).

Examples

SendControls($Window)

All pending control operations on the active window (resulting from the context of use) will be performed.

See also

- Techniques of Designing Diagrams > Organization of Control Operations

- CancelControls action


SetAppData

Home > Operator Actions > 4 Description of operator actions > 4.83 SetAppData

4.83 SetAppData

Intended use

The action allows you to set or change the value of an application data. If the application data with the given name does not exist, it will be created. Application data is only available locally within one application station. An application data value can be a scalar (e.g., a single number), an array, a table, a collection, or some other object complex. Application data can be used to exchange any data between scripts or different modules or parts of the application.

Syntax

SetAppData(data_name, value)

Parameters

data_name

Application data name

value

Value of the application data

Examples

SetAppData("Data1", 10)

Save number 10 as application data value.

SetAppData("Data2", ToTable(13,45,67,34))

Save an array of four numbers as application data value.


4.43 SetBounds

Home > Operator Actions > 4 Description of operator actions > 4.84 SetBounds

4.84 SetBounds

Intended use

This action allows to change the location and size of the selected element of the diagram. It is used for move and size change animation of the objects on the diagram. More information and examples of use may be found in the SetPosition action description.

Syntax

SetBounds (object_name, X_coordinate, Y_coordinate, width, height)

SetBounds (X_coordinate, Y_coordinate, width, height)

Parameters

object_name

The name of the element, the location and size of which is to be changed. The action variant containing no name relates to a change of the context element (object, template or group) location and size. The parameter can contain the characters '*' and '?'.

If the action has been used in the context of the object being part of the template, the searching the objects relating to the name specified applies only to objects of this template. Reference to the object which is not part of the template requires adding the prefix '!' to the object name.

X_coordinate

The new value of the controlled element X coordinate expressed in absolute units.

Y_coordinate

The new value of the controlled element Y coordinate expressed in absolute units.

width

The new width of the controlled element expressed in absolute units.

height

The new height of the controlled element expressed in absolute units.

See also

- Techniques of Designing Diagrams > Motion Animation and Resizing of Objects

- SetPosition , SetSize actions


SetGlobalProperty

Home > Operator Actions > 4 Description of operator actions > 4.85 SetGlobalProperty

4.85 SetGlobalProperty

Intended use

The action allows you to change the value of a global property (only for local station). The change will be saved - when the application is restarted, the property will still have the changed value. Return to the original definition requires the use of the ResetGlobalProperty action.

Syntax

SetGlobalProperty(property_name, value)

Parameters

property_name

The name of the global property the value of which should be changed.

value

The new value of the global property.


SetParameter

Home > Operator Actions > 4 Description of operator actions > 4.86 SetParameter

4.86 SetParameter

Intended use

The action allows you to change the value of the indicated parameter of the context diagram.

Syntax

SetParameter (parameter_name, parameter_value)

Parameters

parameter_name

Name of the diagram parameter the value of which should be changed.

parameter_value

The new value of the parameter.


SetParameters

Home > Operator Actions > 4 Description of operator actions > 4.87 SetParameters

4.87 SetParameters

Intended use

The action allows you to change the value of the context diagram parameters.

Syntax

SetParameters (parameters)

Parameters

parameters

The parameter specifies new parameter values. The parameters are given as a sequence of parameter_name = parameter_value separated by a semicolon, e.g.

Color=Red;Variable=v1


4.44 SetPosition

Home > Operator Actions > 4 Description of operator actions > 4.88 SetPosition

4.88 SetPosition

Intended use

This action allows to change the location and size of the selected element of the diagram. It is used for motion animation of the objects on the diagram. This action is typically used within the Animation event handling for the object, template or group. The position parameters transferred to the function must be expressed in absolute coordinates (0 to 1 000 000, absolute coordinate 1 000 000 corresponds to the right edge of the diagram). If relative coordinates (pixels) are used, the appropriate conversion has to be done with the use of the RelToAbsX and RelToAbsY functions.

Syntax

SetPosition (object_name, X_coordinate, Y_coordinate)

SetPosition (X_coordinate, Y_coordinate)

Parameters

object_name

The name of the element, the position of which is to be changed. The action variant containing no name relates to the change of the context element (object, template or group) position. The parameter can contain the characters '*' and '?'.

If the action has been used in the context of the object being part of the template, the searching of the objects relating to the name specified applies only to objects of this template. Reference to the object which is not part of the template requires adding the prefix '!' to the object name.

X_coordinate

The new value of the controlled element X coordinate expressed in absolute units.

Y_coordinate

The new value of the controlled element Y coordinate expressed in absolute units.

Example

SetPosition( RelToAbsX(100+Variable(pos)),””)

Only the X coordinate of the diagram element is changed. The variable pos contains the position data in form of pixel coordinates. After adding the offset of position (value 100 that determines change of the X coordinate of the diagram element position), the conversion to absolute coordinates is performed.

See also

- Techniques of Designing Diagrams > Motion Animation and Resizing of Objects

- SetBounds , SetSize actions

- Expressions and Functions > RelToAbsX function

- Expressions and Functions > RelToAbsY function


4.45 SetProperty

Home > Operator Actions > 4 Description of operator actions > 4.89 SetProperty

4.89 SetProperty

Intended use

The action allows setting of any property of the selected object or diagram. This allows to control the appearance/ behaviour of the application.

Syntax

SetProperty (object_name, property_name, value)

SetProperty (property_name, value)

Parameters

object_name

The name of the object, the property of which is to be changed. If the name is not specified, the action applies to the context element (object, template, group or diagram) property change. The parameter can contain the characters '*' and '?'.

If the action has been used in the context of the object being part of the template, the searching the objects relating to the name specified applies only to objects of this template. Reference to the object which is not part of the template requires adding the prefix '!' to the object name.

property_name

The name of the property to be changed. The names of internal properties should be used. The simplest way to insert the correct name of the property into the action contents is to use the Local Properties command from the action editor menu.

value

The new value of the property being changed

Examples

SetProperty(Temp,MainVar,block1Temp)

This action changes the main variable of the object named Temp to block1Temp. This results in switching the object to display the status of the new process variable.


SetSelection

Home > Operator Actions > 4 Description of operator actions > 4.90 SetSelection

4.90 SetSelection

Intended use

The action is used to force the transition to the selection state for a given diagram object.
It may also result in entering the editing state when the object is set to the automatic transition to editing mode after selection.

The action used in the diagram opening event allows you to create parameter setting forms with automatic start of entering the settings.

Syntax

SetSelection (object_name)

Parameters

object_name

Name of the object that should be selected.

When an action is used in the context of an object that is part of a pattern, the search for objects matching the given name normally applies only to objects of this pattern.

Reference to an object that is not part of the pattern requires the prefix '!' to the object name.


4.46 SetSize

Home > Operator Actions > 4 Description of operator actions > 4.91 SetSize

4.91 SetSize

Intended use

This action allows to change the size of the selected element of the diagram. It is used for size animation of the objects on the diagram. More information and examples of use may be found in the SetPosition action description.

Syntax

SetSize (object_name, width, height)

SetSize (width, height)

Parameters

object_name

The name of the element, the size of which is to be changed. The action variant containing no name relates to the change of the context element (object, template or group) size. The parameter can contain the characters '*' and '?'.

If the action has been used in the context of the object being part of the template, the searching of the objects relating to the name specified applies only to objects of this template. Reference to the object which is not part of the template requires adding the prefix '!' to the object name.

width

The new width of the controlled element expressed in absolute units.

height

The new height of the controlled element expressed in absolute units.

See also

- Techniques of Designing Diagrams > Motion Animation and Resizing of Objects

- SetPosition , SetBounds actions


SetTableVariable

Home > Operator Actions > 4 Description of operator actions > 4.92 SetTableVariable

4.92 SetTableVariable

Intended use

The action allows for direct sending to the indicated process variable a control value in the form of an array of values.

Action execution is controlled by the authorization system.

Syntax

SetVariable(variable name, item1, item2, ... )

Parameters

variable name

The name of the process variable to which the control should be sent. An empty name means the use of an object controlled variable resulting from the context of the action usage. Suffix notation of the variable name with respect to the main variable of the object resulting from the context is possible.

item1, item2, ... itemn

Subsequent elements of the array of control values sent to the variable.

See also

- Techniques of Diagram Creation > Organization of Control Operations


4.47 SetVariable

Home > Operator Actions > 4 Description of operator actions > 4.93 SetVariable

4.93 SetVariable

Intended use

This action enables direct sending the control value to the selected process variable.

The action execution is controlled by the authorisation system.

Syntax

SetVariable(variable_name, value)

SetVariable(variable_name, value, value_mask)

Parameters

variable_name

The name of the process variable which is to be provided with control. A blank name indicates the use of the controlled variable of the object related to the context of use. Suffix notation of the variable name according to the context object main variable is possible.

value

The control value sent to the variable. In case of the action variant containing no value_mask parameter, the value specified is sent without any change. The second variant means that the value is modified according to the algorithm specified in the description of the value_mask parameter.

value_mask

If this parameter is used, the following operations are performed during the action execution:

  • the current value of the variable is read out;

  • only those bits which correspond to the bits of value of 1 in the value_mask are changed in the readout value;

  • a value modified this way is sent to the variable.

Examples

SetVariable (””,1)

Controlled variable of the object for which the action is executed will be set to the value of 1.

SetVariable(”#_S”,8,0xc)

A variable the name of which is a combination of the main name of the object (for which the action is executed) and the suffix "_S" will be set. The third bit of the variable will be set to 1 and the second one will be set to 0. The other bits remain unchanged. For example, if the original value of the variable was equal to 0xff, upon the control execution it will be equal to 0xfb.

See also

- Techniques of Designing Diagrams > Organization of Control Operations


4.48 SetWindowSize

Home > Operator Actions > 4 Description of operator actions > 4.94 SetWindowSize

4.94 SetWindowSize

Intended use

This action changes the size of synoptic windows. Changing the size of window groups based on the compliance with the name template is possible.

This action is an alternative to manual resizing of the window carried out by the user. The user can resize the window which is not blocked and has a frame. It should be noted that window resizing changes the size of the panels inside the window. Diagrams may also be scaled to a new size.

Syntax

SetWindowSize(window_name, width, height)

Parameters

window_name

This parameter specifies the name of windows concerned by the action. You can specify the exact name or name template containing special characters '*' and '?'. If the name of the window is blank, only the window related to the context of use is resized - the window from which the SetWindowSize action was executed.

Width

The new window width.

Height

The new window height.

Examples

SetWindowsSize (null,400,200)

The action changes the context window size.

See also

- Techniques of Designing Diagrams > Controlling the Location and Size of Windows


4.49 ShowControlPanel

Home > Operator Actions > 4 Description of operator actions > 4.95 ShowControlPanel

4.95 ShowControlPanel

Intended use

This action is used to open the control panel window. The control panel is a predefined window which enables performing the basic administrative tasks.

The window of the control panel may be opened in any application using Ctrl-Shift-F1 keys.

Syntax

ShowControlPanel()


4.50 ShowKeyboard

Home > Operator Actions > 4 Description of operator actions > 4.96 ShowKeyboard

4.96 ShowKeyboard

Intended use

This action opens the window with an on-screen alphanumeric keyboard.

Syntax

ShowKeyboard()

See also

- ShowNumericKeyboard action


4.51 ShowMenu

Home > Operator Actions > 4 Description of operator actions > 4.97 ShowMenu

4.97 ShowMenu

Intended use

This action opens the selected context menu. The menu is opened at the cursor position. The menus fixed to the synoptic windows are an alternative to the context menu.

Syntax

ShowMenu(menu_name, parameters)

Parameters

menu_name

The name of the menu defined in the application.

parameters

This parameter transfers the relevant parameter data to the menu being opened. The set of parameters allowed depends on the definition of the menu. The parameters are given as a sequence of pairs parameter_name = parameter_value separated by a semicolon, e.g.

Colour=Red;Variable=v1

See also

- Visualization Elements > Menu


ShowNotes

Home > Operator Actions > 4 Description of operator actions > 4.98 ShowNotes

4.98 ShowNotes

Intended use

Action displays the preview window of the last operator notes with the possibility of entering new ones.

Syntax

ShowNotes(segment, active_only)

Parameters

segment

Name of the segment of operator notes. Acceptable wildcards '*' and '?'.

active_only

When True - only active notes are displayed, while False - all notes.

See also

- action DeactivateNote

- functions AddNote, GetNote, IsActiveNote


4.52 ShowNumericKeyboard

Home > Operator Actions > 4 Description of operator actions > 4.99 ShowNumericKeyboard

4.99 ShowNumericKeyboard

Intended use

This action opens the window with an on-screen numeric keyboard.

Syntax

ShowNumericKeyboard()

See also

- ShowKeyboard action


ShowPanel

Home > Operator Actions > 4 Description of operator actions > 4.100 ShowPanel

4.100 ShowPanel

Intended use

The action restores the hidden selected panel in the window.

Syntax

ShowPanel(panel_name)

ShowPanel(window_name, panel_name)

Parameters

window_name

Name of the window where the hidden panel is to be restored.

panel_name

The name of the panel to be restored.


Speak

Home > Operator Actions > 4 Description of operator actions > 4.101 Speak

4.101 Speak

Intended use

The action causes any given text to be read by Windows Narrator.

Syntax

Speak(text)

Parameters

text

The content of the message that will be read.


4.53 StartAlarm

Home > Operator Actions > 4 Description of operator actions > 4.102 StartAlarm

4.102 StartAlarm

Intended use

This action notifies the alarm start event. The alarm that is the object of the action must be part of an external or undefined strategy. An alternative method for the alarm start notification is to use the Raise function of IAlarm interface in the user's script code.

Syntax

StartAlarm(domain_name, alarm_ID)

StartAlarm(domain_name, alarm_ID, parameter_1,…)

Parameters

domain_name

Name of the alarm domain related to the action. If the name is not provided, the action relates to the default domain (the first one).

alarm_ID

Alarm ID to be initiated.

parameter_1, …, parameter_n

Additional parameters logged in the alarm log.

See also

- Alarm_System

- Alarm System > Strategies of Alarm Detection

- Scripts > IAlarm interface

- EndAlarm action


4.54 StopSound

Home > Operator Actions > 4 Description of operator actions > 4.103 StopSound

4.103 StopSound

Intended use

This action stops the currently played sound signal. With the alarm domain name specified, the action mutes alarm sound signal on the station where the action was executed and on the other stations involved in the domain operation.

Syntax

StopSound()

StopSound(domain_name)

Parameters

domain_name

Name of the alarm domain related to the action. The name in the form of '*' may be specified, which turns the alarm off for all alarm domains.

See also

- Alarm System > Sound Signaling

- PlaySound , PlaySoundLooping actions


SwitchAction

Home > Operator Actions > 4 Description of operator actions > 4.104 SwitchAction

4.104 SwitchAction

Intended use

The action assigned to the first compare value equal to the checked value is performed. If none of the values match, the default action (last argument) is performed.

Syntax

SwitchAction(check_value, compared1, action1, compared2, action2, ..., default_action)

Przykłady

SwitchAction(Variable("StanPracy"),
 1, SetVariable("Status", 10), 2, SetVariable("Status",
 20),SetVariable("Status", 0))

If the value of the StanPracy variable is 1, the Status variable is set to 10, if the value of StanPracy is 2, the Status variable is set to 20, in other cases the Status variable is set to 0.

See also

- IfAction, Perform


4.55 SwitchLanguage

Home > Operator Actions > 4 Description of operator actions > 4.105 SwitchLanguage

4.105 SwitchLanguage

Intended use

This action enables switching the interface language. The current application language and the programme language associated with it are changed. The application must be configured for multilingual operation.

The application language may also be changed via the control panel window. The window of the control panel may be opened in any application using Ctrl-Shift-F1 keys.

Syntax

SwitchLanguage(language_code)

Parameters

language_code

Language code containing two letters.

Examples

SwitchLanguage(”en”)

This action switches the application into English.

See also

- Application Parameterization > Parameterization of Multilingual Applications


SwitchPanel

Home > Operator Actions > 4 Description of operator actions > 4.106 SwitchPanel

4.106 SwitchPanel

Intended use

The action switches the visibility of the indicated panel in the window.

Syntax

SwitchPanel(panel_name)

SwitchPanel(window_name, panel_name)

Parameters

window_name

Name of the window where the panel visibility is to be toggled.

panel_name

Name of the panel the visibility of which is to be toggled.


4.56 SwitchWorkMode

Home > Operator Actions > 4 Description of operator actions > 4.107 SwitchWorkMode

4.107 SwitchWorkMode

Intended use

The action allows switching the application run mode to the selected edit mode.

The action execution is controlled by the authorisation system. To switch to the edit mode, the user must be logged in and must have the access permissions for the relevant edit mode.

The operation mode may also be changed via the control panel window. The window of the control panel may be opened in any application using Ctrl-Shift-F1 keys.

Syntax

SwitchWorkMode(edit_mode)

Parameters

edit_mode

This parameter determines the desired edit mode. The parameter must be one of the following constants:

$Architekt – full edit mode along with the Asix.Evo.exe Architect window.

$WindowEdit - simplified edit mode for synoptic windows.

$DiagramEdit - simplified edit mode for synoptic diagrams.

Examples

SwitchWorkMode($DiagramEdit)

The action switches the application to the simplified edit mode for synoptic diagrams.

See also

- How to Do It > Starting the Program and Switching the Operation Modes / Switching from the Run Mode to Edit Mode

- Application Parameterization > Permissions System


SydelShow

Home > Operator Actions > 4 Description of operator actions > 4.108 SydelShow

4.108 SydelShow

Intended use

The action is used to control the work of the SydelEko program by Technicon. Action allows to switch information displayed in the SydelEKO program window.

Syntax

SydelShow(node_description)

Parameters

node_description

The parameter is used to identify the node whose window should be displayed. It should be given the full descriptive name of the node or its numeric identifier.


4.57 Terminate

Home > Operator Actions > 4 Description of operator actions > 4.109 Terminate

4.109 Terminate

Intended use

This action closes the application. It works only when the application is started in the run mode from the beginning.

The action execution is controlled by the authorisation system. To exit the application, the user must be logged in and must have the permissions to close the application.

There are alternative methods for closing the application:

  • Closing all opened windows.

  • Using the operation termination button located on the control panel window. The window of the control panel may be opened in any application using Ctrl-Shift-F1 keys

Syntax

Terminate()

See also

- Application Parameterization > Permissions System


4.58. ToggleBits

Home > Operator Actions > 4 Description of operator actions > 4.110 ToggleBits

4.110 ToggleBits

Intended use

The action allows changing the values ​​of selected bits of the process variable to the opposite.

The action execution is controlled by the authorisation system.

Syntax

ToggleBits(varable_name, bit_mask)

Parameters

variable_name

The name of the process variable which is to be provided with control. A blank name indicates the use of the controlled variable of the object related to the context of use. Suffix notation of the variable name according to the context object main variable is possible.

bit_mask

This parameter defines the variable bits to be changed. Only those bits which correspond to the bits of value of 1 in the bit_mask are changed.

Examples

ToggleBits (””,0x1)

The least significant bit value of the controlled variable of the object on account of which the action is executed, will be set to the opposite value.

See also

- Techniques of Designing Diagrams > Organization of Control Operations

- Application Parameterization > Permissions System


Transfer

Home > Operator Actions > 4 Description of operator actions > 4.111 Transfer

4.111 Transfer

Intended use

The action allows you to rewrite the current value and status of the source variable to the target variable. Action execution is controlled by the authorization system.

Syntax

Transfer(source_variable, target_variable, read_flag)

Parameters

source_variable

Name of the process variable whose value and status are transferred to the target variable.

target_variable

Target variable name.

read_flag

Boolean value specifying whether to force reading the value of the source variable before performing the transfer. Forcing the read can significantly extend the action execution time (especially when the Transfer action sequence is performed). On the other hand, the forcing may be necessary in case the source variable is not refreshed in any diagram and comes from a channel other than None.


4.59 VariableInfo

Home > Operator Actions > 4 Description of operator actions > 4.112 VariableInfo

4.112 VariableInfo

Intended use

This action allows displaying the information window related to the variable selected. It is possible to specify the attribute names whose values ​​are to be shown.

Syntax

VariableInfo(variable_name, attribute_list)

Parameters

variable_name

The process variable name for which the information window is to be displayed. A blank name indicates the use of the main variable of the object related to the context of use. Suffix notation of the variable name according to the context object main variable is possible.

attribute_list

The list of variable attribute names separated by commas. This parameter determines which of the variable attributes are to be displayed in the information window. A blank attribute list means that all the attributes will be displayed.

The preferred defining method to determine the attribute list is to use the global property called SetOfAttributes This allows defining the list once, and then applying it in all calls to the VariableInfo action by using the Property function.

Examples

VariableInfo (””, Property(InfoAttrs))

An information window for a main contextual variable of the object will be displayed. Names of the displayed attributes will be loaded from the definition of the global property called InfoAttrs.


Zoom

Home > Operator Actions > 4 Description of operator actions > 4.113 Zoom

4.113 Zoom

Intended use

The action sets the diagram scaling degree to the selected percentage value in relation to the initial size of the diagram.

Syntax

Zoom (window_name, panel_name, rescaling_degree)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window being the action object is determined based on the context of use.

panel_name

Name of the panel where the currently open diagram will be scaled. It can be empty, and then the panel which is the object of the action is determined based on the context of use.

rescaling_degree

The absolute percentage of the diagram scaling relative to its initial size. A value of 100 means a return to the original size of the diagram.

Examples

Zoom ( null, schemat, 150)

The diagram in the Scheme panel of the current window will be scaled to 150% of its original size.

See also

- action ZoomIn, action ZoomOut


ZoomIn

Home > Operator Actions > 4 Description of operator actions > 4.114 ZoomIn

4.114 ZoomIn

Intended use

The action increases the scaled diagram by a given percentage value in relation to the current state.

Syntax

ZoomIn (window_name, panel_name, scalling_range)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window being the action object is determined based on the context of use.

panel_name

Name of the panel where the currently open diagram will be scaled. It can be empty, and then the panel which is the object of the action is determined based on the context of use.

scalling_range

The percentage value of the diagram enlargement in relation to its current size, e.g. 10 means the diagram enlargement by 10%.

See also

- action Zoom, action ZoomOut


ZoomOut

Home > Operator Actions > 4 Description of operator actions > 4.115 ZoomOut

4.115 ZoomOut

Intended use

The action reduces the scaled diagram by a given percentage value in relation to the current state.

Syntax

ZoomOut (window_name, panel_name, scalling_degree)

Parameters

window_name

The name of the window the action applies to. It can be empty, and then the window that is the object of the action is determined based on the context of use.

panel_name

Name of the panel where the currently open diagram will be scaled. It can be empty, and then the panel that is the object of the action is determined based on the context of use.

scalling_degree

Percentage value of reducing the diagram in relation to its current size, e.g. value 10 means reducing the diagram by 10%.

See also

- action Zoom, action ZoomIn


Welcome

Home > Expressions and Functions

>> Help for Asix

www.asix.com.pl

Asix.Evo - Expressions and Functions


1 Using Expressions and Functions

The basic mechanism used in the Asix.Evo application parameterization are expressions. They allow dynamic calculation of the value in the application runtime depending on the current state of the various system components, in particular, the process variables.

The expressions are used, inter alia, in:

  • Definitions of object properties and menu items

  • Definitions of global properties

  • Operator action and function arguments

  • Conversion functions of the process variables

  • Alarm detection parameters


2.1. Expression Elements

The Asix.Evo expression structure is similar to the arithmetic expressions syntax of the C language. The expressions consist of the operators which determine the executed operations and the expression elements which are the arguments of these operations. The below element types, described in the following subsections, are available.


2.1.1. Numbers

Integers, floating point and hexadecimal numbers. The floating point numbers always use a dot as a fractional part separator. The hexadecimal numbers include the 0x prefix.

Examples:

77 -14 45.34. 12e2 0x0f


2.1.2. Texts

The texts consisting of any characters limited with the ”” symbols. Inside a text, it is possible to use special sequences: \ n, \ r, \ "\ \ , which mean respectively: new line character, carriage return character, " character, \ character, . It is also possible to insert any characters in Unicode through the \u<4-character hexadecimal number> sequence.

Example:

”Ko\u0144” = ”Koń” ("horse" in Polish)


2.1.3. Constants

Symbolic constants that represent a predetermined value. These are:

  • false, boolean value false

  • true, respectively value true

  • null, null value

  • $name constants, where name specifies the constant value. These are the values ​​used in the function and action calls. They are described in the sections concerning specific actions and functions.


2.1.4. Identifiers

The identifiers are texts in which the first character is a letter, while the subsequent characters may be letters, digits, and the _ symbol. The importance of an identifier results from the context of its use. In the terms of values and functioning during calculation, the expression values are identical to the texts.

Examples:

Variable (Limit_1) - in the Variable function call, the Limit_1 identifier means the variable name

Limit_1 + "_Hi" - the '+' operator combines an identifier with a text what gives the Limit_1_Hi text, as a result.


2.1.5. Function Calls

Function and action calls have the form:

name(argument_1, …, argument_n)

The number and importance of the arguments depend on the function name. The call arguments can also act as expressions. The functions are described in detail in separate sections.


2.2. Operators

The operators specify operations which should be performed on the expression elements. The sequence of operation execution depends on the operators priorities and the sequence of their use (for the operators of identical priority). Round brackets, ( and ) may be used to control the sequence of operators use. The following sections describe the operation operators in the sequence of decreasing priority.


2.2.1. ~ ! - (unary)

Bitwise NOT, boolean NOT operators, and character change.

Examples:

~0x000f = 0xfff0

!(1==0) = false


2.2.2. * / %

Multiplication, division and modulo division operators. The division operations carried out on integers return integer.

Examples:

17/5 = 3

17%5 = 2


2.2.3. + -

Summation and subtraction operators. The summation operator performs the operation of merging texts in the case of text arguments.

Examples:

5 + 9 = 14

”5” + 9 = ”59”


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.4. < <- > >

2.2.4. < <= > >=

The comparison operators: less, less or equal, greater, greater or equal.


2.2.5. == !=

The comparison operators: equal, not equal. The operators can be used to compare texts.


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.6. &

2.2.6. &

Bitwise AND operator

Examples:

0xf0 & 0x11 = 0x10


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.7. ^

2.2.7. ^

A bitwise XOR operator.

Examples:

0xf0 ^ 0x11 = 0xe1


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.8. |

2.2.8. |

A bitwise OR operator.

Examples:

0xf0 & | 0x11 = 0xf1


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.9. &&

2.2.9. &&

AND boolean operator.

Examples:

1==0 && 2==2 = false


Home > Expressions and Functions > 2 Expression Syntax > 2.2. Operators > 2.2.10 ||

2.2.10 ||

OR boolean operator.

Examples:

1==0 || 2==2 = true


2.2.11. ?:

The boolean expression operator in the form of condition?expression_when_true:expression_when_false. Depending on the result of checking the condition, one of the two subexpressions is calculated.

Example:

1==0 ? ”yes” : ”no” = ”no”


3 Calculating Expressions

Asix.Evo uses optimization for calculating the expressions values. This means that the expressions are calculated only when it is necessary. For the expressions used in the object properties, the calculation is performed when one of the expression elements changes.

Attribute (z1, LimitHi)

In this case, the expression calculation is performed only when a diagram is opened, or when the variable database definition is changed.

10 * Variable (z2)

The calculation is performed only when the z2 variable value is changed.


3.1. Value Types and Conversion

When executing the operation, the automatic conversion of the argument values occurs. The conversion method depends on the used operator or function and the types of arguments.

The conversion rules are as follows:

  • In the case of arithmetic operations, the argument types are coordinated to a type of wider value range.

12 + 10.10

the 22.10 result, the first argument converted into floating point number

  • The texts used in the expressions are usually converted into numbers, except for the operations performed directly on the texts.

10 * Attribute(z1, LimitHi)

the LimitHi attribute of the variable will be converted into a text and multiplied by 10.

10 + 1

the 11 result, the operation of summation of two numbers

”10” + 1

the 101 result, operation of combining texts

  • In the place where logical value was used, numerical values can be used. Values ​​different from zero mean true, equal to zero mean false. It is also possible to use the "true" and "false" texts.

Variable(z1) ? red : blue

If the z1 variable value is different from zero, "red" text will be the result.

  • The identifiers are converted into texts.

Ident1 + 1

the result is ident11 which is determined by the '+' text operation execution

In some cases, the value type explicit conversion may be necessary. For this purpose, the functions of the family To.... are used.

ToDouble(Variable(z1))/Variable(z2)

If the z1 and z2 variables are of integer type, an integer would be also the result of a simple division. To obtain the exact result of a division, an explicit conversion of the first variable was used in the expression.

ToUint32( Attribute(z1, LimitHi) ) + 10

The explicit conversion of an attribute into a function causes that the '+' operator is of arithmetic summation importance, and is not responsible for linking the texts.


3.2. Context of Use

For the expression calculation process, the context of its use is also of a key importance. The expression used in the object property definition has a context-specific access to the object and diagram definitions in which it was used. The main variable name of the object is a typical contextual information.

A set of context data depends on place of the expression use, e.g. the expressions of the conversion functions have access only to a variable in the definition of which they are used.

The context information is inherited. An expression used in the global property does not have its own context. However, using this global property in the diagram object, causes that the expression will receive the object context.

Variable()

The above expression is allowed to be used in the object properties and means loading the object main variable value. However, it is not allowed to be used in the operator action contents used in the keyboard shortcut definition.

Variable(”#_hi”)

The above expression is also allowed to be only used in the context (direct or inherited) of diagram object. The # special symbol indicates on the main variable name, as a result, the function loads the variable value of a name created by adding the _hi suffix to the main variable name.


3.3. Expression Diagnostics

In a case of problems with the correct expression forming, the control of the messages recorded in the Messages panel is recommended. If an error occurs during the expression calculation, the messages describing error types and a place where it occurred will appear in this panel.

Another useful technique is to use an expression or its fragment in the Text property of the Text object - this gives the visual control of expression result.


4 List of Functions

Access to application components

Asix6Attribute - returns a numerical value of the selected attribute of the process variable. If the attribute is not a number, it is treated as the variable name and the value of this variable is returned.

Attribute - returns a value of the selected attribute of the process variable

ExistsAttribute - checks if the specified attribute is used in the variable definition database of the application

LocalProperty - returns a value of the object or diagram property

Parameter - returns a value of the parameter used in the diagram or template

Property - returns the global property value

Text - returns a text from the pool of multilingual texts

Access to the current values of the process variables

Asix6Limit - checks the condition of exceeding the limit of the process variable according to the algorithm used in the Asix6 applications.

CheckStateMask - tests whether the process variable value is compatible with the specified state. The tested state is described with the numerical values​ of a mask and expected value.

CheckStateTemplate - tests whether the process variable value is compatible with the specified state. The tested state is described with a text.

GetStateDescription - returns the description of the process variable state based on the information contained in the variable database.

GetStateText - returns the state name of the process variable based on the information contained in the variable database.

NewValue - returns a new value of the process variable. This function is only used when the control operation for the record conversion function is performed.

RawValue - returns the raw value of the process variable, without performing calculations defined in the variable database definition.

TableElement - returns the indicated element from the process variable value of array type.

TableLenght - returns a number of elements in the process variable of array type.

Variable - returns the current value of the process variable, after performing calculations defined in the variable definition database.

VarIsGood - indicates if the process variable value state is good.

VarIsNotGood - indicates if the process variable value state is not good.

VarStatus - returns the value status of the process variable.

VarStringValue – returns the text value of the process variable, created based on the format defined in the variable definition database

VarTime - returns the last process variable value update time.

Access to historical values ​of process variables

HorizonAggregate - returns the aggregate value of the process variable historical values from the selected time horizon calculated from the current moment.

RangeAggregate - returns the aggregate value of the process variable historical values from the selected time range.

Functions of object and diagram states

HasWaitingControl - indicates whether it is in a pending state for sending a control.

IsActive - indicates whether the object is active, i.e. it can perform control operations.

IsBlinkOff - informs about the current blinking phase (cyclically returns the true or false value).

IsDiagramActive - indicates whether the diagram of a specified name is currently the active (current) diagram.

IsDiagramOpened - indicates whether the diagram of name specified is open.

IsSelected - informs whether the object is currently selected (is the current object).

Alarm system support

AlarmsControler - function returns the active controller name.

AlarmsCount - function returns a number of alarms included in the selected alarm group or in the entire domain.

AlarmsGroupState - returns the alarm group state; it allows checking if the group contains active and/or unacknowledged alarms.

AlarmsMode - indicates the current operating mode of the alarm system.

DeadBand - the function used to detect alarms, it controls alarm limits with a hysteresis

DelayedState - the function used to detect alarms, it detects lack of the expected state changes.

IsAlarm - indicates whether an alarm is in the active alarm log and whether it is active (not terminated).

IsAlarmExcluded - indicates whether the selected alarm is currently excluded

IsAlarmUnaccepted - indicates whether the alarm is in the active alarm log and whether it is unacknowledged.

RateOfChange - the function used to detect alarms, it monitors the change rate of the expression values.

Coordinates conversion functions

AbsToRelX - converts the horizontal coordinate or the width from the absolute value (0 to 1 000 000) into the relative value expressed in pixels.

AbsToRelY - converts the vertical coordinate or the height from the absolute value (0 to 1 000 000) into the relative value expressed in pixels.

RelToAbsX - converts the horizontal coordinate or the width from the relative value expressed in pixels into the absolute value (0 to 1 000 000)

RelToAbsy - converts the vertical coordinate or the height from the relative value in ​​pixels into the absolute value (0 to 1 000 000)

XOnScreen - converts the horizontal coordinate from the relative value of the selected monitor into an absolute value for the full desktop.

YOnScreen - converts the vertical coordinate from the relative value of the selected monitor into an absolute value for the full desktop.

Monitoring keyboard and mouse status

IsControlPressed - indicates whether the Control key is pressed.

IsAltPressed - indicates whether the Alt key is pressed.

IsShiftPressed - Indicates whether the Shift key is pressed.

IsMouseOver - indicates whether the mouse cursor is over an object.

IsMousePressed - indicates whether the mouse button is pressed and the mouse cursor is over an object.

LastKeyPressed - returns the description of the key pressed lately on the keyboard.

Operations on text strings

Concat - combines multiple character strings into a single text

Format - returns a text created according to the format specified.

Replace - replaces all the occurrences of the substring specified into another character string.

Substring - returns a text being a part of the text specified in the function call.

Arithmetic functions

Cos - calculates the cosine function value

E - returns the e number value

Log - calculates the natural logarithm value

Log10 - calculates the common logarithm value

Pl - returns the pi value

Pow - calculates the number value raised to the specified power

Round - rounds a number to the specified number of fractional digits

Sin - calculates the sine function value

Sqrt - calculates the square root value

Tan - calculates the tangent function value.

Value conversion functions

Color - creates the colour value based on the specified RGB primary colours.

FromAsix6Date - converts the numeric value of a date and time of the Asix6 application into the date and time format.

FromAsix6Time - converts the time range numeric value of the Asix6 application into the time format.

OPCTime - creates a date and time value after application of modification described by the enhanced OPC formatting expression.

ToAsix6Date - converts a date and time into the numerical value of the Asix6 application date and time.

ToAsix6Time - converts a time range into the numerical value of the Asix6 application time range.

ToBool - conversion into the true / false boolean value.

ToDateTime - converts a value into a date and time format.

ToDouble - converts into a double-precision floating point number.

ToInt8 - conversion into the 8-bit signed integer.

ToInt16 - conversion into the 16-bit signed integer.

ToInt32 - conversion into the 32-bit signed integer.

ToInt62 - conversion into the 64-bit signed integer.

ToSingle - conversion into a single-precision floating point number.

ToTimeSpan - converts a value into a time range format.

ToUInt8 - conversion into the 8-bit unsigned integer.

ToUInt16 - conversion into the 16-bit unsigned integer.

ToUInt32 - conversion into the 32-bit unsigned integer.

ToUInt64 - conversion into the 64-bit unsigned integer.

XorColor - returns the complement (XOR) of the colour specified.

Additional

ApplicationChanged - indicates whether the application has been updated

Evaluate - determines a value of the expression specified in the function parameter

GetNote - returns the content of the last active operator note from the indicated segment

HasRole - checks if the current user is assigned to a specific role in the authorization system of the application

IsActiveNote - checks if there are any active operator notes associated with the specified segment

IsBrowser - checks whether the application is running in the browser window.

IsWorking - checks whether a connection with a particular workstation defined in the application settings is established or can be established.

ToFullPath - returns an absolute path to the file for the path specified based on the application directory.

AbsToRelX

Intended use

This function converts the horizontal coordinate or the width from the absolute value (0 to 1 000 000) into a relative value expressed in pixels. The absolute values are stored in the coordinates definitions. Switching to the relative values is performed during displaying an object, and is adjusted to the actual size of a diagram. The absolute coordinate of 1 000 000 corresponds to the right edge of diagram. This function is used in a case of motion implementation or object resizing.

Syntax

AbsToRelX (X_coordinate)

Parameters

X_coordinate

The X coordinate or the object width expressed in absolute units, which should be converted into a relative value.

See

- AbsToRelY, RelToAbsX, RelToAbsY functions

- Techniques of Diagram Creation > Motion Animation and Object Resizing

AbsToRelY

Intended use

This function converts the vertical coordinate or the height from the absolute value (0 to 1 000 000) into a relative value expressed in pixels. The general rules of use are the same as for the AbsToRelX function.

Syntax

AbsToRelY(Y_coordinate)

Parameters

Y_coordinate

The Y coordinate or the object height expressed in absolute units, which should be converted into a relative value.

See

- AbsToRelX, RelToAbsX, RelToAbsY functions

- Techniques of Diagram Creation > Motion Animation and Object Resizing

AlarmsControler

Intended use

The function returns the name of active controller of the selected alarm domain. If the terminals are connected via the gateway, the name of this gateway is returned.

Syntax

AlarmsControler ()

AlarmsControler (domain_name)

Parameters

domain_name

The domain name to which the function call applies. For function variant without specifying the domain name, the default domain is used (first defined).

See

- AlarmsMode function

AlarmsCount

Intended use

This function returns a number of alarms included in the selected alarm group or in the entire domain. Depending on the call method, the number of active, unacknowledged or active-unacknowledged alarms may be retrieved.

Syntax

AlarmsCount (domain_name, group_selector, alarm_type)

AlarmsCount (group_selector, alarm_type)

Parameters

domain_name

The domain name to which the function call applies. For function variant without specifying the domain name, the default domain is used (first defined).

group_selector

This parameter specifies the subgroup of alarms, which state is to be returned. The property definition is in the form of a text, consisting of pairs: <gouping_attribute_ID> = <attribute_value> separated by a semicolon. Using the call empty parameter means returning a number of alarms for the entire domain.

alarm_type

This parameter specifies the alarm types to be calculated. The parameter must be one of the following constants:

$ Active - the active alarms (not terminated) are calculated, regardless of their acknowledgement state.

$ ActiveUnaccepted - the active alarms (not terminated), which have not been acknowledged yet by the operator are calculated.

$Unaccepted - the alarms which have not been acknowledged by the operator yet are calculated.

See

- AlarmsGroupState function

AlarmsGroupState

Intended use

The function returns a group state of the selected alarm group or the entire domain. This function allows determining whether the controlled alarm group includes active (not terminated) and unacknowledged alarms. The following table describes the interpretation of the returned value.

Bit 2 Active, unacknowledged alarm is detected | Bit 1 Not terminated alarm is detected | Bit 0 Unacknowledged alarm is detected | Numerical value | Interpretation
0 | 0 | 0 | 0 | No alarms in the active alarm log
0 | 0 | 1 | 1 | Only terminated and acknowledged alarms are detected
0 | 1 | 0 | 2 | Only active, acknowledged alarms are detected
0 | 1 | 1 | 3 | Combination of terminated-unacknowledged and active-acknowledged alarms
1 | 1 | 1 | 7 | Combination of terminated-unacknowledged, active-acknowledged and active-unacknowledged alarms

Depending on the needs, the returned result can be tested in terms of bits set or numerical values.

It should be noted that the function value is calculated based on the active alarm log. This means that terminated alarm handling depends on the log configuration. If the terminated alarms are immediately removed from the active alarm log, the function will never return the state indicating the presence of the terminated-unacknowledged alarms. Similarly, if the terminated alarms are removed after the time specified, the information on their unacknowledged state will be lost.

Syntax

AlarmsGroupState (group_selector)

AlarmsGroupState (domain_name, group_selector)

Parameters

group_selector

This parameter specifies the subgroup of alarms, which state is to be returned. The parameter definition is in the form of a text, consisting of pairs: <gouping_attribute_identifier> = <attribute_value> separated by a semicolon. Using a blank parameter of the call returns the entire alarm domain state.

domain_name

The domain name to which the function call applies. For function variant without specifying the domain name, the default domain is used (first defined).

Example

=AlarmsGroupState("Zone=B1;Zone=B2;Type=Electrical")&4

The AlarmsGroupState function returns the group state for the alarms which Zone grouping attribute is equal to B1 or B2, and the Type attribute is equal to Electrical. The entire expression, in turn, returns the true value, when the group of the controlled alarms contains at least one active and unacknowledged alarm.

See

- IsAarm, IsAlarmUnaccepted, AlarmsCount functions

AlarmsMode

Intended use

This function returns the operation mode of a workstation within the selected alarm domain. The function can return the following values:

- the workstation is not involved in the domain operation

  • - the workstation is an active controller

  • - the workstation is a passive controller

  • - the workstation is a terminal or gateway

  • - the workstation state is transient, occurs along with the domain initialization and when searching for the active controller

  • Syntax

    AlarmsMode ()

    AlarmsMode (domain_name)

    Parameters

    domain_name

    The domain name to which the function call applies. For function variant without specifying the domain name, the default domain is used (first defined).

    See

    - AlarmsControler function

Add

Intended use

The function is used to calculate the sum of many numerical arguments. The effect of its operation is identical to the use of a structure with many + operators, but in the case of a large number of arguments, the Add function is more effective.

If you need to combine multiple text arguments, use the Concat function.

Syntax

Add (arg_1, ... ,arg_n)

Parameters

arg_1, ..., arg_n

The next components of the sum.

And

Intended use

The function is used to calculate the logical product of many arguments. The effect of its operation is identical to the use of a structure with many && operators, but in the case of a large number of arguments, the And function is more effective.

Syntax

And (arg_1, ... ,arg_n)

Parameters

arg_1, ..., arg_n

Another arguments of the logical product.

See

Or function

Angle

Intended use

The function returns the angle (0 to 360) corresponding to the cursor position within the current object relative to the center of this object. Angle 0 is the "east" direction - to the right of the center of the object. The angle increases clockwise.

The function can be used in any direction of mouse control scenarios, for example in handling mouse click events or animations.

Syntax

Angle ()

ApplicationChanged

Intended use

The function returns the logic boolean indicating whether the Application has been updated via the mechanism of periodic synchronisation of the Application definition.

Syntax

ApplicationChanged()

Asix6Attribute

Intended use

The function loads a text value of the process variable selected attribute from the variable definition database and converts it into a numeric value. If the attribute is not a number, it is treated as the process variable name and the value of this variable is returned. The function typically used in object state conditions, in particular, when converting the Asix6 application.

Syntax

Asix6Attribute (attribute_name)

Asix6Attribute (variable_name, attribute_name)

Parameters

attribute_name

The attribute name which should be loaded from the variable definition database and converted according to the algorithm described above.

variable_name

The variable name whose attribute is loaded. The variable suffix names may used as well. In the case of the function variant without specifying the variable name, the variable attribute resulting from the context of use is loaded.

See

- Attribute, Asix6Limit functions

Asix6Limit

Intended use

The function returns the boolean value which is the result of checking the condition of exceeding the process variable value limit according to the algorithm used in the Asix6 application. This function is typically used in the conditions of the object states. The detailed algorithm for calculating the function result is as follow:

  • If the attribute value is a number, the process variable value is directly compared with the limit value. This function returns true when the variable value is higher than the limit (for LimitHi and LimitHiHi attributes) or when the variable value is lower than the limit (for the LimitLo and LimitLoLo attributes).

  • If the attribute value is the variable name, the value of this variable is loaded as the limit threshold. Further operation is consistent with the previous point.

  • If the attribute value has the variable_name|bit_mask form, the variable value specified in the attribute is loaded, and it is checked whether at least one of the bit mask is set in this value.

  • If the attribute value has the variable_name&bit_mask form, the variable value specified in the attribute is loaded, and it is checked whether all the bits of 1 value in the bit mask are set in this value.

Syntax

Asix6Limit (attribute_name)

Asix6Limit (variable_name, attribute_name)

Parameters

attribute_name

The attribute name which should be loaded from the variable definition database and converted according to the algorithm described above. Allowable attribute names are: LimitLo, LimitLoLo, LimitHi i LimitHiHi.

variable_name

The variable name whose attribute is loaded. The variable suffix names may used as well. In the case of the function variant without specifying the variable name, the variable attribute resulting from the context of use is loaded.

See

- Asix6Attribute function

Attribute

Intended use

This function loads the specified attribute value of the process variable from the variable database definition.

Syntax

Attribute (attribute_name)

Attribute(variable_name, attribue_name)

Parameters

attribute_name

The attribute name which should be loaded from the variable definition database.

variable_name

The variable name whose attribute is loaded. The variable suffix names may be used as well. In the case of the function variant without specifying the variable name, the variable attribute resulting from the context of use is loaded.

Example

Attribute (LimitLoLo)

The LimitLoLo attribute of the process contextual variable. If, in the expression which defines the object property, no additional functionality is required, the above reference may be replaced with the short notation:

@LimitLoLo

See

- ExistsAttribute function

CheckStateMask

Intended use

This function returns a boolean value which indicates whether the process variable value is compatible with the state specified. The tested state is described with the numerical values​of a mask and expected value. Firstly, a bitwise AND operation with a mask value is performed on the test variable value. The true value is returned, if a value obtained with such a method is equal to the value expected.

This function is typically used in the conditions of the object states.

Syntax

CheckStateMask(value_mask, state_value)

CheckStateMask(variable_name, mask_value, state_value)

Parameters

value_mask

Bit mask, a bitwise AND operation with the monitored variable value is performed.

state_variable

The value expected after applying the mask

variable_name

The variable name which value is checked. The variable suffix names may used as well. In the case of the function variant without specifying the variable name, the variable value resulting from the context of use is loaded.

Example

CheckStateMask(0xf,3)

This function returns true when the state of the four least significant bits of the contextual variable is equal to 0011. The other bits are of no significance.

CheckStateMask(z1, 4,0)

The function returns true when the third least significant bit of the z1 variable value is equal to 0.

CheckStateMask(z1, 4,1)

The function returns true when the third least significant bit of the z1 variable value is equal to 1. In this case, the simpler expression will work identically:

Variable(z1)&4

See

- CheckStateTemplate function

CheckStateTemplate

Intended use

This function returns a boolean value which indicates whether the process variable value is compatible with the state specified. The tested state is described with a text. The state description consists of character string: 0 , 1 and -, corresponding to the expected bit values of the test variable. The - character indicates that the value of the corresponding bit is of no significance.

Syntax

CheckStateTemplate(state_template)

CheckStateMask (variable_name, state_template)

Parameters

state_template

The text description of the test variable expected value.

variable_name

The variable name which value is checked. The variable suffix names may used as well. In the case of the function variant without specifying the variable name, the variable value resulting from the context of use is loaded.

Example

CheckStateTemplate(”0110----”)

This function returns true when state of the contextual variable bits, from 7 to 4, is equal to 0110. The other bits are of no significance.

CheckStateTemplate(z1,”1--”)

The function returns true when the third least significant bit of the z1 variable value is equal to 1. In this case, the simpler expression will work identically:

Variable(z1)&4

See

- CheckStateMask function

Color

Intended use

This function creates the colour value based on the specified RGB primary colours. This is an alternative to specifying a colour directly by its name.

Syntax

Color (r, g ,b)

Parameters

r

The red component of a colour, number from the 0 - 255 range

g

The green component of a colour, number from the 0 - 255 range

b

The blue component of a colour, number from the 0 - 255 range

Example

Color( Variable(zR), Variable(zG), Variable(zB) )

This function calculates a colour based on three process variable values.

See

- XorColor function

Concat

Intended use

This function allows creating a text by combining any number of component texts. A similar functionality can be achieved using the '+' operator, but in the case of multiple mergers, the Concat function is more efficient. Another alternative is to use the Format function.

Syntax

Concat (text_1, … , text_n)

Parameters

text_1, ..., text_n

Following component texts, which will be combined into a resulting text.

Example

Concat( VarTime() ,” ”, Variable(), ” ”, (VarIsGood()?OK,Error))

This function combines a timestamp, status value and description of the process contextual variable into a single text. The alternative implementation is shown below:

VarTime() + ” ” + Variable() + ” ” + (VarIsGood()?OK,Error)

Format(“{0} {1} {2}”, VarTime(), Variable(), (VarIsGood()?OK,Error))

See

- Format function

Cos

Intended use

The function calculates the cosine function value

Syntax

Cos (angle)

Parameters

angle

The argument of the cosine function expressed in radians

See

- Sin, Tan, Pi functions

DeadBand

Intended use

The function returns the boolean value that indicates the limit overreaching. Checking is performed with a hysteresis, the threshold of the state change depends on the direction of the value change. Typically, the function is used in the conditional strategy of the alarm detection as a part of the expression used in the detection parameters.

Syntax

DeadBand (monitored_value, activation_limit, deactivation_limit)

Parameters

monitored_value

The expression which rate is tested for exceeding the limits.

activation_limit

The monitored value limit above which the function value changes from false to true.

deactivation_limit

The monitored value limit below which the function value changes from true to false.

Example

DeadBand (Variable(s1), Variable(low), Variable(high))

The s1 variable value is checked for exceeding the limits with a hysteresis included. The threshold values are dynamically changeable, depending on the low and high current variables.

See

- RateOfChange, DelayedState functions

- System of Alarms > Conditional Strategy

DelayedState

Intended use

The function returns the boolean value which informs that the anticipated state changes has not occurred in the system. This function monitors the initial condition state. If it occurs, it is checked whether the postcondition is met within the specified time period. If not, the function value is equal to true. Typically, the function is used in the conditional strategy of the alarm detection as a part of the expression used in the detection parameters.

Syntax

DelayedState (start_condition, time_limit, termination_condition)

Parameters

start_condition

The condition which begins the postcondition checking cycle when changed to true.

time_limit

The period of time in seconds during which the meeting of the postcondition is expected.

termination_condition

The boolean condition which should be met within the specified time period.

Example

DelayedState (Variable(st1)==1, 5, Variable(stop)==1)

From the moment of the st1 variable value change to the value of 1, it is checked, for 5 seconds, whether the stop variable value changes to 1 as well. If not, the function assumes the true value.

See

- RateOfChange, DeadBand functions

- System of Alarms > Conditional Strategy

E

Intended use

Returns the value of the e number

Syntax

E ()

See also

- Log function

Evaluate

Intended use

This function calculates the expression (evaluator) value specified in the function parameter. This parameter is a text in which the property definition syntax should be used. This function is used when the calculated expression contents is not know in advanced, for example, the expression is read out from attributes of process variable.

Syntax

Evaluate (expression)

Parameters

expression

Calculated expression contents

Example

Evaluate( Attribute(a1))

The evaluator content which will be calculated further is loaded from the a1 attribute contextual variable. The following examples show the calculation result depending on the attribute definition:

#_s1 variable value of the contextual variable name with the s1 suffix

@Name main variable name

!g1 value of the g1 global property

=7+4 11

7+4 text 7+4

ExistsAttribute

Intended use

This function returns the boolean value indicating whether the attribute of the specified name is used in the variable definition database of the application.

Syntax

ExistsAttribute (attribute_name)

Parameters

attribute_name

The attribute name whose presence is checked in the variables definition database.

See

- Attribute function

Format

Intended use

This function creates a text on the basis of the formatting text and set of arguments. These arguments are converted into a text in accordance with the instructions contained in the formatting text, and then are inserted into the specified locations of the target text. The function operation is identical to the String.Format function operation of the .NET platform. Please refer to the msdn.microsoft.com website for more detailed description of the Format function, including the description of the formatting text structure. In the examples of use, typical function applications are presented.

Syntax

Format(formatting_text, argument_0, argument_1, …)

Parameters

formatting_text

The formatting text compatible with the .NET platform format. Fragments of the text in form of {x: yyy} indicate on the insertion places of the other function arguments, where x means a subsequent number of the argument (first argument has the number of 0), and yyy specifies the details of the object formatting.

argument_1, argument_2, …

The subsequent arguments inserted into the resulting text, according to the rules specified in the formatting text.

Example

Format (”{0} {1}”,Variable(),Attribute(Unit))

Combines the variable value converted into a text by default method resulting form the property type, with a description of the measurement unit retrieved form the variable definition database, e.g. "122 kg"

Format("{0:f4}", Variable())

Converts a floating point number into a text rounded off to 4 fractional digits.

Format("{0:x}", Variable())

Converts a number into a hexadecimal text format.

Format("{0:hh:mm:ss}", Variable(DateTime))

Creates a text containing the current hour, e.g. 11:30:00

Format("{0:# ###}", Variable())

Formats high numbers by inserting a space before the hundreds digit.

See

- Concat, VarStringValue functions

FromAsix6Date

Intended use

This function converts the date and time expressed in seconds, which elapsed since 01/01/1970 into a date and time type value (DateTime type of the .NET platform). This function is mainly used when converting the Asix6 application.

Syntax

FromAsix6Date (seconds)

Parameters

seconds

The number of seconds since 1/1/1970.

See

- ToDateTime, ToAsix6Date, OPCTime functions

FromAsix6Time

Intended use

This function calculates the time expressed in milliseconds into a time span type value (TimeSpan type of the .NET platform).

Syntax

FromAsix6Time (milliseconds)

Parameters

milliseconds

Number of milliseconds.

See

- ToTimeSpan, ToAsix6Time, OPCTime functions

GetNote

Intended use

The function returns the content of the last active operator note from the indicated segment.

Syntax

GetNote(segment)

Parameters

segment

Name of the segment of operator notes.

Example

GetNote(”Carburizing”)

See also

Actions DeactivateNote, AddNote, ShowNotes, function IsActiveNote

GetStateDescription

Intended use

This function returns the expression state description (of process variable) based on the information contained in the variable definition database. The algorithm of the function operation is as follows:

  • The group name, describing the states by the read out of the StateNames attribute value for the variable specified in the function call, is specified.

  • In the variable definition database, all the variables whose StateSet attribute is identical to the group name specified above, are searched. Typically, these are inactive variables used only to define the state names.

  • Among the variables selected in the previous point, the variable whose StateValue attribute value is identical to the state value transmitted into the GetStateDescription function call, is searched.

  • This function result is the Description attribute value of the variable selected in the previous point.

The effect similar to the GetStateDescription function operation may be achieved using the template based on the Text object in which the relevant states are defined.

Syntax

GetStateDescription (variable_name, state_value)

Parameters

variable_name

The variable name used to obtain the state descriptions from the variable database definition. A suffix notation can be used. An empty name means using the contextual variable.

state_variable

The value specifying the state for which the description should be obtained. In a typical case, this is the expression using the variable value transferred in the variable_name parameter (but it is not obligatory).

Example

GetStateDescription (””,Variable())

This function loads the state descriptions for the contextual variable, and then determines an appropriate description based on the contextual variable value.

See

- GetStateText function

GetStateText

Intended use

This function returns the state text description based on two numerical parameters: state/substate and the information contained in the variable definition database. A typical use is to create descriptions for the single bit values, where the state is the bit number, and the substate is the current bit value. The algorithm of the function operation is as follows:

  • For the variable specified in the function call, the StateNames attribute value is loaded.

  • If the loaded attribute is the sequence of a 0=state;1=state2;…, the state name corresponding to the value equal to the substate parameter is returned. This variant in its functioning is similar to the GetStateDescription function operation, but does not require additional variables.

  • If the function operation has not been completed yet, all the variables whose StateSet attribute is identical to the StateNames attribute value loaded in the first point, are searched in the variable definition database. Typically, these are inactive variables used only to define the state names.

  • Among the variables selected in the previous point, the variable whose StateValue attribute value is identical to the state value transmitted into the GetStateText function call, is searched.

  • If the State names attribute of the variable selected in the previous point is a sequence of the 0=state;1=state2;…,, the state name corresponding to the value equal to the substate parameters is returned. Otherwise, the function value is the attribute complete value.

Syntax

GetStateText (variable_name, state_value, substate_value)

Parameters

variable_name

The variable name used to obtain the state descriptions from the variable database definition. A suffix notation can be used. An empty name means using the contextual variable.

state_variable

The value specifying a state for which a description is to be obtained when the virtual variables defining descriptions are used.

substate_value

The parameter specifying the substate value, used when retrieving a description from the texts in the form of 0=state1;1=state2;... In a typical case it is the expression which uses the variable value transferred via the variable_name parameter (but it is not obligatory).

Example

GetStateText(z1, 3 , Variable(z1)&8)

This function is responsible for obtaining a description of the single bit state. The example data included in the variable definition database:

  • The StateNames attribute of the z1 variable is equal to BitDescription

  • The Bit3 inactive variable has the StateSet attribute equal to BitDescription, and the StateValue attribute equal to 3.

  • The StateNames attribute of the Bit3 variable has the form of 0=OK; 8=Failure.

Depending on the bit 3 value of the z1 variable, the OK or Failure description will be returned.

See

- GetStateDescription function

HasRole

Intended use

This function returns the boolean value indicating whether the currently logged user is assigned to the specified role. In a typical application the function is used in the object sate conditions, in Active or Visible properties or in the Break and Perform conditional operator actions.

Syntax

HasRole (role_name)

Parameters

role_name

The role name, assignment to which is checked.

See

- Application Parameterization > Security System

HasWaitingControl

Intended use

This function returns the boolean value indicating whether the object resulting from the context of use or the objects with a compatible name are in a state of pending for control operation sending. This function applies to objects on the synoptic diagrams which can operate in a delayed control mode. This function is typically used in the state condition to modify the appearance of object waiting for control operation sending.

Syntax

HasWaitingControl ()

HasWaitingControl (name_template)

Parameters

name_template

The name template of objects whose states are controlled. In the template the special '*' and '?' symbols may be used. The '*' parameter checks the state of all objects on a diagram, even of those without a name. Using a parameter-free variant means a test of the context object state.

See

- IsActive, IsSelected functions

- Operator Actions, SendControls, CancelControls actions

HorizonAggregate

Intended use

This function returns the aggregate value of the process variable historical values for the selected time horizon, calculated from the current moment (so-called rolling aggregate).

Syntax

HorizonAggregate(aggregate_name, time_horizon, refreshing_period)

HorizonAggregate(variable_name, aggregate_name, time_horizon, refreshing_period)

Parameters

aggregate_name

The aggregate name to be calculated. The available names are the following: none, start, end, delta, min, max, range, total, average, average0, sumup, sumdown, prevknown, last, stdev, rms, avglk, totallk. The none name means the raw data readout.

time_horizon

The period of calculated aggregate. Calculated always from the current moment. It can be a value of the TimeSpan type or a text converted into the time span (see ToTimeSpan function).

refreshing_period

The period of refreshing the historical data readout. It can be a value of the TimeSpan type or a text converted into the time span (see ToTimeSpan function).

variable_name

The variable name whose historical values are loaded. The variable suffix names may be used as well. In the case of the function variant without specifying the variable name, the variable resulting from the context of use is used.

Example

HorizonAggregate(max,”00:15:00”,”00:00:10)

This function returns the maximum value of the contextual variable for the last 15 minutes. The function value is recalculated every 10 seconds.

See

- RangeAggregate, ToTimeSpan functions

- Types of Archival Data Aggregates

IsActive

Intended use

This function returns the boolean value indicating whether the object resulting from the context of use is active, i.e. is able to perform control operations (interactive). The function result is directly related to the value of the object Active property. This function is typically used in the state condition to modify the object appearance.

Syntax

IsActive ()

See

- IsSelected, HasWaitingControl functions

IsActiveNote

Intended use

The function returns a logical value that informs whether there are currently active operator notes associated with the specified segment.

Syntax

IsActiveNote (segment_ID)

Parameters

segment_ID

Identifier of the segment for which the presence of active notes is checked. The special characters * and ? can be used.

IsAlarm

Intended use

This function returns the boolean value indicating whether the specified alarm is currently active (activated and not terminated).

Syntax

IsAlarm (alarm_ID)

IsAlarm(domain_name, alarm_ID)

Parameters

alarm_ID

The alarm ID whose activity status is to be returned.

domain_name

The domain name to which the controlled alarm is assigned. For function variant without specifying the domain name, the default domain is used (first defined).

See

- IsAlarmUnaccepted, AlarmsGroupState functions

IsAlarmExcluded

Intended use

This function returns the boolean value indicating whether the specified alarm is currently on the list of alarms excluded from detection.

Syntax

IsAlarmExcluded (alarm_ID)

IsAlarmExcluded(domain_name, alarm_ID)

Parameters

alarm_ID

The alarm ID, whose status of exclusion is to be returned.

domain_name

The domain name to which the controlled alarm is assigned. For function variant without specifying the domain name, the default domain is used (first defined).

See

- Operator Actions, ExcludeAlarm, IncludeAlarm actions

IsAlarmUnaccepted

Intended use

This function returns the boolean value indicating whether the selected alarm is included in the active alarm log and has not been acknowledged yet by the operator.

Syntax

IsAlarmUnaccepted (alarm_ID)

IsAlarmUnaccepted(domain_name, alarm_ID)

Parameters

alarm_ID

The alarm ID, whose confirmation state is to be returned.

domain_name

The domain name to which the controlled alarm is assigned. For function variant without specifying the domain name, the default domain is used (first defined).

See

- IsAlarm, AlarmsGroupState functions

IsAltPressed

Intended use

This function is used to check if the Alt key is pressed on the keyboard. A typical application of this function is to link certain actions or the diagram appearance with the Alt key pressing. The typical function used in the object sate conditions, in the Active or Visible properties or in the Break and Perform conditional operator actions.

Syntax

IsAltPressed ()

Example

Perform( IsAltPressed(), SetVariable(z1,1), Nothing())

The z1 variable is controlled only if the Alt key is pressed when executing the action.

See

- IsControlPressed, IsShiftPressed functions

IsBlinkOff

Intended use

The function cyclically returns true or false values indicating the current blinking phase. A typical function used in conditions of states of objects or conditional expressions in properties of objects. The function enables changing the appearance of objects depending on the blinking phase.

Syntax

IsBlinkOff ()

Example

IsBlinkOff()?Blue:Red

The expression cyclically returns the colour values Blue and Red.

See:

- Techniques of Diagram Creation > Implementation of Blinking Effect by Changing Object Pproperties

IsBrowser

Intended use

The function returns a Boolean value indicating whether the application is running in the web browser window.

Syntax

IsBrowser ()

IsControlPressed

Intended use

This function is used to check whether the Control key on the keyboard is pressed. The applications of this function are identical as in the case of IsAltPressed.

Syntax

IsAltPressed ()

See

- IsAltPressed, IsShiftPressed functions

IsDiagramActive

Intended use

The function returns a Boolean value indicating whether the diagram with the given name (or context diagram) is the active diagram (current) at the present moment. This function enables the functionality that is provided in Asix6 application by the Presenter object.

Syntax

IsDiagramActive()

IsDiagramActive(name_template)

Parameters

name_template

This parameter specifies the diagram name template. The characters '*' and '?' may be used. If the name is not specified, this function checks whether the context diagram is active.

Example

IsDiagramActive(”Stac*”)

The function returns the value true if the diagram with a name beginning with Stac is active.

See

- IsDiagramOpened function

IsDiagramOpened

Intended use

The function returns a Boolean value indicating whether a diagram with the indicated name and opening parameters is open. This function enables the functionality that is provided in Asix6 application by the Presenter object.

Syntax

IsDiagramOpened(name_template)

IsDiagramOpened(name_template, opening_parameters)

Parameters

name_template

This parameter specifies the diagram name template. The characters '*' and '?' may be used.

opening_parameters

The opening parameters of a diagram, the conformity of which is verified by the function. The conformity of the parameters given in the call is verified. If the parameters are not given, the function only checks the name of the diagram.

Example

IsDiagramOpened(”StacX”,”room=11”)

The function returns true if a diagram with the name StacX is open and the opening parameters are identical to room = 11.

See

- IsDiagramActive function

IsMouseOver

Intended use

The function returns a Boolean value indicating whether the mouse is over an object. The position over a context object or an object specified by name may be checked. This function is typically used in conditions of states of objects to change the appearance of an object after hovering the mouse cursor over it.

The function requires the object to be checked to have the Active property set to true.

Syntax

IsMouseOver (name_template)

IsMouseOver ()

Parameters

name_template

This parameter specifies the template for the names of objects for which the mouse hover condition is verified. The characters '*' and '?' may be used. Using a call variant without indicating a name template only checks the context object.

See

- IsMousePressed function

- Techniques of Diagram Creation > Navigation through Text Links

IsMousePressed

Intended use

The function returns a Boolean value indicating whether any mouse button is pressed and the mouse is over an object resulting from the context of use.

The function requires the object to be checked to have the Active property set to true.

Syntax

IsMousePressed ()

See

- IsMouseOver function

- Techniques of Diagram Creation > Navigation through Text Links

IsSelected

Intended use

The function returns a Boolean value indicating whether the object resulting from the context of use is currently selected (is the current object of the diagram). This function is typically used in the condition of the state to modify the appearance of the selected object.

Syntax

IsSelected ()

See

- IsActive, HasWaitingControl functions

IsShiftPressed

Intended use

This function is used to check whether the Shift key on the keyboard is pressed. The applications of this function are identical as in the case of IsAltPressed.

Syntax

IsAltPressed ()

See

- IsControlPressed, IsAltPressed functions

IsWorking

Intended use

The function returns a Boolean value indicating whether a connection with a particular station defined in the application settings is established or may be established. The value of the function is refreshed cyclically.

Syntax

IsWorking(station_name)

Parameters

station_name

The name of the tested station. The name must be defined in the application settings.

LastKeyPressed

Intended use

The function returns a textual description of last key pressed on the keyboard. The form of the description is consistent with the descriptions used in the definition of keyboard shortcuts. This feature is intended for use in handling Key press events of objects. It enables making the action dependent on the type of pressed key.

Syntax

LastKeyPressed ()

Example

Perform ( LastKeyPressed()==”Alt+G”, SetVariable ( v1, 1), Nothing())

The variable v1 is set to 1 if the Alt and g keys were pressed. The function should be used to handle Key press events.

See:

- Visualization Elements > The Standard Object Events

Log

Intended use

The function calculates the value of the natural logarithm.

Syntax

Log (argument)

Parameters

argument

The argument of the natural logarithm function

See

- E, Log10 functions

LocalProperty

Intended use

The function returns the value of the local property of the diagram object. The property of the context object or any object with an indicated name may be read.

Syntax

LocalProperty (property_name)

LocalProperty (object_name, property_name)

Parameters

property_name

The name of a local property that should be read.

object_name

The name of the object, the local property of which is to be read. In the case of function variant without indicating an object name, the object attribute of the object resulting from the context of use is read. If the function is used in an object located in an embedded template - first, the object with the given name is searched in the same template. Only when there is no such object the search continues in the diagram but without the objects included in other templates.

Example

LocalProperty(o2,"Color")

The definition of the local property Color is read from an object with the name o2.

See

- Property function

Log10

Intended use

The function calculates the value of the decimal logarithm.

Syntax

Log 10(argument)

Parameters

argument

The argument of the decimal logarithm function.

See

- Log function

NewValue

Intended use

The function returns a control value of the process variable that was passed for sending as a result of the operator's activities or user's scripts. This function is only used when executing control operations in expressions of the Record conversion function property. The result of the calculation of such an expression is the converted value sent to the driver of the communication channel. The function operates on a context variable to which the control operation refers to.

NOTE: if the Asix6 communication channel is used, the control value is additionally converted by the Asmen communication module based on the ConversionFunction attribute.

Syntax

NewValue ()

See

- RawValue function

OPCTime

Intended use

This function creates a date and time value calculated in reference to the present moment or any other moment in time. The offset is described by an extended OPC formatting expression.

Syntax

OPCTime (base_moment, time_offset)

OPCTime (time_offset)

Parameters

base_moment

A moment in time, relative to which the offset is calculated. In the case of a call option without the base moment the offset is calculated relative to the present moment.

time_offset

Specifies the modification of the base moment used to calculate the function result. The offset is described by an extended OPC formatting expression in the form of:

[NOW|SECOND|MINUTE|HOUR|DAY|WEEK|MONTH|YEAR][cycle[/offset]] [[+|-][number][Y|MO|W|D|H|M|S]...]

The first part of the expression specifies the initial offset, e.g. NOW means the exact base moment, HOUR means the beginning of an hour. The clauses cycle and offset enable the implementation of cycles, e.g. HOUR8/6 enables calculating the beginning of an 8-hour shift, where the first shift starts at 8. The final part of the expression enables additional time offset, e.g. HOUR-15M is 15 minutes before the beginning of the hour.

Example

The following examples assume that the base moment (indicated explicitly or implicitly) is 2011//05/09 11:06:30

NOW (or empty) 2011//05/09 11:06:30

NOW-1H 2011//05/09 10:06:30

HOUR 2011//05/09 11:00:00

HOUR8/6 2011//05/09 06:00:00

DAY+12H+15M 2011//05/09 12:15:00

MONTH-1D 2011//04/30 00:00:00

Or

Intended use

The function is used to calculate the logical sum of many arguments. The effect of its operation is identical to the use of a structure with many operators ||, but in the case of a large number of arguments, the Or function is more effective.

Syntax

Or (arg_1, ... ,arg_n)

Parameters

arg_1, ..., arg_n

More logical sum arguments.

See

And function

Parameter

Intended use

The function returns the value of the parameter used in the diagram or template. The results depend on the context of use. This function used inside a template always retrieves only the pattern parameters.

Syntax

Parameter (parameter name)

Parameters

parameter_name

The name of the parameter that must be retrieved from the set of parameters of the diagram or template.

Example

Parameter(room)

The parameter room is retrieved. If, in the expression which defines the object property, no additional functionality is required, the above reference may be replaced with the short notation:

%room

PI

Intended use

Returns the value of pi.

Syntax

PI ()

See

- Sin, Cos, Tan functions

Pow

Intended use

The function calculates the value of a number raised to a given power.

Syntax

Pow (base, power)

Parameters

base

The number to be raised to a power.

power

The value of the power.

See

- Sqrt function

Property

Intended use

The function returns the value of the global property with the given name.

Syntax

Property (property_name)

Parameters

property_name

The name of a global property that should be retrieved.

Example

Property(g1)

The definition of the global property with the name g1 is retrieved. If, in the expression which defines the object property, no additional functionality is required, the above reference may be replaced with the short notation:

!g1

See

- LocalProperty functions

RangeAggregate

Intended use

The function returns the aggregate of historical values of the process variable from the indicated time horizon.

Syntax

RangeAggregate(aggregate_name, horizon_start, horizon_end, refresh_period)

RangeAggregate(variable_name, aggregate_name, horizon_start, horizon_end, refresh_period)

Parameters

aggregate_name

The aggregate name to be calculated. The available names are the following: none, start, end, delta, min, max, range, total, average, average0, sumup, sumdown, prevknown, last, stdev, rms, avglk, totallk. The name none means retrieving raw data. A description of the aggregates is to be found in the documentation of the Aspad archiving module (See: Asix.Evo_Types_of_Archival_Data_Aggregates.PDF).

horizon_start

The beginning of the horizon for the computed aggregate. It can be a date and time value (DateTime) or a text which may be converted into date and time. Acceptable formats are the system format and OPC (see functions ToDateTime and OPCTime).

horizon_end

The end of the horizon for the computed aggregate. It can be a date and time value (DateTime) or a text which may be converted into date and time. Acceptable formats are the system format and OPC (see functions ToDateTime andOPCTime).

refreshing_period

The period of refreshing the historical data readout. It can be a time span value (TimeSpan) or a text which may be converted into a time span (see the function ToTimeSpan).

variable_name

The variable name whose historical values are loaded. The variable suffix names may be used as well. In the case of function variant without indicating a variable name, the variable resulting from the context of use is applied.

Example

RangeAggregate(min,”HOUR”,”NOW”,”00:00:10”)

The function returns the minimum value of the context variable of the period from the beginning of the hour to the present moment. The function value is recalculated every 10 seconds.

RangeAggregate(z1, average,”HOUR-1H”,”HOUR”,”00:01:00”)

The function returns the average value of the variable z1 from the period of the last ended hour. The value of the function is recalculated every 1 minute.

See

- HorizonAggregate, ToDateTime, OPCTime, ToTimeSpan functions

- Types of Archival Data_ Aggregates

- Data Server, Aspad

RateOfChange

Intended use

The function calculates the speed of value changes for any expression. Typically it is used in the conditional strategy of detecting alarms as part of the expression used in the detection parameters.

Syntax

RateOfChange(value, calculation_frequency)

Parameters

value

The expression whose speed of value changes is monitored.

calculation_frequency

The period of time expressed in seconds which determines how often the speed of changes of the monitored value is calculated.

Example

RateOfChange(Variable(s1),5)>20

The average speed of value changes in the last calculation period is calculated every 5 seconds. Then it is checked whether the speed is greater than 20 units/second.

See

- DeadBand, DelayedState functions

- System of Alarms > Conditional Strategy

RawValue

Intended use

The functions returns the current raw value of a process variable. This is a variable original value read out by a driver of a communication channel, before applying the conversion function defined in the variable database in the Readout conversion function attribute. The main use of the function is to access to the variable value in the expressions used in the Readout conversion function attribute in order convert the raw value of the variable. The variable value calculated this way is then available through the Variable function.

NOTE: if the Asix6 communication channel is used, the value returned by the function is pre-calculated by the Asmen communication module based on the ConversionFunction attribute.

Syntax

RawValue ()

RawValue (variable_name)

Parameters

variable_name

The name of a variable the current value of which must be returned. The variable suffix names may be used as well. In the case of function variant without indicating a variable name, the variable value resulting from the context of use is retrieved. If using a function in the expression of the Readout conversion function attribute, the contextual variable is the variable to which the attribute definition applies.

See

- Variable, NewValue functions

RelToAbsX

Intended use

The function converts the horizontal coordinate or the width from the relative value expressed in pixels relative into an absolute value (0 to 1 000 000). The absolute values ​​are stored in the coordinates definitions. Switching to the relative values is performed during displaying an object, and is adjusted to the actual size of a diagram. The absolute coordinate of 1 000 000 corresponds to the right edge of diagram. This function is used in a case of motion implementation or object resizing.

Syntax

RelToAbsX(coordinate_X)

Parameters

X_coordinate

The X coordinate or the width of the object in relative units (pixels) to be converted to an absolute value.

See

- AbsToRelX, AbsToRelY, RelToAbsY functions

- Techniques of Diagram Creation > Motion Animation and Object Resizing

RelToAbsY

Intended use

The function converts the vertical coordinate or the height from the relative value expressed in pixels relative into an absolute value (0 to 1 000 000). General rules of use are the same as in the case of the function RelToAbsX

Syntax

RelToAbsY(coordinate_Y)

Parameters

Y_coordinate

The Y coordinate or the height of the object in relative units (pixels) to be converted to an absolute value.

See

- AbsToRelX, AbsToRelY, RelToAbsX functions

- Techniques of Diagram Creation > Motion Animation and Object Resizing

Replace

Intended use

This function creates a text by replacing all occurrences of specified substring to another string.

Syntax

Replace(text, old_text, new_text)

Parameters

text

The text on the base of which the modified text is created.

old_text

The string to be replaced with new content.

new_text

The new string that replaces the old content.

See

- Substring, Concat functions

Round

Intended use

This function rounds a floating point number to a specified number of fractional digits.

Syntax

Round (value, digits_number)

Parameters

value

The value to be rounded.

digits_number

The number of fraction digits in the return value.

Example

Round (Variable(), 3)

The call returns the value of a contextual variable rounded to three decimal places. If the aim would be to only display the rounded value on the screen, the text formatting function Format may also be used as follows:

Format(”{0:f3}”,Variable())

See

- Format function

Sin

Intended use

The function calculates the value of the sine function.

Syntax

Sin (angle)

Parameters

angle

The argument of the sine function in radians.

Example

Sin(PI() * Variable(z1) / 180)

This function calculates the sine of an angle indicated in degrees and taken from the value of the z1 variable.

See

- Cos, Tan, Pi functions

Sqrt

Intended use

The function calculates the square root.

Syntax

Sqrt (argument)

Parameters

argument

The argument of the square root function.

See

- Pow function

Substring

Intended use

The function returns a text which is part of the text specified in the function call.

Syntax

Substring(text, start)

Substring(text, start, length)

Parameters

text

The text from which the fragment will be cut.

beginning

Index of the first character of the fragment to be cut. The number of the first character is 0.

length

Number of characters to be cut out. The lack of a parameter means cutting out all the characters until the end of the text.

Example

Substring(Attribute(Description), 0, 10)+"..."

The expression returns the first 10 characters from the description of the context supplemented by the characters....

See

- Replace, Concat functions

TableElement

Intended use

The function returns the indicated element of the array. The function is primarily intended to access array elements of process variables in the expressions used in object properties.

Syntax

TableElement(array, index)

Parameters

array

The value of the array, an element of which is to be retrieved. Typically this is the value of the array process variable. A text may also be used - in this case a single character will be returned.

When the array is two-dimensional, a subarray is returned, which contains all the elements in the second dimension corresponding to the index indicated in the first dimension.

index

Index of the item which is to be retrieved. The first element has an index equal to 0.

Example

TableElement(Variable(),0)

The function returns the first element of the array value of the contextual variable.

See

- TableLength function

TableLength

Intended use

The function returns the number of elements in the array value.

Syntax

TableLength (array)

Parameters

array

The value of the array, whose number of elements is retrieved. Typically this is the value of the array process variable. A text may also be used - in this case the length of the text will be returned.

Example

TableLength(Variable())

The function returns the number of elements in the contextual variable value.

TableLength(Attribute(Name))

Returns the length of the context variable name.

See

- TableElement function

Tan

Intended use

The function calculates the value of the tangent function.

Syntax

Tan (angle)

Parameters

angle

The argument of the tangent function in radians.

See

- Sin, Cos, Pi functions

Text

Intended use

The function returns a text from the multilingual text pool. The returned text variant is appropriate for the present working language. Using the function in the definition of the Text property for the Text object will cause that at the moment of changing the language the object will automatically change the displayed text.

Syntax

Text (text_ID)

Parameters

text_ID

Multilingual text identifier defined in the application.

See

- Application Parameterization > Parameterization of Multilingual Applications

ToAsix6Date

Intended use

The function converts the date and time type value (DateTime type of .NET) or a textual description of the date and time into the number of seconds elapsed since 1/1/1970. The return value is an unsigned 32-bit number. This function is used mainly when converting the Asix6 application.

Syntax

ToAsix6Time (date_time)

Parameters

date_time

Converted date and time, which can be:

  • the value of date and time type (DateTime)

  • a text the format of which is compatible with the format used in the ToDateTime function

See

- ToDateTime, FromAsix6Date, OPCTime functions

ToAsix6Time

Intended use

The function converts the value of a time span (TimeSpan type of .NET) or a textual description of the time span into the number of milliseconds. The return value is an unsigned 32-bit number.

Syntax

ToAsix6Time (time_span)

Parameters

time_span

Computed time span, which may be:

  • the value of a time span (TimeSpan)

  • a text the format of which is compatible with the format used in the ToTimeSpan function

Example

ToAsix6Time(”30:00”)

The value obtained is equal to the number of milliseconds in a 30-hour period.

See

- ToTimeSpan, FromAsix6Time, OPCTime functions

ToBool

Intended use

The function converts the value of the argument into a boolean true/false.

Syntax

ToBool (value)

Parameters

value

The value to be converted. In case of numeric values, if the value is different from 0, the returned value is true, otherwise false is returned. If the parameter is a text, first an attempt is made to convert the text into a number.

Example

ToBool(Attribute(important))

The contents of the important attribute of the context variable are retrieved from the variable definition base. Then the contents of the attribute are converted into a number and again converted into a boolean value. It is also permissible to place true or false texts directly in the attribute.

ToDateTime

Intended use

The function converts the textual description of the date and time into a numeric date and time format (DateTime type of .NET)

Syntax

ToDateTime (date_time)

Parameters

date_time

The date and time in text format. Any format recognizable by the system as a date and time is permitted. If only time is given, the present day will be assumed as the date.

Example

DateTime(”15:10”)

The resulting value will be equivalent to 15:10 hours and the date of the current day.

DateTime(Variable(z1))

The value of the variable z1 is returned in date and time format. The value of the variable must be a text which may be converted into date and time.

See

- ToAsix6Date, FromAsix6Date, OPCTime functions

ToDouble

Intended use

The function converts the value of the argument transferred in the parameter into a double-precision floating point number.

Syntax

ToDouble (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number.

Example

ToDouble(Variable(i1))/Variable(i2)

If the variables i1 and i2 are integer, then dividing the values of these variables would also return an integer, for example, 4/8 = 0. Conversion of one of the arguments of the division into a floating-point makes the result accurate, 4/8 = 0.5.

See

- ToSingle function

ToFullPath

Intended use

The function returns the absolute file path for the path indicated for the definitions directory of the application.

Syntax

ToFullPath (file_name)

Parameters

file_name

The name of the file or directory which will be completed including the full path of the application directory. An empty file name will return the application directory path.

ToInt8

Intended use

The function converts the value transferred in the parameter into a 8-bit signed integer.

Syntax

ToInt8 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted

See

- ToInt16, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToInt16

Intended use

The function converts the value transferred in the parameter into a 16-bit signed integer.

Syntax

ToInt16 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted

Example

ToInt16(Variable(z1)&0xffff)

The operation & limits the value of the z1 variable to the range of a 16-bit number.

See

- ToInt8, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToInt32

Intended use

The function converts the value transferred in the parameter into a 32-bit signed integer.

Syntax

ToInt32 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted.

See

- ToInt8, ToInt16, ToInt64, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToInt64

Intended use

The function converts the value transferred in the parameter into a 64-bit signed integer.

Syntax

ToInt64 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted.

See

- ToInt8, ToInt16, ToInt32, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToSingle

Intended use

The function converts the value of the argument transferred in the parameter into a single-precision floating point number.

Syntax

ToSingle (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number.

See

- ToDouble function

ToTimeSpan

Intended use

This function converts a text description of the time span into the time span format (TimeSpan type of .NET)

Syntax

ToTimeSpan (range)

Parameters

range

The time range is transmitted in text. The following conventions are supported:

  • d.h:m:s h:m:s h:m, where d, h, m, s are non-negative numbers indicating days, hours, minutes and seconds respectively, e.g.: "3.10:5:4" or "123:00"

  • a string consisting of the components of the set (nd, nD, nh, nH, nm, nM, ns, nS), where n is a non-negative number, a, d, h, m, s stand for days, hours, minutes and seconds respectively, e.g.: "20d" or "3D 4H 2M 1S" or "15M10s"

See

- ToAsix6Time, FromAsix6Time functions

ToUInt8

Intended use

The function converts the value transferred in the parameter into a 8-bit unsigned integer.

Syntax

ToUInt8 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted

See

- ToInt8, ToInt16, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToUInt16

Intended use

The function converts the value transferred in the parameter into a 16-bit unsigned integer.

Syntax

ToUInt16 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted

See

- ToInt8, ToInt16, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt32, ToUInt64 functions

ToUInt32

Intended use

The function converts the value transferred in the parameter into a 32-bit unsigned integer.

Syntax

ToUInt32 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted.

See

- ToInt8, ToInt16, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt64 functions

ToUInt64

Intended use

The function converts the value transferred in the parameter into a 64-bit unsigned integer.

Syntax

ToUInt64 (value)

Parameters

value

The value to be converted. If the parameter is a text, first an attempt is made to convert the text into a number. In the case of conversion from floating-point the value is rounded. Numbers which are too large for the destination format cannot be converted.

See

- ToInt8, ToInt16, ToInt32, ToInt64, ToUInt8, ToUInt16, ToUInt32, functions

Variable

Intended use

This functions returns the current process variable value after completing all the calculations resulting from the variable definition in the variable database definition. Access to the non-converted value is possible through the RawValue function.

Syntax

Variable ()

Variable (variable_name)

Parameters

variable_name

The name of a variable the raw value of which must be returned. The variable suffix names may be bused as well. In the case of function variant without indicating a variable name, the variable value resulting from the context of use is retrieved.

Example

Variable(“#_lmt”)

The process variable value, with the name constructed by adding the suffix _lmt to the variable name resulting from the context of use, is read. If the expression is used in a place which will require a transition into text form, the conversion will be done in the default way for the type of value. If formatting control is required, the VarStringValue or Format functions should be applied.

See

- VarIsGood, VarIsNotGood, VarStatus, VarTime, RawValue, VarStringValue, Format functions

VarIsGood

Intended use

The function returns a Boolean value which determines whether the status of the variable value is correct. In a typical application the function is used in the conditions of object states.

Syntax

VarIsGood ()

VarIsGood (variable_name)

Parameters

variable_name

The name of the variable, the validity status of which is returned. The variable suffix names may used as well. In the case of function variant without indicating a variable name, the variable status resulting from the context of use is verified.

See

- VarIsNotGood, VarStatus, VarTime functions

VarIsNotGood

Intended use

The function returns a Boolean value indicating whether the status of the variable value is incorrect, i.e. the current variable value is unreliable. In a typical application the function is used in the conditions of object states.

Syntax

VarIsNotGood ()

VarIsNotGood (variable_name)

Parameters

variable_name

The name of the variable, the validity status of which is returned. In the case of function variant without indicating a variable name, the variable status resulting from the context of use is verified.

See

- VaIsGood, VarStatus, VarTime functions

VarStatus

Intended use

The function returns the full numeric status of the variable value, compliant with the OPC standard. In a typical application the function is used in the conditions of object states.

Syntax

VarStatus ()

VarStatus (variable_name)

Parameters

variable_name

The name of the variable, the value status of which is returned. The variable suffix names may be used as well. In the case of function variant without indicating a variable name, the variable status resulting from the context of use is returned.

Example

(VarStatus()&0xc0)==0xc0

The function of this call is identical with using the VarIsGood () function.

See

- VarIsGood, VarIsNotGood, VarTime functions

VarStringValue

Intended use

This functions returns the text value of the process variable created based on the format defined in the variable definition database. An alternative method of formatting the value is the Format function.

Syntax

VarStringValue ()

VarStringValue (variable_name)

Parameters

variable_name

The name of a variable the raw value of which must be returned in text format. The variable suffix names may be used as well. In the case of function variant without indicating a variable name, the variable value resulting from the context of use is retrieved.

Example

Concat (VarStringValue(), ” ”, Attribute(Unit))

The returned element is a text consisting of the formatted value of the process variable and the name of the unit taken from the variable definition database.

VarStringValue(z1)

Returns the value of the z1variable in text form. If the additional functionality is not needed, the same effect can be achieved in the definition of object properties through the abbreviated notation:

&z1

See

- Variable, Format functions

VarTime

Intended use

The function returns the time of the last update of the process variable value. In the case of typical communication channels this is the time of the last refresh. The time of the variable can change even if the value of the variable does not change. In the case of a virtual channel the update time is the time of the last recording of the variable.

Syntax

VarTime ()

VarTime (variable_name)

Parameters

variable_name

The name of the variable, the value update time of which is returned. The variable suffix names may be used as well. In the case of function variant without indicating a variable name, the variable update time resulting from the context of use is returned.

See

- VarIsGood, VarIsNotGood, VarStatus, Variable functions

XOnScreen

Intended use

The function converts the horizontal coordinate from the relative value for the indicated screen to the absolute value for the full desktop. The function is intended for use in OpenWindow and OpenDiagram actions. This allows the positioning of opened windows on the selected monitors without having to know the exact configuration of the system.

Syntax

XOnScreen( coordinate_X, monitor)

Parameters

X_coordinate

Relative value of the horizontal coordinates.

monitor

Monitor number in reference to which the relative coordinate coordinate_X will be converted into the absolute coordinate of the desktop. A value of 0 means using the monitor on which the mouse cursor is located. Values greater than 0 are the numbers of monitors in accordance with the numbering of the operating system.

Example

OpenDiagram ( diag1, pokoj=11, null, $Dialog, XOnScreen(0,2), YOnScreen(0,2), “NoTitleBar,FixedSize”, $None )

The action opens a diagram window in the upper left corner of the second monitor.

See

- YOnScreen function

- Operator Actions > OpenDiagram, OpenWindow actions

XorColor

Intended use

The function returns the complement (XOR) of the specified colour.

Syntax

XorColor (colour)

Parameters

Colour

The colour parameter can have a numeric value taken from the properties of an object or obtained by means of the Color function. The colour can also be indicated in textual form, as a colour name or numeric values separated by semicolons.

Example

XorColor (red)

The call returns the complement of red.

XorColor(LocalProperty("Color"))

The call returns the complement of the colour taken from the Colour property of the object.

See

- Color function

YOnScreen

Intended use

The function converts the vertical coordinate from the relative value for the indicated screen to the absolute value for the full desktop. General rules of use are the same as for the XOnScreen function.

Syntax

YOnScreen( coordinate_Y, monitor)

Parameters

Y_coordinate

Relative value of the vertical coordinates.

monitor

Monitor number in reference to which the relative coordinate coordinate_Y will be converted into the absolute coordinate of the desktop. A value of 0 means using the monitor on which the mouse cursor is located. Values greater than 0 are the numbers of monitors in accordance with the numbering of the operating system.

See

- XOnScreen function

- Operator Actions, OpenDiagram, OpenWindow actions


Welcome

Home > System of Alarms

>> Help for Asix

www.asix.com.pl

Asix.Evo - System of Alarms


1 Basic Concepts

The Asix.Evo system features built-in flexible, customisable alarm management system which provides full functionality for handling the emergency situations and events occurring during the technological process.

The Asix.Evo alarm system is organised in the so-called domains. The domain is identified by the name and virtually is fully functional and independent of other domains standalone system. The domains allow for logical and functional allocation of alarms to some independent areas. In a typical application, the application uses a single domain to handle all the alarms. In more complex cases where the application supports multiple independent installation, it may be useful to divide the alarms on several domains.

Note:

In the Asix applications, the so-called network name of the alarm container was the direct equivalent of the domain. The main difference is the ability to use multiple, simultaneously active Asix.Evo domains.

The alarm states are identified by means of the alarm detection strategy. There are different types of strategies detecting alarms the by various methods.

Detected alarms are stored in two logs:

  • Active alarm log

It stores information about all currently active alarms. When properly parameterized it may also contain information on the alarms recently ended.

  • Historical alarm log

It provides long term storing of the information about all detected alarms.

The registered alarms can be viewed using tables of active and historical alarms. Active alarm statuses can also be shown directly on the synoptic diagrams.

For applications using multiple Asix.Evo workstations, the state of the alarm system is synchronized between these workstations. The workstations being activated reconcile the active alarm state and update the historical alarm archive. The alarm handling carried out by the operator is also synchronized, such as acknowledgement of the alarm at the one of workstation is immediately visible on the other workstations.

The Asix.Evo application alarms are identified by name. All alarm parameters (description, category, detection method, etc.) are stored in the alarm definition database. The definitions can be imported from the Excel worksheets.


2 Alarm System Parameterization

The alarm system parameterization is carried out in the Alarm system configuration panel opened by selecting the Alarms System node of the Application Explorer panel.

Fig. Alarm System Configuration Panel.

The configuration panel consists of two sections. The left one is used to create and select domains. In the right one, the domain parameterization can be done using the switchable tabs. The particular tabs allow for:

  • Stations

Determination of the role performed in the alarm system by the individual workstations defined within the application.

  • Strategies

Defining the alarm detection strategy.

  • Alarms

Defining the domain alarms.

  • Settings

The parameterization of various elements of the domain, such alarm log operation method.

  • Sources

Determining the sources of alarm definitions (Excel worksheets), and importing a definitions from these sources.


3 Workstation Roles

Each of the workstation participating in the domain operation performs a specific role in that domain. The workstations may perform one of the following roles:

  • Controller

The workstation participates actively in the alarm handling process. The controllers are responsible for the detection of alarms and sending information about the alarm statuses between workstations. Each domain must have at least one controller type workstation. In order to provide redundancy, a larger number of controllers may be used. In this case, the active controller is selected automatically during the operation. Other controller workstations temporarily switch to the controller operation mode similar to the terminal workstations. However, they are still ready to take over the active controller function. The alarm detection strategies may be also running on them.

Each controller has an priority assigned. In situations where there is an active controller reconciled, the controller of the highest priority is chosen, provided that it is possible.

  • Terminal

The terminal workstations are used only to show the alarm status and provide the operator's functions. The terminal can not operate independently, must be connected to the controller. The connection may be direct or via a gateway. In the latter case, the gateway workstation names should be specified in the workstation parameterization, in the Gateways column. If the gateways are not specified for the terminal, this terminal will connect only with the domain active controller.

  • Gateway

The alarm handling functionality is the same as in the case of terminals. The gateway may additionally serve as an intermediary in the exchange of data between the terminal workstations and the controller. The gateways are used when the terminals are in a different network than the controller workstations. Another application is to use the gateway to reduce the controllers usage (in particular when the number of terminals is large).

  • None

If no role has been selected, this workstation does not participate in the domain operation and do not have access to the domain alarms.

In the simplest case, the application may consist of a single workstation acting as a domain controller. The following diagram shows the configuration with the two redundant controllers. One terminal retrieves the alarm details directly from controllers. Two other terminals connected to the network, which has no direct connection with the controllers, use the workstation acting as a gateway.

Some restrictions on the roles available in the alarm system are introduced by the role which the workstation performs in the communication system. Only the workstation which is the communication server may act as a controller or gateway.


4 Alarm Definition Database

All alarms used in the Asix.Evo application must be defined in advance. It can be done via the alarm table in the Alarms tab.

Fig. Definition of Alarms.


4.1. Attributes

The alarm definition consists of attribute set. The meaning of each attribute is described in the table below.

Name

Meaning

ID

Alarm Text ID

Priority

The alarm priority indicating the alarm importance. The following priorities are available (in descending order of importance):

  • Critical

  • Urgent

  • Alert

  • Warning

  • Message

Alarms of different priorities are displayed in the alarm tables, highlighted with a different colours. A critical and urgent alarms need a selective acknowledgement.

Category

Specifies the alarm category. Two categories are available: Normal and Start only. The difference between the Start only and Normal alarm is that only the beginning event is detected for the Start only. The Start only alarms have no ends.

Strategy

Specifies the name of the strategy used for the alarm detection. The detection strategy parameterization method is described in the separate section.

Detection parameters

Specifies the parameters used for alarm detection. The attribute form depends on the type of strategy used. The detection strategy parameterization method is described in the separate section.

Start text

Specifies the text describing the alarm beginning event. The text creation and use are described in the separate section.

End text

Specifies the optional text describing the alarm end event. If the text is not defined, the alarm end is described in the same way as its beginning. The text creation and use are described in the separate section.

Parameter formatters

Upon detection of an alarm, the alarm may forward some additional detection parameters altogether with the alarm notification. The set and importance of parameters is specific to a specific type of strategy. At the time of notification, the parameter values are converted to text format. The Parameter formatters attribute allow controlling the conversion. This attribute is a collection of formatting texts; the successive elements are used to format the successive detection parameters. The formatting text is as follows:

[-]Width:Format

Width specifies the minimum width of the text generated. If necessary, the text is supplemented by spaces. An optional minus sign indicates alignment of the field to the left. Format specifies the conversion method being in accordance with the one used in the .NET platform.

Example:

0:f3

Conversion into floating point format rounded to three decimal places. The length of the text corresponds to the converted parameter value.

6:d

Conversion into an integer. The field will have 6 characters as minimum, and a number will be aligned to the right.

Expression

Specifies an expression whose value at the time of the beginning and end of the alarm is recorded in the log. The value of the expression can be displayed in the contents of the text of the alarm beginning or end. This value is also shown in the alarm details window accessible via the buttons of alarm tables.

Action

Specifies the action associated with the alarm. The operator may execute the action pushing the button available in the active alarm table.

Sound

Specifies the name of the sound that should be played at the alarm occurrence.

Sound looping

Determines if an alarm sound should be repeated until it will be muted by the operator. The sound can be muted with the button located in the active alarm table or by the StopSound operator action.

Alert mode

Specifies if an alarm is to be signalled by means of SMS or e-mail messages through the AsAlert program. The use of AsAlert is described in the separate section.

Alert recipients

Specifies the recipients to which, through the AsAlert program, a notification should be sent. The use of AsAlert is described in the separate section.

Grouping attributes

The names and number of grouping attributes are determined by the application designer. The grouping rules are described in the separate section.


4.2. Alarm Description Texts

An alarm definition contains two texts describing the alarm - the text for the beginning event and the text for the end event. The end event text is optional. The alarm texts are used in the alarm table objects. The application designer chooses which texts are to be displayed in the alarm line. It is also possible to choose the option that displays only one column of the text, but its contents is determined by the context. If the event relates to the alarm beginning, the beginning text is displayed. If the event relates to the alarm end, the end text is displayed (if defined).

The alarm text can include additional information. This may be the expression value specified in the Expression attribute or value of the alarm detection parameter (notified by the alarm strategy, scripts or operator actions). To insert this additional information to the alarm text, the tags in form of {number} should be inserted in the text. Number 0 means insertion of the expression value specified in the Expression attribute. The numbers 1 and higher relate to the successive alarm detection parameters.

Example:

Exceeded limit of {2}, value {1}, machine state {0}

The machine state is taken from the Expression attribute, and the limit and the value are derived from the alarm notification (e.g. in the user script).

The elements inserted in the alarm texts can not be additionally formatted. This is because both the expression and detection parameters are converted into a text at the time of the alarm notification, and the alarm text is used only at the time of its display. If conversion of other type than the default is needed, the Parameter formatters attribute should be properly defined for the detection parameters, and appropriate conversion should be ensured for the expression, inside this expression (e.g. using the Format function).


4.3. Alarm Groups

The Asix.Evo alarm system features flexible alarm selection mechanism using the so-called grouping attributes. The first step in parameterization of alarm grouping is to create a set of grouping attributes. The following picture shows the section of the Settings tab, where it is possible to add any number of attributes used for grouping. Each attribute is defined by a group ID and descriptive text. The ID is of organizing significance and the descriptive text is used in all user interfaces.

Fig. Definition of Alarm Groups.

When the grouping attributes are defined, the alarm definitions of the Alarms tab will be expanded with additional columns.

Fig. Column of Groups.

Each alarm should be provided with the grouping attribute values. Alarms of the same attribute value belong to the same group.

In the application run mode, the user may select the alarms shown in the historical / active alarm table using pre-defined groups. The selection criteria button opens the window in which the user may select the groups to be shown.

Fig. The 'Alarm groups filtering' Window.

The above example should be interpreted as follows: these alarms will be shown which TYPE attribute is equal to Electrical.


4.4. Import from Excel Spreadsheets

For applications with higher number of alarms it can be useful to define alarms in MS Excel spreadsheets and to generate alarm definition databases based on them.

Support for the import function of Ms Excel spreadsheet is provided by the Sources tab.

Fig. Accessing to the MS Excel import function.

It is possible to define any number of source spreadsheets. After pressing the Import alarms and groups from source button, the alarm definition database based on the current contents of the spreadsheets will be created.

The picture below shows a sample spreadsheet of alarm definitions.

Fig. Alarm Definition Spreadsheet.

The easiest way to create a proper model of alarm definition spreadsheet is to use the Create template Excel source file button. The model created will take into account the languages defined in the application and a grouping attributes added.

It is also possible to create Excel file including all the currently defined alarms, using the Export all to single Excel file button.


5 Alarm Detection Strategies

Each alarm domain may use free number of alarm detection strategies. The strategies may be parameterised in the Strategies tab of the alarm system parameterization panel.

Fig. The 'Strategies' Tab of the Alarm System Parameterization Panel.

The alarm detection strategy my be, by analogy, considered as a communication channel which is used to report an alarms. Each strategy can be run only on a single controller (active or passive) within the domain. The active controller always determines on which controller the strategy is to be run. Each strategy is defined by:

  • Name

The name identifying the strategy. The alarms which in their definition, in the Strategy attribute have a name specified, are detected by this strategy.

  • Type

Specifies the type of strategy, and consequently the alarm detection method. Available types of strategies are described later in this documentation.

  • Controllers

Specifies a list of controller workstation names on which the strategy may be run. An active controller with appropriate permissions will run the strategy on its own workstation. If not, it chooses one of the controllers listed.

  • Enabled

Specifies whether the strategy is to be used.

  • Other parameters

Depending on the type of the strategy chosen the additional parameters may be required to set.


5.1. Bitwise Strategy

Fig. Bitwise Strategy.

The bitwise strategy is designed to detect alarms on the basis of a single bit of a particular process variable.

For the alarms controlled by the bit strategy, the Detection parameters attribute in the alarm definition must have the following form:

variable_name.bit_no [r]

variable_name specifies the name of the process variable controlled, bit_no determines the number of the bit controlled (least significant bit is marked with 0 number), and the r optional letter indicates the use of reversed detection logic (change the bit value from 1 to 0 indicates on the alarm beginning).

The state of many process variables may be controlled within a single strategy. There is no limit on the size of the variables controlled.

Example:

al100.1r

The alarm beginning will be detected at the change of the bit numbered 1 (bitmask 0x0002) of the al100 variable from 1 to 0.


5.2. Conditional Strategy

Fig. Conditional Strategy.

The conditional strategy is designed to detect alarms based on monitoring the value of any expression specified as the alarm detection parameter.

For the alarms controlled by the conditional strategy, the Detection parameters attribute in the alarm definition must have an arithmetic expression form. The expression monitored must return a boolean type result. The expression value change from false to true, indicates the alarm beginning while the reversed change indicates the alarm end.

The function set provided by Asix.Evo includes the functions dedicated specifically for use within a conditional strategy:

  • DeadBand - limit exceeding control with hysteresis

  • DelayedState - detection of lack of anticipated process state changes

  • RateOfChange - monitoring the expression value change rate

Example:

Variable (Speed1)> 1000 && (Variable (SMode) & 1)

The alarm is activate when the Speed1 variable value will be greater than 0 and the lower bit of the SMode variable will be set.

DelayedState (Variable (MState) & 0x100, 15, Variable (MState) & 0x200)

The alarm is active when the bit numbered 9 of the MState variable will not be set within 15 seconds after setting the bit numbered 8.


5.3. Buffered Strategy

Fig. Buffered Strategy.

The buffered strategy is a special strategy that allows for precise detection of alarms with millisecond resolution while ensuring the event sequence maintaining. However, the strategy requires integration with the driver software. The driver is responsible for the alarm detection and alarm time stamping. The exact description of the data exchange protocol is included in the help file of the Asix 6 system (DrBUFOR.PDF).

The buffer strategy requires additional parameters related to the data exchange protocol used between the controller and Asix.Evo application:

  • Buffer variable - the variable through which alarm status information is passed. The value of the variable must be an array of 8 - or 16-bit unsigned integers.

  • Synchronizing variable - the variable used to synchronise access to the alarm buffer. The value of the variable must be 16-bit unsigned integer.

  • Alarms map request variable - the variable through which Asix.Evo may inquire sending the current statuses of all alarms. The value of the variable must be 16-bit unsigned integer.

For the alarms controlled by a buffer strategy, the Detection parameters attribute in the alarm definition must be next alarm number available in the alarm pool supported by the strategy. The first alarm of the strategy is 0.


5.4. Asix Strategy

Fig. Asix Strategy.

The Asix strategy is a special strategy, which allows taking over the alarms from the Asix application. It is used in the configurations in which the Asix.Evo application serves as the browser version of Asix application.

The first step in strategy parameterization process is to configure the Asix application to create an alarm export file. It may be done by means of the Architect program of the Asix package, in the SQL type alarm archive configuration tab. This is shown on the following picture:

Fig. Configuration of the Asix Application to Create an Alarm Export File.

It is important to specify name FILE in the Microsoft SQL server name column.

The Asix strategy has one additional parameter named Alarm source files. It should specify the path to the file in which the Asix application stores the alarm events. When connecting to the application with redundant alarm servers it is necessary to specify paths to export files of all the servers. The export file is created in the alarm log directory of the Asix application. In the case shown in the picture the correct name is:

C:\AsixApp\Fabryka\Alarms\FILE_Factory.xml

An additional requirement is a correspondence between the alarm number in the Asix system and the alarm ID in Asix.Evo, e.g. the notification of alarm no. 100 in Asix causes the notification of alarm ID 100 in Asix.Evo.


5.5. External Strategy

Fig. External Strategy.

The external strategy is designed to handle alarms, the changes of which are reported using the StartAlarm and EndAlarm operator actions or using scripts, and Cancel and Raise functions of the IAlarm interface. The strategy itself features no alarm detection methods. It serves as a container for alarms reported with external methods. Despite the fact that the strategy itself does not report alarms, subject to normal management by the active controller. The strategy is active at only single workstation at the given moment - this means that if a script running on different workstations repeatedly raise the same alarm, this alarm will be accepted only on the single workstation (on which the strategy is running).


5.6. External Global Strategy

The external global strategy works in a similar way to the normal external strategy. The global strategy is not defined anywhere. It is always created. The alarms, which in its definition has no strategy name specified are automatically allocated to a default external strategy.

The only difference in the functioning when compared to the normal external strategy is the lack of activity control. The global strategy is always active - the notification of alarm belonging to it is always accepted. The application designer must ensure that the alarm notifications are not duplicated on different workstations.


6 Active Alarm Log

The active alarm log keeps information of all currently activated alarms. Depending on configuration, it can also store information about alarms recently terminated. The alarms stored in the log are shown in the active alarm tables.

The operation mode of active alarm log is parameterized in the section of Settings tab shown below.

Fig. Parameterization of the Operation Mode of Active Alarm Log.

The available operation modes are described in the table below.

Tab. The available operation modes of Active Alarm Log.

Mode | Method of operation
Immediately | The alarm is removed from the log immediately after its termination, regardless of any other conditions. It should be noted that in this mode, alarms of Start only category will never be stored in the active alarm log, as they are considered as immediately terminated.
On acceptation | The terminated alarm is deleted only when confirmed by the operator.
On acceptation or timeout | The terminated alarm is deleted only when confirmed by the operator or when the time specified in the Timeout parameter has elapsed.

Note:

Regardless of the mode used to remove the alarms terminated, the active alarm table objects may introduce their own buffering (Remove finished alarms property), which results in displaying the alarm already deleted from the active alarm log. However, it is necessary for the table to be open when the alarm was included in the active alarm log.


7 Historical Alarm Log

The historical alarm log stores information on all alarm events, both the alarm beginning and end. The log may keep an event history for many days.

The operation mode of historical alarm log is parameterized in the section of Settings tab shown below.

Fig. Parameterization of the Operation Mode of Historical Alarm Log.

Basic alarm log, used for the current alarm handling is created at each domain workstation. The contents of the historical logs of the respective workstations are mutually synchronised. By default, the log is stored in a local file; in the Remove historical alarms older than [days] parameter it may be specified how long the alarm event information is to be kept. If the option Write historical logs file is not checked, the historical log is stored only in the memory when the application is running. After restarting the application, the log will be created from scratch.


7.1. SQL Alarm Archive

The standard historical alarm log is completed with SQL type alarm archive. The archive is used in the alarm analysis performed with the AsAlarm program and in the reporting systems. In order to improve the reliability, it is possible to create archives on multiple servers simultaneously. But even if a single server is used, the Asix.Evo application provides buffering mechanisms that allow for operation when the connection with SQL Server is lost for a while. The SQL archive should be parameterized identically at each controller workstation. This follows from the fact that a record to the SQL database is executed only by the active controller workstation.

Fig. Alarm Database Manager.

The alarm SQL database must be created prior to start archiving. This is done with the window shown above, opened with the Database manager button. The window also allows performing other administrative tasks. The credentials of the Database server authorization group must provide such permissions in SQL server which allow performing database creation and deletion operations.


8 Alarm State Visualization

The basic elements used to visualize the alarm state are an alarm table objects. There are two types of tables, designed to handle active and historical alarms. Other universal objects may be used as a supplementary for alarm state presentation.


8.1. Active Alarm Tables

The Active Alarms Viewer object displays information on alarms stored in the active alarm log.

Fig. The Active Alarms Viewer Object.

The object can be also operated by the operator. The buttons on the integrated toolbar are used for this purpose.


8.2. Historical Alarm Tables

The Historical Alarms Viewer object displays information on alarms stored in the historical alarm log.

Fig. The Historical Alarms Viewer Object.

The object features mechanisms for easy determination of alarm set shown in the table.


8.3. Other Objects

Alarm status may be shown on standard objects. To do this, use the IsAlarm, IsAlarmUnaccepted or IsAlarmExcluded function. All these functions return information about the status of alarm selected.

The following example shows the parameterization of Text object displaying the value of VA001 variable. If the alarm of A_VA001 ID is active, the variable value is displayed in red.

Basic Properties
 | Main variable | VA001
State properties, Basic Properties
 | Text | #
 | Color | Black
State properties, State {1}
 | State Condition | =IsAlarm(A_VA001)
 | Color | Red


9 Alarm Management

Most of the alarm management function available for the operator may be accessed through the interface of the Active Alarms Viewer object. Some functions can be executed using the operator actions. This allows the application dsigner to integrate maintenance functions directly with the synoptic diagram objects.


9.1. Alarm Acknowledgement

The basic alarm acknowledgement mechanism is provided by the button localised in the toolbar of Active Alarms Viewer object. Pressing this button confirms all visible alarms. Only alarms of urgent and critical priorities require prior selection of the alarm row. An alternative acknowledgement method is to execute the AcceptAlarm operation used in the diagram object event handling.

Alarm acknowledgment function is controlled by a authorization system. The first condition is authorization to acknowledge alarms on the workstation. It is declared in the workstation configuration in the alarm system parameterization panel. The second condition relates to individual permissions of the currently logged user. The user must play a role that has Alarms acceptation right permission.


9.2. Alarm Exclusions

Alarm exclusion mechanism provides possibility to exclude any alarm from handling. All events relating to the alarm excluded are ignored. Exclusions are useful in order to eliminate alarms, which, because of some failure, are not detected correctly.

The exclusion management is done via the window below which is opened by the button from the Active Alarms Viewer object toolbar.

Fig. Alarm Exclusions Editor.

The list shows all alarms that are currently excluded.

Alarm exclusion function is controlled by the authorization system. The currently logged user must perform a role that has Alarm exclusions edit right permission.


9.3. One-time Exclusions

One-time exclusion mechanism allows the operator to remove from the table any active alarm. In contrast to standard exclusions, next detection of the alarm will be reported as normal.

One-time exclusion is performed by selection of the alarm in the active alarm table and pressing the appropriate toolbar button.

One-time alarm exclusion function is controlled by the authorization system. The currently logged user must perform a role that has Alarm exclusion once right permission.


9.4. Alarm Filtering

Alarm filtering mechanism allows restricting the number of alarms notified. The mechanism eliminates short-term alarm events that can result from malfunction of the sensors.

There are two modes of filtering:

  • Short alarms elimination

The short-term changes in alarm statuses are ignored. The status change will be accepted if the new state maintain for a predetermined time.

  • Fast sentences elimination

The sequences of short-term status changes ("vibrating contacts") are ignored. First, even short-term change is immediately accepted, but the next will be accepted only after a waiting period.

The filter management is done via the window below which is opened by the button from the Active Alarms Viewer object toolbar.

Fig. Fast and Short Alarms Filtering Editor.

To enable the filter: choose the alarm by the Add... button, select the filter mode and set the filter time.

Alarm filtering function is controlled by the authorization system. The currently logged user must perform a role that has Alarm filters edit right permission.


9.5. Sound Signalling

An alarm detection may be signalled by a sound signal. This happens when in the alarm definition, in the Sound attribute the audio file name has been specified.

The operator has the ability to mute the sound. The first method is to use the mute button on the toolbar of Active Alarms Viewer object. The second method is to use StopSound operator action.

In a case of applications using several workstations, a sound signal is played on all these workstations. The alarm table toolbar features two different mute buttons. The first one mutes sound only on the local workstation, the second does it on all domain workstations.


9.6. Printing

The alarm printing function is available in the Active Alarms Viewer and Historical alarms Viewer objects. Pressing the Print button will open the following window in which the operator can set print options.

The appearance of the printout, the dataset to be printed and alarm selection criteria can be specified in the print dialogue box. In addition to printing from a printer, the alarm data may be saved to a text file.


10 Integration with AsAlert

The AsAlert program is used in the Asix system applications to send alarm notifications. Depending on the application configuration, the notification may be sent by SMS or e-mail.

The Asix.Evo alarm system may be integrated with the AsAlert program. The interconnection parameterization is performed in two steps. The first step involves basic communication parameters declaration. This can be done in the Settings tab section shown below.

Fig. AsAlert Settings.

The parameters functions are as follows:

  • Station

Defines the Asix.Evo application workstations, which will initiate a notification process. This may be the name of any workstation involved in the domain operation. It is possible to choose option in which the notifications are sent always by the active controller. The right choice depends on system configuration. In each case, the workstation should be active at all times. So the alerts are often sent from the controller workstations. If AsAlert is installed on the computer of one of the controllers, the notification should be send usually from this workstation. Otherwise, generally a better option is the active controller.

  • Localization

The system name of computer on which the AsAlert program is installed. When the local installation is used, the parameter should be left blank.

  • User

The AsAlert program username on account of which notification will be sent.

  • Password

The AsAlert program user password on account of which notification will be sent.

  • Source name

Any text which in the alert will be used as the message sender.

  • Header

Any text which in the alert will be used as the message title.

The second step in the interconnection parameterization is appropriate setting of the Alert mode and Alert recipients attributes in the definition of each alarm, for which the alerts are to be sent. Alert mode enables selecting alert sending condition: on the alarm beginning or end. The names of addressees specified in the AsAlert program, to which the notification is to be sent must be specified in the Alert recipients attribute.


Welcome

Home > Timetables

>> Help for Asix

www.asix.com.pl

Asix.Evo - Timetables


1 Timetables Module Features

The Timetables Module provides for advanced planning of operator action automatic execution. To some extent, in terms of its operation it is similar to the Schedules Module. Basic differences between these modules can be summarised as follows:

a) Timetables are better suited for precise determination of the time of action execution. Schedules are based on a permanent execution cycle.

b) Schedules enable to synchronise action execution with the occurrence of conditions other than time based (such as a predefined value of a process variable). Timetables do not offer this possibility - although action execution can be made dependant on whether a condition is fulfilled at a given time.

c) Timetables operation can be controlled by the operator in the application execution mode. The Schedules Module is configured in its entirety by the application developer.


1.1 Basic Concepts

It is necessary to be familiar with the following terms in order to understand the Timetables Module operating principles:

a) Timetable

The timetable is a basic concept. It can be described as a task which is due to be executed periodically. It consists of the definition and the execution cycles set. The timetable definition describes what operator actions are due to be executed (including their parameters). The principles of operation in network configurations are also specified within the definition.

b) Timetable Cycle

The timetable cycle specifies the time for execution of timetable operator actions. Any number of cycles can be assigned to each timetable. Cycles can be defined by the application user in the execution mode.

c) Days Category

Days categories are used to connect selected days in one set. Categories defined in this way can further be used in cycles definitions. There are predefined categories which cannot be modified by the user and also categories which are created by the application user.


1.2 Network Operation

The Timetables Module fully supports multi-station operation. In such configurations, editing timetables cycles is possible at any station. Any modifications introduced are visible immediately at all stations in the network. At a given time, the timetable is executed at a single station; when the station is switched off the timetable execution is automatically taken over by another station. The role of individual stations is defined independently for each timetable.


2 Timetables Parameterization

The defining panel of the Timetables Module opens via the Timetables node in the application explorer panel.


2.1 Module Operation Mode

Fig. Defining panel of the Timetables Module.

Storage location for the module configuration and, consequently, the method of operation in multi-station configurations must be specified in the Timetables Settings tab. Storage in a local application file is recommended for simple one-station systems or when the timetables will be executed at one station only. In case of other configurations, storage in the central database should be selected (this data base must be previously created in the settings of the application security system). This option ensures almost instantaneous transfer of configuration modifications to all stations within the application.

The buttons Edit Days Categories and Edit Timetables Cycles open windows for predefining days and cycles categories of the timetables created. These windows are also accessible to the application users in the execution mode. They are described in detail in the chapter on the Timetables Module management.


2.2 Defining Timetable

The Timetables Definitions tab is used for defining timetables.

Fig. Defining Panel of the Timetables Module - Timetables Definitions.

The list on the left hand side of the panel altogether with its toolbar is used to set up, delete and manage timetables. The Enabled column specifies whether a timetable is due to be executed in the application execution mode.

In the right hand part of the panel one can set the timetable parameters. The selection of a timetable type is of key importance. The Single Action type means that at the times specified by the timetable cycle a given operator action will be executed (defined in the Start Action field) and at this point the execution of this cycle will end. In case of the Start/End Actions type, at the times specified by the timetable cycle, a given operator action will be executed (defined in the Start Action field) and then, after the elapse of time specified in the cycle, a second, end operator action will be executed (defined in the End Action field).

In the Parameters Definitions section, optional timetable parameters are defined. This mechanism allows to create timetables whose operation can be controlled by the definitions of the execution cycles (this way, each cycle can execute timetable actions in a different way). In the timetable action content, the parameter value can be obtained with the use of the Parameter function, e.g. SetVariable(WTEMP, Parameter(Temperature).

In the timetable definition only one start action and one end action can be specified. If it necessary to execute a larger number of operations, multiple operator actions ActionSet or Actions should be used.

Basically, the timetable operation depends exclusively on time cycles. If it is necessary to introduce additional conditions, such additional tests should be included directly in operator actions. The following operator action can be used Perform, e.g. Perform(Variable(WSERVICE)==0, SetVariable(WCONTROL,0), Nothing())

Configuration of Station Roles

In the Stations section, one must specify the role that individual stations fulfil in the management of the timetable defined. The following settings of the start-up mode are possible:

a) None - a station will never be preoccupied with timetable execution. Yet, it can be used to define timetables cycles.

a) Local - a station is always preoccupied with timetable execution. This mode should be selected for one station only and no stations operating in the Central mode should then exist.

c) Central - a station can be preoccupied with timetable execution. The active station will be selected automatically out of the stations with the Central mode active.

The Central Priority parameter is used to specify the priorities for the selection of a station executing the timetable in a situation, where a number of stations can assume such role.


2.3 Predefined Days Categories

In each application, a few predefined days categories exist. The user cannot modify the definitions of these categories.

Some of the predefined categories, e.g. Working days are software created and cannot be modified in any way. Others are saved in the application definition folder in the TimetableCategorySets.csv file. This file is inserted in the applications definition folder while creating the application - the template file comes from the Prototypes subfolder in the installation directory.

The TimetableCategorySets.csv file is a text file in csv format. The application developer can modify its contents, in particular by adding (in a separate column) the developer-predefined category.


2.4 Opening Timetables Cycles Edit Window

In the application execution mode, the user can edit days categories and timetables cycles. Editing is possible at any station, however it is required that the logged in user holds access rights to Editing timetable cycles.

The EditTimetables operator action is used to open the categories/cycles edition window. In the action parameters it is possible to specify the ID tag of the timetable whose cycles will be defined. It is also possible to jointly edit the cycles for a group of timetables (by using special characters * i ? in the ID content).


3.1 Editing Timetables Cycles

Timetables cycles edit window is used to define the time cycles for execution the tasks specified in the timetable definition. Any number of time cycles can be assigned to each timetable. Effective operation of a timetable is the sum of all cycles assigned to the timetable.

Fig. Timetables Cycles Editor Window.

The left hand side of the window is used for defining cycles. The right hand side section is used for visual presentation of the time moments of timetable actions execution.

In order to add a new cycle, press the Add button (or Clone button, if the new cycle is to be a copy of an existing cycle). As a result of the Add operation, a list of defined timetables will open, from which a timetable should be selected to which a cycle will be added.

Fig. List of Defined Timetables Window.

After selection of a timetable with the Select button, a new cycle will be created and the cycle parameters window will open.

The cycle parameters window can also be opened by double clicking on the cycle line or by pressing the Edit cycle button.

In order to remove a highlighted cycle, use the Remove button. It is also possible to temporarily disable a cycle execution without removing it, by unchecking the option in the Active column.

The arrow buttons are only used to arrange the cycles in order. The displaying order does not influence the way a timetable is executed.

Below the cycle list there is an information bar which summarises how a selected cycle operates.

Cycle Parameters Window

The cycle parameters window consists of two sections. The upper section always looks the same, while the layout of the bottom section depends on the cycle type selected.

Fig. Timetable Cycle Parameters Window - Once Cycle.

The upper section of the window consists of the following:

a) Section used to select the cycle type.

b) Parameters table - the names of all available timetable parameters are included in this table. In the Value column, the values of the parameters active for the cycle being defined should be introduced.

c) The Select color... button allowing to change the colour is used to display the time moments of cycle operation in a preview diagram.

In case of 'Once type' the only parameters available are:

a) Start - the time of single execution of a timetable action.

b) End - the time of single execution of a timetable end action (provided that such action is defined in the timetable).

Periodic type is the basic type of timetables execution. It allows to execute timetable actions periodically.

Fig. Timetable Cycle Parameters Window - Periodic Cycle.

Periodic cycle is defined through:

a) Operating time

This section allows to limit the operating time of a cycle to the selected time range.

b) Period

This section specifies the times of timetable execution for a defined cycle (in particular, the times of start action execution defined for a timetable).

The period always includes days specified for execution and the exact time. If it is required to execute a timetable more than once a day, additional cycles should be defined.

Selection of the day can be carried out through: selection of the weekday, selection of a particular day of the month or selection of a days category.

c) Duration

Duration is used only for those timetables for which an end action is defined. It defines the time period after which the end action will be executed. This time is counted down starting from the times of cycle execution.

d) Exceptions

This section allows to define the days for which the cycle will not be executed. ID for days categories must be specified. For example, this mechanism enables to declare a cycle of the following type: every day at a given time, but except for holidays.

'From file' operating mode enables timetable execution based on an external file specifying the times of timetable actions execution. In particular, such file can be created by another system generating commands for Asix application.

Fig. Timetable Cycle Parameters Window - 'From File' Cycle.

In the File field, provide the path and name of the file including the times of timetable execution. In case of multi-station operation, the file should be stored in a location accessible by all the stations which can assume control over timetable execution (usually on a network resource).

The Edit button allows to proceed to manual editing of the file content. The Create new text file button is used to create a template file including cycles for the timetable used.

The cycles file is a text file in csv format. The first line includes column headings, while in the other lines cycle definitions are inserted.

The content of an exemplary file is shown below.

StartTime, EndTime, Temperature

2013.01.01 12:00:00, 2013.01.01 14:00:00, 20

2013.01.15 14:30:00, 2013.01.01 16:30:00, 25

The timetable execution system detects changes introduced in cycles files. After uploading a new file version no administrative actions are required - the new file will be activated automatically.


3.2 Editing Days Categories

The Days Categories Editor window is used to define new days categories and change the days set included in the days categories. The window opens by pressing the Edit Days Categories button located in the timetable cycles edit window. The window does not allow to change any predefined categories.

Fig. Days Categories Editor Window.

The left hand side section of the window is used for categories management: creating and removing of categories. The right hand side section is used to define the set of days included in the selected category.

Two modes for the selection of days are available. In the Calendar mode, click on the date to be included in (or removed from) a category. The days included in the category are displayed in bold.

Fig. Days Categories Editor Window - Table.

In the Table mode a list of the days included in the category is displayed. The buttons below the table are used to add or remove days. It is also possible to change a selected date - to this end, double click on the field to be changed.

The Fill... button allows to add one-time a group of days to a category.

Fig. Add Group of Days to Category Window.

In the Set of Dates field, the ID of one of the previously created categories should be selected. In the From and To fields, appropriate limit dates should be introduced. After pressing the Ok button, all days meeting provided criteria will be added to the category.


Witamy

Home > Script Reports

>> Help for Asix

www.asix.com.pl

Asix.Evo - Script Reports


Script Reports System

Home > Script Reports > 1 Script Reports System

1 Script Reports System

The script reports system constitutes an alternative to the system based on Microsoft Reporting Services and is used to generate and view reports in Asix.Evo applications. To some extent it is similar to the Reporter system used in classical Asix applications.

In general, the system is intended for use with simple applications, having lower requirements as to the report structure and report distribution methods. The method for the system configuration is easier. Script reports do not require installation of any additional specialist software, except a PDF document viewer.

Reports in the script system are software-generated. Therefore, some programming skills are required from the application developer. In order to make this task relatively easy, the object model of the script system has been enriched with a group of object classes dedicated to report generating.

The target reports generated in the script reports system are created in PDF format. They can be viewed or printed with the use of any standard tool for PDF file management. Report preview is carried out with the use of the default application selected in the OS for opening PDF format files (usually Adobe Reader).


Configuration of Script Reports

Home > Script Reports > 2 Configuration of Script Reports

2 Configuration of Script Reports

Each script report must be pre-registered in the application. The Reports panel which is opened in the Reports node of the Application Explorer panel is used for this purpose.

Fig. ‘Reports' Panel.

The definition of a script report consists of the following:

Report ID - unique text ID of the report. It is used in operator actions to identify the report as well as part of the file name of the reports generated.

Report description - multilingual text describing purpose of the report.

Script name - name of the script which will be used to generate the report content.

Script parameters - optional parameters transferred into the script while generating the report content. This feature is typically used when the same script is used to generate different reports. The script can adjust the report content by the use of different parameters transferred to it (e.g. different names of the variables).

After calling the window ‘New report’ by the button ‘+’, it should be indicated the report type ‘Script report’ and the above fields should be filled in.

The field Script name allows you to generate a report using the wizard for simple report that can be easily expanded by the designer using the object model of the script system, enriched with the group of classes dedicated to report creation.

Fig. Report Creation with Wizard.


Script Reports Management

Home > Script Reports > 3 Script Reports Management

3 Script Reports Management

The generation and preview process can be controlled by the user through the Reports Manager window. This window is opened with the Reports manager command from the View menu, while in the application execution mode it is opened through the ReportsManager action.

Fig. 'Reports Manager' Window.

The window consists of two sections. On the left hand side there is the field Date with a calendar (displayed by [image]) used to select the date of generation/preview of a report selected in the right hand side section of the window. Below the field Date there is the list of reports that have already been calculated previously. The report generated can be displayed or recalculated by the buttons: Calculate, Display.

In the right hand section of the window there is a list of reports defined in the application and a number of buttons used for report management. The Calculate report button initiates the calculation process for a selected date in the calendar. The calculation of another report can be initiated without waiting for the previous report to be finished (this also relates the same report for another date). Information about the current status of the report is displayed in the reports list. The Display report button displays the report for a selected date in the calendar. Selecting the row with a given report displayes in the left hand section of the window the list of dates for which reports have already been generated. The Cancel request button enables to delete all queued generation requests.

An alternative to using the Reports Manager window is using suitable reference to the ReportGenerate operator action in the application.


Script Reports Structure

Home > Script Reports > 4 Script Reports Structure

4 Script Reports Structure

Reports in the script system are software-generated. The object model of the script system has been enriched with a group of object classes dedicated to report generating. These classes are in fact an extension to PDFsharp and MigraDoc libraries which enable creating documents in PDF format. Asix.Evo report classes serve to facilitate the execution of typical operations related to report generation in the form of tables and charts. Basic classes related to report generation include: Report, ReportTable and ReportChart. Original PDFsharp and MigraDoc library classes are also available - they can be used in case it is necessary to apply a function which is not handled by Asix.Evo report classes.


Types of Reports

Home > Script Reports > 4 Script Reports Structure > 4.1 Types of Reports

4.1 Types of Reports

Asix.Evo report classes are oriented towards report generation in the form of tables or charts. It is also possible to include any number of tables and charts in a single report. Two types of tables are distinguished which differ in the way the data is organised. In horizontal tables the data for individual sources (measurements) is placed in a single row. In vertical tables the data is placed in a single column. Horizontal tables are used in a situation where there are many data sources but the amount of data is small. Vertical tables are used in a situation where there are few data sources but the amount of reported data for each source is large.

A typical data source for a report is archival data of process variables. In such case the author of the report must specify the names of the variables altogether with the names of the retrieved aggregates, as well as the time frame for the query executed. In case of such reports, the query for archival data is executed automatically during the generation of the table (chart) content.

An alternative data source is providing for the table (chart) a previously prepared data set. In this case the data can originate from any source. The data can be provided in an object of the DataTable class. This format is quite convenient in case of data originating from the data base. The data can be provided as any data set compatible with the System.Collections.ICollection interface (in particular, in a standard object table of any class).


Code Structure for Report Generation

Home > Script Reports > 4 Script Reports Structure > 4.2 Code Structure for Report Generation

4.2 Code Structure for Report Generation

If a report script has been created in the script reports configuration window (or the report script option has been selected in the standard script creation window), then a typical code structure for report generation has been created for the script report. This code shows a typical method of table report generation for historical data of process variables. Practically, each report script is based on the below pattern.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class ReportTemplate : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

         string outputFile = aParameters[1];

         // Create report

         Report report = aApplication.CreateReport();

         report.SetPageSetup(false, PageFormat.A4);

         // Define standard and custom styles

         report.SetStyle(ReportStyleStandardNames.Normal, "Arial", 10, Colors.Black, false,

                         false, ParagraphAlignment.Left, Color.Empty);

         report.SetStyle(ReportStyleStandardNames.Header, "Arial", 10, Colors.SeaGreen, false,

                         false, ParagraphAlignment.Left, Color.Empty);

         report.SetStyle(ReportStyleStandardNames.Footer, "Arial", 10, Colors.SeaGreen, false,

                         false, ParagraphAlignment.Left, Color.Empty).

                         AddTabStop(150, TabAlignment.Right);

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue, false,

                         false, ParagraphAlignment.Left, Color.Empty);

         report.SetStyle("Title", "Arial", 14, Colors.DarkBlue, false, false,

                         ParagraphAlignment.Center, Color.Empty);

         // Define header

         report.Header.AddParagraph("Header text");

         // Define footer

         report.Footer.AddParagraph("Report generated ").

            AddText(DateTime.Now.ToString()).AddText("\tPage ").AddPageField().

                                                         AddText("/").AddNumPagesField();

         // Add title line

         report.AddParagraph("Example report for date " + reportDate.ToString(), "Title");

         report.AddParagraph("");

         // Vertical table example

         ReportTable vt = report.AddVerticalTable(true);

         vt.LeftIndent(20);

         vt.AddColumn("Start Time", ReportTable.StartTimeColumn, null, 40, null,

                      ReportTableCellErrorBehavior.Normal, null);

         vt.AddColumn("End Time", ReportTable.EndTimeColumn, null, 40, null,

                      ReportTableCellErrorBehavior.Normal, null);

         vt.AddColumn("Var1 Value", "Var1", "average", 25, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.AddColumn("Var2 Value", "Var2", "average", 25, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(1));

         vt.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan);

         // Horizontal table example

         //ReportTable ht = report.AddHorizontalTable(true, 30, 25, "Signals", "HH:mm");

         //ht.AddRow("Var1 Value", "Var1", "average", "f2",

         //           ReportTableCellErrorBehavior.Empty, null);

         //ht.AddRow("Var2 Value", "Var2", "average", "f2",

         //           ReportTableCellErrorBehavior.Empty, null);

         //ht.AddRow("Var3 Value", "Var3", "average", "f2",

         //           ReportTableCellErrorBehavior.Empty, null);

         //ht.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(4));

         //ht.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan);

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error, "Error generating report: " +

              e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class ReportTemplateVB

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                               IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

            Dim outputFile As String = aParameters(1)

            ' Create report

            Dim report As Report = aApplication.CreateReport()

            report.SetPageSetup(False, PageFormat.A4)

            ' Define standard and custom styles

            report.SetStyle(ReportStyleStandardNames.Normal, "Arial", 10, Colors.Black, _

                            False, False, ParagraphAlignment.Left, Color.Empty)

            report.SetStyle(ReportStyleStandardNames.Header, "Arial", 10, Colors.SeaGreen, _

                            False, False, ParagraphAlignment.Left, Color.Empty)

            report.SetStyle(ReportStyleStandardNames.Footer, "Arial", 10, Colors.SeaGreen, _

                            False, False, ParagraphAlignment.Left, Color.Empty). _

                            AddTabStop(150, TabAlignment.Right)

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,_

                  True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue, _

                            False, False, ParagraphAlignment.Left, Color.Empty)

            report.SetStyle("Title", "Arial", 14, Colors.DarkBlue, _

                            False, False, ParagraphAlignment.Center, Color.Empty)

            ' Define header

            report.Header.AddParagraph("Header text")

            ' Define footer

            report.Footer.AddParagraph("Report generated "). _

             AddText(DateTime.Now.ToString()).AddText("\tPage ").AddPageField().AddText("/")._

             AddNumPagesField()

            ' Add title line

            report.AddParagraph("Example report for date " + reportDate.ToString(), "Title")

            report.AddParagraph("")

            ' Vertical table example

            Dim vt As ReportTable = report.AddVerticalTable(True)

            vt.LeftIndent(20)

            vt.AddColumn("Start Time", ReportTable.StartTimeColumn, Nothing, 40, Nothing,_

                         ReportTableCellErrorBehavior.Normal, Nothing)

            vt.AddColumn("End Time", ReportTable.EndTimeColumn, Nothing, 40, Nothing,_

                         ReportTableCellErrorBehavior.Normal, Nothing)

            vt.AddColumn("Var1 Value", "Var1", "average", 25, "f2",_

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.AddColumn("Var2 Value", "Var2", "average", 25, "f2",_

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(1))

            vt.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan)

            ' Horizontal table example

            'Dim ht As ReportTable = report.AddHorizontalTable(true, 30, 25, "Signals", _

            '                                                  "HH:mm")

            'ht.AddRow("Var1 Value", "Var1", "average", "f2", _

            '          ReportTableCellErrorBehavior.Empty, Nothing)

            'ht.AddRow("Var2 Value", "Var2", "average", "f2", _

            '          ReportTableCellErrorBehavior.Empty, Nothing)

            'ht.AddRow("Var3 Value", "Var3", "average", "f2", _

            '          ReportTableCellErrorBehavior.Empty, Nothing)

            'ht.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(4))

            'ht.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan)

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error,_

                                             "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

    End Sub

End Class

The entire code for report generation is included in the try catch module. This structure is recommended, as in case of errors occurring during report generation, they will be reported through exceptions. The try catch module enables to monitor proper script execution.

The first operation during script execution is collecting parameters for the script launch and inserting them in the reportDate and outputFile auxiliary variables. Two parameters are always transferred to the report script. The first parameter specifies the date for which a report is generated and the second one specifies the output file name. If additional parameters have been defined in the script report configuration, they will be transferred into the script following the output file name parameter.

Another step, obligatory for each report script, is the generation of an object of the Report class through execution of the CreateReport command of the aApplication object. Further operations related to generating the report content will involve the object created.

Optional execution of the SetPageSetup command is used to specify the parameters of a printout page. If, in particular, the first parameter is set to true, the page layout will be switched to horizontal. There is also an alternative version of the SetPageSetup command enabling to set the margin sizes.

The next section of the script is used to define styles. Styles define the report (mainly text) layout. They define such parameters as the font shape and size, its colour and colour of the background. Each style has a name. There is a set of standard names (defined in the ReportStyleStandardNames class). The styles with names defined in such a way are used automatically, e.g. the ReportStyleStandardNames.Normal style is a default style used for all components whose style has not been defined in any way. It is possible to define styles with other names, but in order to use them in such case it is necessary to explicitly declare the style in the methods for generating report components.

After defining the styles, the script moves on to generating the report header and footer. These components are not obligatory, but they are usually used. The header and footer content is created with the use of the common AddParagraph command utilised to insert text in the report content. In case of the header, the section is of multi-component character, including text and page number sections: current page number and the total number of pages. The layout of the header and footer depends on the standard ReportStyleStandardNames.Header and ReportStyleStandardNames.Footer styles.

The next step is inserting an optional report title. In this case a variant of the AddParagraph method is used with the style name explicitly declared. In the definition of the style used, alignment of the ParagraphAlignment.Center type has been used - this places the title in the middle of text line.

Similarly to text insertion, also graphic elements can be inserted in the report with the use of the AddImage command.

The next script section, initiated with the AddVerticalTable command, inserts in the report tables with archival data of process variables. Once the table has been created, a set of columns should be added to it (execution of the AddColumn method), time parameters of the query for data should be defined (SetQueryData method) and, optionally, the style for drawing table cell edges should be specified (SetEdgeStyle method). Attention should be paid to the fact that in the execution of the SetQueryData method the reportDate variable, transferred in the script launch parameters, has been used.

Below the code for generating a vertical table there is a commented-out code structure for a horizontal table. The main difference consists in using the AddRow command instead of AddColumn.

Script execution ends with obligatory execution of the Render method involving transfer of the output file name provided in the script launch parameters. It is this command that generates the target PDF file on the basis of the previously performed operations and archival data read.


Vertical Table for Archival Data

Home > Script Reports > 4 Script Reports Structure > 4.3 Vertical Table for Archival Data

4.3 Vertical Table for Archival Data

This section describes in more detail the process of the construction of a vertical table based on the archival data of process variables. The below script constitutes a table including the average, maximum and minimum value of a process variable recorded every three hours. The layout of the table generated is shown in the below figure.

Fig. Vertical Table for Historical Data

In order to make the code shorter, from the below examples of scripts the sections adding to the report such components as: header, footer or title line have been removed.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class VertTable : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

         string outputFile = aParameters[1];

         Report report = aApplication.CreateReport();

         // Define standard and custom styles

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.Gray);

         report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.DarkGray);

         // Build table

         ReportTable vt = report.AddVerticalTable(true);

         vt.LeftIndent(10);

         vt.AddColumn("Godzina", ReportTable.StartTimeColumn, null, 40, null,

                      ReportTableCellErrorBehavior.Normal, null);

         vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan);

         vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3));

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                    "Error generating report: " + e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class VertTableVb

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                               IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

            Dim outputFile As String = aParameters(1)

            Dim report As Report = aApplication.CreateReport()

            ' Define standard And custom styles

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,_

                            True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.Gray)

            report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.DarkGray)

            ' Build table

            Dim vt As ReportTable = report.AddVerticalTable(True)

            vt.LeftIndent(10)

            vt.AddColumn("Godzina", ReportTable.StartTimeColumn, Nothing, 40, Nothing,_

                         ReportTableCellErrorBehavior.Normal, Nothing)

            vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2", _

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2", _

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2",_

                          ReportTableCellErrorBehavior.Empty, Nothing)

            vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan)

            vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3))

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, _

                                       "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

     End Sub

End Class

In the example code the table layout is defined by a number of styles with predefined names. These are, above all, the TableHeader and TableRow styles, specifying the method for the creation of the table header row and data rows. Since in our example we want to format differently odd and even rows, the TableAltRow style has been defined. The styles for data rows differ in the last parameter, defining the colour for the table cell background.

In addition to the text font and color, the style also defines the method for cell content alignment. In the header line text will be centred, while in the data lines measurement values will be aligned to the right.

After defining the styles, a vertical table is created with the use of the AddVerticalTable command. The command execution parameter specifies whether the header row will be added to the table.

The next step is adding a set of columns to the table with the use of the AddColumn method. The command parameters have the following meaning: the column name placed in the header line, the process variable and aggregate name used to collect archival data, column width, way for value formatting (if it is not defined, a format attribute from the variable definitions data base will be used or standard formatting will be used, depending on the value type), procedure to be followed in case of a lack of value or incorrect value, function for the creation of cell content (its use is described in chapter 5.5 Kontrola zawartości komórek).

In AddColumn commands, instead of variable names one of two special names can be used: ReportTable.StartTimeColumn or ReportTable.EndTimeColumn. These names indicate that instead of variable values, the start or end times of individual aggregation of variables periods will be used in the column.

In the example, the ReportTableCellErrorBehavior.Empty constant has been used to specify the procedure to be followed in case a correct value is missing. This constant means that the cell will be left empty. Other standard modes are explained in the description of the AddColumn command in the reference part of this manual.

The example script uses a simpler variant of the AddColumn command. A variant that enables defining of style names used in the column is also available. The styles defined implicitly have priority over standard styles. An extended variant of the command allows to individually specify the method for the creation of individual table columns.

After adding columns, one must further specify the method for the creation of table cell edges (SetEdgeStyle command) and the parameters of the query for archival data (SetQueryData command).

Final execution of the Render method triggers the performance of all necessary queries for archival data and generates the report content.


Horizontal Table for Archival Data

Home > Script Reports > 4 Script Reports Structure > 4.4 Horizontal Table for Archival Data

4.4 Horizontal Table for Archival Data

This section describes in more detail the process of the construction of a horizontal table based on the archival data of process variables. The below script constitutes a table including the average, maximum and minimum value of a process variable recorded every two hours. The layout of the table generated is shown in the below figure.

Fig. Horizontal Table for Archived Data.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class HorzTable : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

         string outputFile = aParameters[1];

         Report report = aApplication.CreateReport();

         report.SetPageSetup(true, PageFormat.A4);

         // Define standard and custom styles

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.Gray);

         report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.DarkGray);

         // Build table

         ReportTable ht = report.AddHorizontalTable(true, 25, 15, "Godzina", "HH:mm");

         ht.AddRow("V1 średnia", "sym01", "average", "f2",

                   ReportTableCellErrorBehavior.Empty, null);

         ht.AddRow("V1 minimum", "sym01", "min", "f2",

                   ReportTableCellErrorBehavior.Empty, null);

         ht.AddRow("V1 maksimum", "sym01", "max", "f2",

                   ReportTableCellErrorBehavior.Empty, null);

         ht.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan);

         ht.SetQueryData(reportDate.AddHours(0), reportDate.AddDays(1),TimeSpan.FromHours(2));

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                    "Error generating report: " + e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class HorzTableVb

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                               IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

            Dim outputFile As String = aParameters(1)

            Dim report As Report = aApplication.CreateReport()

            report.SetPageSetup(True, PageFormat.A4)

            ' Define standard And custom styles

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,_

                            True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.Gray)

            report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.DarkGray)

            ' Build table

            Dim ht As ReportTable = report.AddHorizontalTable(True,25,15,"Godzina","HH:mm")

            ht.AddRow("V1 średnia", "sym01", "average", "f2",

                      ReportTableCellErrorBehavior.Empty, Nothing)

            ht.AddRow("V1 minimum", "sym01", "min", "f2",

                      ReportTableCellErrorBehavior.Empty, Nothing)

            ht.AddRow("V1 maksimum", "sym01", "max", "f2",

                      ReportTableCellErrorBehavior.Empty, Nothing)

            ht.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan)

            ht.SetQueryData(reportDate.AddHours(0), reportDate.AddDays(1),

                            TimeSpan.FromHours(2))

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

    End Sub

End Class

In case of horizontal reports it is usually necessary to change the report page orientation into horizontal. This is why immediately after the creation of the Report object, the SetPageSetup method is used. The first call parameter set to true indicates horizontal page layout.

The next piece of code defines a number of styles with predefined names. The rules for use of these styles have been described in the chapter devoted to vertical tables.

After defining the styles, a horizontal table is created with the use of the AddHorizontalTable method. The call parameters for the page relate mainly to the table header line. They have the following meaning: information whether the header line should be added to the table, width of the first table column, width of the next table columns, text inserted in the first header line column, way for time formatting in the next header columns.

The first column of the horizontal table is a description column in which text describing the meaning of data in the column is inserted. The header line always displays the times of the beginning of aggregation periods, resulting from the query for archival data made.

An extended version of the AddHorizonatlTable method also exists, allowing to explicitly select styles for the first and the next header columns.

The next step is adding a set of rows to the table with the use of the AddRow method. The call parameters have the following meaning: the name of the row placed in the first row column, the process variable and aggregate name used to retrieve archival data, way for value formatting (if it is not defined, a format attribute from the variable definitions data base will be used or standard formatting will be used, depending on the value type), procedure to be followed in case of a lack of value or incorrect value, function for the creation of cell content (its use will be described in chapter 4.5 Checking Cell Content).

In the example, the ReportTableCellErrorBehavior.Empty constant has been used to specify the procedure to be followed in case a correct value is missing. This constant means that the cell will be left empty. Other standard modes are explained in the description of the AddColumn method in the reference part of this manual.

The example script uses a simpler variant of the AddRow method. A variant that enables defining of style names used in the column is also available. The styles defined explicitly have priority over standard styles. An extended variant of the method allows to individually specify the way for the creation of individual tables.

After adding columns, one must further specify the way for the creation of table cell edges (SetEdgeStyle method) and the parameters of the query for historical data (SetQueryData method).

Final execution of the Render method triggers the performance of all necessary queries for archival data and generates the report content.


Checking Cell Content

Home > Script Reports > 4 Script Reports Structure > 4.5 Checking Cell Content

4.5 Checking Cell Content

In some cases, additional supervision over cell content is necessary, related to e.g. detection of values in excess of the limits, non-standard response to incorrect values, the need to generate non-standard cell content. In such case, a mechanism for generation cell content described in this chapter can be applied. The target of the example script is to generate the below table in which an exceeded limit is indicated by adding ! to the value and changing the cell colour.

Fig. Table with Checking Cell Content.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class VertTable : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

         string outputFile = aParameters[1];

         Report report = aApplication.CreateReport();

         // Define standard and custom styles

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.Gray);

         report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.DarkGray);

         report.SetStyle("OverLimit", "Calibri", 10, Colors.Red, false, false,

                         ParagraphAlignment.Right, Colors.Yellow);

         // Build table

         ReportTable vt = report.AddVerticalTable(true);

         vt.LeftIndent(10);

         vt.AddColumn("Godzina", ReportTable.StartTimeColumn, null, 40, null,

                      ReportTableCellErrorBehavior.Normal, null);

         vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, CheckLimit);

         vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2",

                      ReportTableCellErrorBehavior.Empty, null);

         vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan);

         vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3));

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                         "Error generating report: " + e.ToString());

      }

       return true;

   }

   bool CheckLimit(ReportTableCell c)

   {

      if ((c.ValueStatus & Askom.Ascent.StatusOpc.QualityMask) ==

                                                    Askom.Ascent.StatusOpc.Good &&

          c.RawValue != null && (double)c.RawValue >= 24)

      {

         c.Content = "! " + c.Content;

         c.Style = "OverLimit";

      }

      return false;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class VertTableVb

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                               IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

            Dim outputFile As String = aParameters(1)

            Dim report As Report = aApplication.CreateReport()

            ' Define standard And custom styles

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,_

                            True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.Gray)

            report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,_

                            False, False, ParagraphAlignment.Right, Colors.DarkGray)

            report.SetStyle("OverLimit", "Calibri", 10, Colors.Red, False, False, _

                            ParagraphAlignment.Right, Colors.Yellow)

            ' Build table

            Dim vt As ReportTable = report.AddVerticalTable(True)

            vt.LeftIndent(10)

            vt.AddColumn("Godzina", ReportTable.StartTimeColumn, Nothing, 40, Nothing, _

                         ReportTableCellErrorBehavior.Normal, Nothing)

            vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2", _

                         ReportTableCellErrorBehavior.Empty, AddressOf CheckLimit)

            vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2", _

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2", _

                         ReportTableCellErrorBehavior.Empty, Nothing)

            vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan)

            vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3))

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, _

                               "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Function CheckLimit(c As ReportTableCell) As Boolean

        If ((c.ValueStatus And Askom.Ascent.StatusOpc.QualityMask) = _

                                                       Askom.Ascent.StatusOpc.Good And _

             c.RawValue IsNot Nothing And CType(c.RawValue, Double) >= 24) Then

            c.Content = "! " + c.Content

            c.Style = "OverLimit"

        End If

        Return False

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

    End Sub

End Class

The example code is a modification of the script for generation of a vertical table. The pieces modified have been marked in bold.

The first new component is addition of the OverLimit style, which will be used for the cells with exceeded limit. Another modification is the use of reference to the CheckLimit function in the one of call of the AddColumn method.

The most important part of the script is the CheckLimit function content. This function is executed for each column cell and an object of the ReportTableCell class is delivered to it in the call. Through this object the function gains access to the data describing the cell. This object is also used to change the cell content.

In typical scenarios, the function for checking the cell content uses the ValueStatus and RawValue fields of the ReportTableCell object to decide if the cell content needs to be modified. These fields store the value status and the original numeric value of the cell (in this case, originating from the query for archival data). If it is necessary to change a cell content, this can be achieved by providing in the Style field a new style name, and in the Content field a new text content for the cell. At the moment of function execution, the Content field is set to the content that would be inserted in the cell if the check function wasn't used. This is used in the example code to display the standard content with an exclamation mark added. Returning the false value means that the generation system is to generate the cell content in a normal way, but with alternative use of modified fields Content and Style.

A more advanced method for the cell content modification is generation of the complete cell content by the user with the use of the cell base object (available through the MigraCell feature) and its commands. In this mode the user has more influence on the cell shape (e.g. by adding an image) but this requires direct operations on the MigraDoc library objects and methods. If the function for checking the cell content generates content directly, it must return the true value.


Columns and Rows Calculated

Home > Script Reports > 4 Script Reports Structure > 4.6 Columns and Rows Calculated

4.6 Columns and Rows Calculated

In this chapter you will learn how to add to the tables the rows and columns calculating data summary. The script, shown below, creates a typical vertical table supplemented with three additional rows calculated. The figure shows the view of the generated table.

Fig. Vertical Table for Archival Data with Calculated Rows.

The first two calculated rows are used to display minimum and maximum values of the columns. The third row displays how many times the value 25 is exceeded in the V1 Maximum columns.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class VertTable : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

try

{

DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

string outputFile = aParameters[1];

Report report = aApplication.CreateReport();

// Define standard and custom styles

report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

true, true, ParagraphAlignment.Center, Colors.LightYellow);

report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

false, false, ParagraphAlignment.Right, Colors.Gray);

report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10, Colors.Blue,

false, false, ParagraphAlignment.Right, Colors.DarkGray);

report.SetStyle("OverLimit", "Calibri", 10, Colors.Red, false, false,

ParagraphAlignment.Right, Colors.Yellow);

// Build table

ReportTable vt = report.AddVerticalTable(true);

vt.LeftIndent(10);

vt.AddColumn("Godzina", ReportTable.StartTimeColumn, null, 40, null,

ReportTableCellErrorBehavior.Normal, null);

vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2",

ReportTableCellErrorBehavior.Empty, null);

vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2",

ReportTableCellErrorBehavior.Empty, null);

vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2",

ReportTableCellErrorBehavior.Empty, CheckLimit);

vt.AddCalculatedRow("Minimum", CalculationType.Min, "f2", null);

vt.AddCalculatedRow("Maksimum", CalculationType.Max, "f2", null);

vt.AddCalculatedRow("Przekroczenia", CalculationType.Custom, "f2", OverLimit);

vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3));

vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan);

report.Render(outputFile);

}

catch (Exception e)

{

aApplication.ReportMessage(EvoMessageType.Error,

"Error generating report: " + e.ToString());

}

return true;

}

bool OverLimit(ReportTableCell c)

{

int overCount = 0;

if (c.Index == 3)

{

foreach (CellValue v in c.SourceValues)

{

if ((v.Status & Askom.Ascent.StatusOpc.QualityMask) ==

Askom.Ascent.StatusOpc.Good && v.Value != null && (double)v.Value >= 25)

overCount++;

}

c.Content = overCount.ToString();

}

return false;

}

bool CheckLimit(ReportTableCell c)

{

if ((c.ValueStatus & Askom.Ascent.StatusOpc.QualityMask) ==

Askom.Ascent.StatusOpc.Good && c.RawValue != null && (double)c.RawValue >= 25)

{

c.Content = "! " + c.Content;

c.Style = "OverLimit";

}

return false;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class VertTableVb

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Try

Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

Dim outputFile As String = aParameters(1)

Dim report As Report = aApplication.CreateReport()

' Define standard And custom styles

report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12,Colors.Blue, _

True, True, ParagraphAlignment.Center, Colors.LightYellow)

report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue, _

False, False, ParagraphAlignment.Right, Colors.Gray)

report.SetStyle(ReportStyleStandardNames.TableAltRow, "Calibri", 10,Colors.Blue, _

False, False, ParagraphAlignment.Right, Colors.DarkGray)

report.SetStyle("OverLimit", "Calibri", 10, Colors.Red, False, False, _

ParagraphAlignment.Right, Colors.Yellow)

' Build table

Dim vt As ReportTable = report.AddVerticalTable(True)

vt.LeftIndent(10)

vt.AddColumn("Godzina", ReportTable.StartTimeColumn, Nothing, 40, Nothing, _

ReportTableCellErrorBehavior.Normal, Nothing)

vt.AddColumn("V1 średnia", "sym01", "average", 30, "f2", _

ReportTableCellErrorBehavior.Empty, Nothing)

vt.AddColumn("V1 minimum", "sym01", "min", 30, "f2", _

ReportTableCellErrorBehavior.Empty, Nothing)

vt.AddColumn("V1 maksimum", "sym01", "max", 30, "f2", _

ReportTableCellErrorBehavior.Empty, AddressOf CheckLimit)

vt.AddCalculatedRow("Minimum", CalculationType.Min, "f2", Nothing)

vt.AddCalculatedRow("Maksimum", CalculationType.Max, "f2", Nothing)

vt.AddCalculatedRow("Przekroczenia", CalculationType.Custom, "f2", _

AddressOf OverLimit)

vt.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(3))

vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan)

report.Render(outputFile)

Catch e As Exception

aApplication.ReportMessage(EvoMessageType.Error, _

"Error generating report: " + e.ToString())

End Try

Return True

End Function

Function OverLimit(c As ReportTableCell) As Boolean

Dim overCount As Integer = 0

Dim v As CellValue

If c.Index = 3 Then

For Each v In c.SourceValues

If ((v.Status And Askom.Ascent.StatusOpc.QualityMask) = _

Askom.Ascent.StatusOpc.Good And _

v.Value IsNot Nothing And CType(v.Value, Double) >= 25) Then

overCount = overCount + 1

End If

Next

c.Content = overCount

End If

Return False

End Function

Function CheckLimit(c As ReportTableCell) As Boolean

If ((c.ValueStatus And Askom.Ascent.StatusOpc.QualityMask) = _

Askom.Ascent.StatusOpc.Good And _

c.RawValue IsNot Nothing And CType(c.RawValue, Double) >= 25) Then

c.Content = "! " + c.Content

c.Style = "OverLimit"

End If

Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The exemplary code creates a vertical table in a standard way. The rows calculated are added to the table by calls of the AddCalculatedRow method. There is no limit on the number of rows calculated. In the same way you would add columns calculated by the method AddCalculatedColumn. The rows and columns calculated may be added to any type tables.

The first two uses of AddCalculatedRow add standard rows calculated, used to display minimum and maximum value in individual columns of the table. The third row is calculated in a custom way. For this purpose, the calculation type Custom and the address of the OverLimit function, performing calculation for row cells, are passed on in the call parameters.

The function OverLimit checks the index of the column to which the call referres to. The number of exceedances of the value 25 is calculated only for columns with maximum values. Access to values of all column cells is realised by SourceValues property of the cell calculated.


Report Based on Data Transferred in ICollection

Home > Script Reports > 4 Script Reports Structure > 4.7 Report Based on Data Transferred in ICollection

4.7 Report Based on Data Transferred in ICollection

Historical data of process variables is not always the data source on the basis of which a report is to be generated. If this data comes from another source, it can be stored in any collection supported by the ICollection interface. In practice this means that any collection of .Net platform, e.g. List<T>, or even of a standard table can be used.

The script described in this chapter will generate a report showing the current values of process variables at the moment of the report generation.

Fig. Report Showing the Current Values of Process Variables at the Moment of the Report Generation.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class CollectionReport : IScript

{

   class VData

   {

      public VData(string name, double value)

      {

         varname = name; varvalue = value;

      }

      public string varname { get; private set; }

      public double varvalue { get; private set; }

   }

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         string outputFile = aParameters[1];

         VData[] values = {

             new VData("sym01",

                   Convert.ToDouble(aApplication.GetVariableValue("sym01", true).RawValue)),

             new VData("sym02",

                   Convert.ToDouble(aApplication.GetVariableValue("sym02", true).RawValue)),

             new VData("sym03",

                   Convert.ToDouble(aApplication.GetVariableValue("sym03", true).RawValue)),

         };

         Report report = aApplication.CreateReport();

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.Gray);

         ReportTable vt = report.AddVerticalTable(values, true);

         vt.LeftIndent(30);

         vt.AddColumn("Zmienna", "varname", 50, null, null);

         vt.AddColumn("Wartość", "varvalue", 50, "f2", null);

         vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan);

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                          "Error generating report: " + e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class CollectionReportVb

    Implements IScript

    Class VData

        Dim _varname As String

        Public Property varname As String

            Get

                Return _varname

            End Get

            Set(value As String)

                _varname = Value

            End Set

        End Property

        Dim _varvalue As Double

        Public Property varvalue As Double

            Get

                Return _varvalue

            End Get

            Set(value As Double)

                _varvalue = Value

            End Set

        End Property

        Public Sub New(ByVal name As String, ByVal value As Double)

            varname = name

            varvalue = value

        End Sub

    End Class

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                               IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim outputFile As String = aParameters(1)

            Dim values As VData() = New VData(2) _

                { _

                New VData("sym01", Convert.ToDouble(aApplication.GetVariableValue _

                                                                 ("sym01", True).RawValue)), _

                New VData("sym02", Convert.ToDouble(aApplication.GetVariableValue _

                                                                 ("sym02", True).RawValue)), _

                New VData("sym03", Convert.ToDouble(aApplication.GetVariableValue _

                                                                  ("sym03", True).RawValue)) _

                }

           ' Create report

            Dim report As Report = aApplication.CreateReport()

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, _

                       Colors.Blue, True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, _

                       Colors.Blue, False, False, ParagraphAlignment.Right, Colors.Gray)

            Dim vt As ReportTable = report.AddVerticalTable(values, True)

            vt.LeftIndent(30)

            vt.AddColumn("Zmienna", "varname", 50, Nothing, Nothing)

            vt.AddColumn("Wartość", "varvalue", 50, "f2", Nothing)

            vt.SetEdgeStyle(ReportTableEdgeType.Columns, Colors.Cyan)

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, _

                                       "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

    End Suk

End Class

The below explanations relate only to the elements specific for reports based on data collections.

In case of building a table on the basis of a data collection, the first step is to create a class used for data storage. Objects of this class will then be added to the collection.

In the example script, the VData class is defined. The only requirement as to the construction of the class used in the reporting system is defining a group of public properties which will be used to read the values inserted in the table. In our example these properties are varname and varvalue.

In the initial part of the script a table of the VData class objects is created. Next, three VData objects are added to the table; in these objects the name of the process variable and its current value read through the GetVariableValue method are stored.

Further part of the script is the code itself that generates the report including a single vertical table. The data collection, on the basis of which the table will be built, is transferred at the moment of its creation with the use of the AddVerticalTable method. In this operating scheme, the SetQueryData method is not used.

The next step is adding a set of columns to the table with the use of the AddColumn method. In case of tables using data collections, the parameters have the following meaning: the column name placed in the header line, the name of the public property defined in the class used for the collection data storage, the column width, the way for value formatting (if it is not defined, standard formatting will be used, depending on the value type), the function for the creation of cell content (its use is identical as in case of the tables with historical data and is described in chapter, 4.5 Checking Cell Content).


Report Based on Data Transferred in Object of DataTable Type

Home > Script Reports > 4 Script Reports Structure > 4.8 Report Based on Data Transferred in Object of DataTable Type

4.8 Report Based on Data Transferred in Object of DataTable Type

In a situation when the report source data is stored in the data base, the most convenient mechanism is the direct use of the DataTable system class. The example script will generate a simple table report on the basis of the data read from the SQL data base.

Fig. Table Report on the Basis of the Data Read from the SQL Data Base.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

using System.Data;

using System.Data.SqlClient;

public class DataTableRep : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         string outputFile = aParameters[1];

         DataSet dataSet;

         using (SqlConnection connection = new SqlConnection(

                  "Data Source=(local);Initial Catalog=ReportTest;Integrated Security=SSPI"))

         {

            SqlDataAdapter adapter = new SqlDataAdapter();

            connection.Open();

            SqlCommand command =

                new SqlCommand("SELECT ProdID, Quality, Weight FROM ProdInfo", connection);

            adapter.SelectCommand = command;

            dataSet = new DataSet();

            adapter.Fill(dataSet);

         }

         Report report = aApplication.CreateReport();

         report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12, Colors.Blue,

                         true, true, ParagraphAlignment.Center, Colors.LightYellow);

         report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue,

                         false, false, ParagraphAlignment.Right, Colors.Gray);

         ReportTable vt = report.AddVerticalTable(dataSet.Tables[0], true);

         vt.LeftIndent(20);

         vt.AddColumn("Produkt", "ProdId", 25, null, null);

         vt.AddColumn("Jakość", "Quality", 25, null, null);

         vt.AddColumn("Waga", "Weight", 25, "f2", null);

         vt.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan);

         report.Render(outputFile);

         dataSet.Dispose();

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                             "Error generating report: " + e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Imports System.Data

Imports System.Data.SqlClient

Public Class DataTableVb

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

                                    IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim outputFile As String = aParameters(1)

            Dim dataSet As DataSet

            Using connection As SqlConnection = New SqlConnection( _

                   "Data Source=(local);Initial Catalog=ReportTest;Integrated Security=SSPI")

                Dim adapter As SqlDataAdapter = New SqlDataAdapter()

                connection.Open()

                Dim command As SqlCommand = _

                   New SqlCommand("SELECT ProdID, Quality, Weight FROM ProdInfo", connection)

                adapter.SelectCommand = command

                dataSet = New DataSet()

                adapter.Fill(dataSet)

            End Using

            Dim report As Report = aApplication.CreateReport()

            report.SetStyle(ReportStyleStandardNames.TableHeader, "Calibri", 12,Colors.Blue, _

                            True, True, ParagraphAlignment.Center, Colors.LightYellow)

            report.SetStyle(ReportStyleStandardNames.TableRow, "Calibri", 10, Colors.Blue, _

                            False, False, ParagraphAlignment.Right, Colors.Gray)

            Dim vt As ReportTable = report.AddVerticalTable(dataSet.Tables(0), True)

            vt.LeftIndent(20)

            vt.AddColumn("Produkt", "ProdId", 25, Nothing, Nothing)

            vt.AddColumn("Jakość", "Quality", 25, Nothing, Nothing)

            vt.AddColumn("Waga", "Weight", 25, "f2", Nothing)

            vt.SetEdgeStyle(ReportTableEdgeType.Outline, Colors.Cyan)

            report.Render(outputFile)

            dataSet.Dispose()

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, _

                                                 "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

    End Sub

End Class

The below explanations relate only to the components specific for reports based on the data from the DataTable object.

The initial part of the script is the standard code used to read data from the data base through an SQL query. The result of the query is stored in an object of the DataTable class.

Further part of the script is the code itself that generates the report including a single vertical table. In the execution of the AddVerticalTable method, a reference to the DataTable object located inside the DataSet object, which is filled with data in the initial part of the script, is transferred. In this operating scheme, the SetQueryData method is not used.

The next step is adding a set of columns to the table with the use of the AddColumn method. In case of tables using data from the DataTable object, the parameters have the following meaning: the column name placed in the header line, the column name in the DataTable object (these names depend on the SQL query and the data base structure), the column width, the way for value formatting (if it is not defined, standard formatting will be used, depending on the value type), the function for the creation of cell content (its use is identical as in case of the tables with historical data and is described in chapter 4.5 Checking Cell Content).


Using Chart in Report Content

Home > Script Reports > 4 Script Reports Structure > 4.9 Using Chart in Report Content

4.9 Using Chart in Report Content

Beside tables, also charts can be inserted in the report content. Similarly as in the case of tables, charts can be created on the basis of the data originating from readout of archival data of process variables or the data transferred in the DataTable collection or object.

The example script is used to generate the report shown in the below figure.

Fig. Report with Chart.

C#

using System;

using Askom.AsixEvo.Scripting;

using MigraDoc.DocumentObjectModel;

using MigraDoc.DocumentObjectModel.Shapes;

using MigraDoc.DocumentObjectModel.Shapes.Charts;

public class Wykres : IScript

{

   public bool Initialize(string[] aParameters, IApplication aApplication)

   {

      try

      {

         DateTime reportDate = DateTime.Parse(aParameters[0]).Date;

         string outputFile = aParameters[1];

         // Create report

         Report report = aApplication.CreateReport();

         // Define standard and custom styles

         report.SetStyle(ReportStyleStandardNames.Normal, "Arial", 10, Colors.Black,

                        false, false, ParagraphAlignment.Left, Color.Empty);

         report.SetStyle("Axis", "Arial", 10, Colors.Red, false, false,

                         ParagraphAlignment.Left, Color.Empty);

         report.SetStyle("Legend", "Arial", 8, Colors.Blue, false, false,

                         ParagraphAlignment.Left, Color.Empty);

         report.SetStyle("Labels", "Arial", 6, Colors.Black, false, false,

                         ParagraphAlignment.Left, Color.Empty);

         ReportChart rc = report.AddChart(0, 150, 100);

         rc.SetXAxisTitle("Time", "Axis");

         rc.CustomizeXAxis(Colors.Red, "Axis", "HH:mm", 4);

         rc.SetYAxisTitle("Values", "Axis");

         rc.CustomizeYAxis(null, null, null, true, Colors.Red, "Axis", "f2");

         rc.AddLegend(ReportChartLegendPosition.Top, "Legend");

         ReportChartSeries s = rc.AddSeries("Average", ChartType.Column2D,

                                            "sym01", "average", Colors.Red, Colors.Green);

         s.SetDataLabels("Labels", "f2", DataLabelPosition.OutsideEnd);

         s = rc.AddSeries("Min", ChartType.Line, "sym01", "min", Colors.Blue, Color.Empty);

         s.SetMarkersStyle(MarkerStyle.Diamond, 1, Colors.Blue, Colors.BlueViolet);

         rc.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(2));

         report.Render(outputFile);

      }

      catch (Exception e)

      {

         aApplication.ReportMessage(EvoMessageType.Error,

                                         "Error generating report: " + e.ToString());

      }

      return true;

   }

   public void FinalizeScript()

   {

   }

}

VB

Imports System

Imports Askom.AsixEvo.Scripting

Imports MigraDoc.DocumentObjectModel

Imports MigraDoc.DocumentObjectModel.Shapes

Imports MigraDoc.DocumentObjectModel.Shapes.Charts

Public Class WykresVb

    Implements IScript

    Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

                                As IApplication) As Boolean Implements IScript.Initialize

        Try

            Dim reportDate As DateTime = DateTime.Parse(aParameters(0)).Date

            Dim outputFile As String = aParameters(1)

            ' Create report

            Dim report As Report = aApplication.CreateReport()

            report.SetStyle(ReportStyleStandardNames.Normal, "Arial", 10, Colors.Black, _

                            False, False, ParagraphAlignment.Left, Color.Empty)

            report.SetStyle("Axis", "Arial", 10, Colors.Red, False, False, _

                            ParagraphAlignment.Left, Color.Empty)

            report.SetStyle("Legend", "Arial", 8, Colors.Blue, False, False, _

                            ParagraphAlignment.Left, Color.Empty)

            report.SetStyle("Labels", "Arial", 6, Colors.Black, False, False, _

                            ParagraphAlignment.Left, Color.Empty)

            Dim rc As ReportChart = report.AddChart(0, 150, 100)

            rc.SetXAxisTitle("Time", "Axis")

            rc.CustomizeXAxis(Colors.Red, "Axis", "HH:mm", 4)

            rc.SetYAxisTitle("Values", "Axis")

            rc.CustomizeYAxis(Nothing, Nothing, Nothing, True, Colors.Red, "Axis", "f2")

            rc.AddLegend(ReportChartLegendPosition.Top, "Legend")

            Dim s As ReportChartSeries = rc.AddSeries("Average", ChartType.Column2D, _

                                              "sym01", "average", Colors.Red, Colors.Green)

            s.SetDataLabels("Labels", "f2", DataLabelPosition.OutsideEnd)

            s = rc.AddSeries("Min", ChartType.Line, "sym01", "min", Colors.Blue, Color.Empty)

            s.SetMarkersStyle(MarkerStyle.Diamond, 1, Colors.Blue, Colors.BlueViolet)

            rc.SetQueryData(reportDate, reportDate.AddDays(1), TimeSpan.FromHours(2))

            report.Render(outputFile)

        Catch e As Exception

            aApplication.ReportMessage(EvoMessageType.Error, _

                                          "Error generating report: " + e.ToString())

        End Try

        Return True

    End Function

    Public Sub FinalizeScript() Implements IScript.FinalizeScript

     End Sub

End Class

In the initial part of the script a set of styles is defined; these styles will be used in various components of the chart generated.

The first obligatory piece of code triggers the execution of the AddChart method, which inserts a chart in the report and generates an object with the use of which all following operations will be executed. In the execution parameters, the chart location and size is defined.

Subsequent executions relate to optional parametrisation of the chart axis and legend.

The SetXAxisTitle method adds a description of the X axis, defining at the same time the style name. The CustomizeXAxis method defines the drawing way of the X axis scale. The components defined include: the line colour, the style for text components, the way for description formatting (for archival data charts, the X axis is always the time axis), and the density of axis descriptions (the value set to 1 means all axis points will have descriptions, the value set to 4 means every fourth point will be described).

The SetYAxisTitle method adds a description of the Y axis, defining the style name. The CustomizeYAxis command defines the drawing method of the Y axis scale. The first 3 parameters are used to define the scale scope and division - the values null (Nothing) used mean automatic scaling. The next parameters define whether the chart grid should be drawn and specify the line colour, the style for text components and the way for scale description formatting.

Optional execution of the AddLegend method adds a legend to the chart, specifying at the same time its location and the style used.

Further part of the script is the code itself that generates the chart content. Execution of the AddSeries method adds subsequent data series to the chart. The execution parameters denote: the series name (used in the chart legend), the series graphic type, the name of the process variable and the readout aggregate of archival data, the colours used to draw series points (their precise meaning depends on the series type used). It is possible to mix series of different types in one chart, but not all combinations are permitted.

On completion of the data series object, further parameterization can be performed on the object. The shown executions of the SetDataLabels and SetMarkerStyle methods enable to add to the series value labels and data point markers. Availability of these commands is dependant on the series type used, though.

In case of charts generated on the basis of data collections or data stored in the DataTable object, the procedure to be followed is similar to the one shown in the example. In the execution of the AddChart method, additionally a reference to the object in which the data is stored should be specified. In the executions of AddSeries, the field and column names should be specified instead of the variable and aggregate names. Additionally, the AddXSeries method can be applied in order to define the data series used to describe the X axis scale (if it is not executed, the scale points will be described with subsequent numbers).


Text Positioning Methods

Home > Script Reports > 4 Script Reports Structure > 4.10 Text Positioning Methods

4.10 Text Positioning Methods

As mentioned before, the primary mechanism for text positioning is the use of the styles defined with the SetStyle method or, to be exact, the use of the align parameter. It refers to all texts: those inserted inside table cells, those used in the header or footer, as well as those inserted in the report with the use of the AddParagraph method.

  report.SetStyle("Left", "Arial", 10, Colors.DarkBlue, false, false,

ParagraphAlignment.Left, Color.Empty);

        report.SetStyle("Right", "Arial", 10, Colors.DarkBlue, false, false,

ParagraphAlignment.Right, Color.Empty);

        report.SetStyle("Center", "Arial", 10, Colors.DarkBlue, false, false,

ParagraphAlignment.Center, Color.Empty);

        report.AddParagraph("Right alignment", "Right");

        report.AddParagraph("Center alignment", "Center");

        report.AddParagraph("Left alignment", "Left");

The execution of the above code will generate the following report extract:

A more complex situation occurs when we want to insert texts with different alignment in the same line or when it is necessary to display the text in a few columns. To achieve this, a suitable number of spaces can be inserted in the text, but it is more efficient to use tab characters combined with declaring the tab position within a style.

report.SetStyle("Tabs", "Arial", 10, Colors.DarkBlue, false, false,

ParagraphAlignment.Left, Color.Empty).AddTabStops(70, 140);

report.AddParagraph("First left\tFirst center\tFirst right", "Tabs");

report.AddParagraph("Second left\tSecond center\tSecond right", "Tabs");

In the above code, declared tab character positions have been added to the Tabs style. The AddTabStops method which defines the position of any number of tab characters with an accuracy of one millimetre has been used. The effect of the code generation is illustrated below:

If it is necessary to control the positioning in even more precise way, the AddTabStop method can be used.

report.SetStyle("Tabs", "Arial", 10, Colors.DarkBlue, false, false,

ParagraphAlignment.Left, Color.Empty).

AddTabStop(70, TabAlignment.Center).AddTabStop(140, TabAlignment.Right);

report.AddParagraph("First left\tFirst center\tFirst right", "Tabs");

report.AddParagraph("Second left\tSecond center\tSecond right", "Tabs");

The AddStop command adds a declaration of a single tab character altogether with the alignment method. The below example shows how a declaration of a tab character sequence can be inserted in one instruction. The effect of the code generation is illustrated below.


IApplication Interface Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.1 IApplication Interface > 5.1.1 Methods

5.1.1 Methods

CreateReport

Report CreateReport();

Function CreateReport () As Report

This method creates and returns an object of the Report class, used as the main object for report generation.


Report Class

Home > Script Reports > 5 Object Model of Script Reports > 5.2 Report Class

5.2 Report Class

This is the basic class of the script reports system. It represents the report document as a whole and provides the methods used to create the report content.

Objects of the Report class are created with the use of the CreateReport method of the IApplication interface.


ReportChart Class Properties

5.2.1 Properties

MigraChart

MigraDoc.DocumentObjectModel.Shapes.Charts.Chart MigraChart { get; }

ReadOnly Property MigraChart As MigraDoc.DocumentObjectModel.Shapes.Charts.Chart

This property returns the base chart object of the MigraDoc library.

MigraLegend

MigraDoc.DocumentObjectModel.Legend MigraLegend { get; }

ReadOnly Property MigraLegend As MigraDoc.DocumentObjectModel.Legend

This property returns the chart legend object of the MigraDoc library. The legend is added to the chart with the use of the AddLegend method.


Report Class Methods_

Home > Script Reports > 5 Object Model of Script Reports > 5.2 Report Class > 5.2.2 Methods

5.2.2 Methods

AddChart

ReportChartAddChart(int aLeft, int aWidth, int aHeight,

MigraDoc.DocumentObjectModel.Color aLineColor, MigraDoc.DocumentObjectModel.Color

aFillColor);

ReportChart AddChart(intaLeft, int aWidth, int aHeight);

Function AddChart(ByVal aLeft As Integer, ByVal aWidth As Integer, ByVal aHeight As Integer, ByVal aLineColor As MigraDoc.DocumentObjectModel.Color, ByVal aFillColor As MigraDoc.DocumentObjectModel.Color) As ReportChart

Function AddChart(ByVal aLeft As Integer, ByVal aWidth As Integer, ByVal aHeight As Integer) As ReportChart

This method adds a chart to the report. The data of the series displayed in the chart will originate from a query for archival data, whose parameters should be set through the execution of the SetQueryData method of the chart object.

The aLeft parameter specifies the shifting of entire chart to the left expressed in millimetres. The aWidth and aHeight parameters define the width and height of the area occupied by the chart.

The aLineColor parameter defines the colour of the chart outline, while the aFillColor parameter defines the colour of the chart background fill.

The command returns the chart object.

ReportChartAddChart(object aData, int aLeft, int aWidth, int aHeight,

MigraDoc.DocumentObjectModel.Color aLineColor, MigraDoc.DocumentObjectModel.Color

aFillColor);

ReportChartAddChart(object aData, int aLeft, int aWidth, int aHeight);

Function AddChart(ByVal aData As Object, ByVal aLeft As Integer, ByVal aWidth As Integer, ByVal aHeight As Integer, ByVal aLineColor As MigraDoc.DocumentObjectModel.Color, ByVal aFillColor As MigraDoc.DocumentObjectModel.Color) As ReportChart

Function AddChart(ByVal aData As Object, ByVal aLeft As Integer, ByVal aWidth As Integer, ByVal aHeight As Integer) As ReportChart

The method adds to the report a chart in which the values of the displayed data series originate from a collection transferred by the aData parameter. The data series object must be of the System.Collections.ICollection or System.Data.DataTable type.

The other parameters have the same meaning as in the case of the methods generating a chart for archival data.

AddHorizontalTable

ReportTableAddHorizontalTable(bool aShowHeader, int aFirstWidth, int aNextWidth, string aFirstHeader, string aNextFormat);

ReportTableAddHorizontalTable(bool aShowHeader, int aFirstWidth, int aNextWidth, string aFirstHeader, string aNextFormat, string aFirstStyle, string aNextStyle);

Function AddHorizontalTable(ByVal aShowHeader As Boolean, ByVal aFirstWidth As Integer, ByVal aNextWidth As Integer, ByVal aFirstHeader As String, ByVal aNextFormat As String) As ReportTable

Function AddHorizontalTable(ByVal aShowHeader As Boolean, ByVal aFirstWidth As Integer, ByVal aNextWidth As Integer, ByVal aFirstHeader As String, ByVal aNextFormat As String, ByVal aFirstStyle As String, ByVal aNextStyle As String) As ReportTable

This method adds to the report a horizontal table for which the data series are displayed in single rows. The data series will originate from a query for archival data, whose parameters should be set through the execution of the SetQueryData method of the table object.

The aShowHeader parameter defines if the table will have the header row. The aFirstWidth and aNextWidth parameters define the width of the columns (in millimetres), respectively: of the first and all the next table columns.

The aFirstHeader parameter defines the text in the first column of the header row. The aNextFormat parameter defines value formatting in the header row columns. In the header line columns of the horizontal table the times corresponding to individual columns are displayed. For example, the hh:mm format will display the time in the format hours:minutes (e.g. 10:45).

The aFirstStyle and aNextStyle parameters define the names of the styles used for the first and all the next header columns. If these parameters are not specified, the standard header style is used.

The command returns the table object.

ReportTable AddHorizontalTable(object aData, int aFirstWidth, int aNextWidth);

Function AddHorizontalTable(ByVal aData As Object, ByVal aFirstWidth As Integer, ByVal aNextWidth As Integer )

This method adds to the report a horizontal table for which the data series are displayed in single rows. The series data is transferred through the aData parameter. The series data object must be of the System.Collections.ICollection or System.Data.DataTable type.

The aFirstWidth and aNextWidth parameters define the width of the columns (in millimetres), respectively: of the first and all the next table columns.

The method returns the table object.

AddImage

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, MigraDoc.DocumentObjectModel.ShapePosition aLeft, MigraDoc.DocumentObjectModel.ShapePosition aTop);

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, MigraDoc.DocumentObjectModel.ShapePosition aLeft);

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, int aLeft, int aTop);

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle , aLeft As MigraDoc.DocumentObjectModel.ShapePosition, aTop As MigraDoc.DocumentObjectModel.ShapePosition) As ReportImage

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle, aLeft As MigraDoc.DocumentObjectModel.ShapePosition) As ReportImage

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle, aLeft As Integer, aTop As Integer) As ReportImage

This method inserts an image in the report content. The aImageName parameter specifies the name of the image file. It is recommended to specify the file name only, without providing the complete access path. In such case, it is assumed that the image file is stored in the Addons subfolder of the application definition folder.

The aWrap parameter specifies the way for fitting the image among other components. The aLeft and aTop parameters define the position of the image, specified as constants of the ShapePosition type or provided in millimeters.

The method returns the image object.

AddPageBreak

void AddPageBreak();

Sub AddPageBreak( )

This command is used to move to the next page of the report.

AddParagraph

ReportParagraph AddParagraph(string aContent);

ReportParagraph AddParagraph(string aContent, string aStyle);

Function AddParagraph(ByVal aContent As String) As ReportParagraph

Function AddParagraph(ByVal aContent As String, ByVal aStyle As String) As ReportParagraph

This method inserts a text paragraph in the report content. The aContent parameter defines the paragraph content, while the aStyle parameter defines the style name used in the paragraph. If the style is not specified, the standard Normal style is used.

The method returns the paragraph object. Using this object, it is possible to add additional text or special fields to the paragraph.

AddVerticalTable

ReportTable AddVerticalTable(bool aShowHeader);

Function AddVerticalTable(ByVal aShowHeader As Boolean) As ReportTable

This method adds to the report a vertical table for which the data series are displayed in columns. The data series will originate from a query for archival data, whose parameters should be set through the execution of the SetQueryData method of the table object.

The aShowHeader parameter defines if the table will have the header row.

The method returns the table object.

ReportTable AddVerticalTable(object aData, bool aShowHeader);

Function AddVerticalTable(ByVal aData As Object, ByVal aShowHeader As Boolean) As ReportTable

This method adds to the report a vertical table for which the data series are displayed in columns. The series data is transferred through the aData parameter. The data series object must be of the System.Collections.ICollection or System.Data.DataTable type.

The aShowHeader parameter defines if the table will have the header row.

The method returns the table object.

Render

void Render(string aOutputFileName)

Sub Render(ByVal aOutputFileName As String)

This method is used to generate the report content and save it in a file whose name is defined by the aOutputFileName parameter. The report is generated in PDF format.

SetPageSetup

void SetPageSetup(int aLeftMargin, int aRightMargin, int aTopMargin, int aBottomMargin, int aHeaderDistance, int aFooterDistance);

Sub SetPageSetup(ByVal aLeftMargin As Integer, ByVal aRightMargin As Integer, ByVal aTopMargin As Integer, ByVal aBottomMargin As Integer, ByVal aHeaderDistance As Integer, ByVal aFooterDistance As Integer )

This method sets the parameters of the report page through defining the margin sizes and the distance of the header and footer from the page edge. All values are specified in millimeters.

void SetPageSetup(bool aLandscapeOrientation, MigraDoc.DocumentObjectModel.PageFormat aFormat);

Sub SetPageSetup(ByVal aLandscapeOrientation As Boolean, ByVal aFormat As MigraDoc.DocumentObjectModel.PageFormat )

The method sets the parameters of the report page through specifying its orientation and format of the page. The true value of the aLandscapeOrientation parameter means the page is oriented horizontally.

Example:

report.SetPageSetup(true, PageFormat.A4)

Execution of the above code returns a page in A4 format oriented horizontally.

SetStyle

ReportStyle SetStyle(string aName, string aFontName, double aFontSize,

MigraDoc.DocumentObjectModel.Color aFontColor, boolaBold, boolaItalic,

MigraDoc.DocumentObjectModel.ParagraphAlignment aAlignment,

MigraDoc.DocumentObjectModel.Color aShaderColor);

Function SetStyle(ByVal aName As String, ByVal aFontName As String, ByVal aFontSize As

Double, ByVal aFontColor As MigraDoc.DocumentObjectModel.Color, ByVal aBold As

Boolean, ByVal aIatlic As Boolean, ByVal aAlignment As

MigraDoc.DocumentObjectModel.ParagraphAlignment, ByVal aShaderColor As

MigraDoc.DocumentObjectModel.Color) As ReportStyle

This method is used to define the style which can be further used to create report components.

The aName parameter specifies the style name. Predefined names specified in the ReportStyleStandardNames class or any user-defined names can be used. The styles of predefined names have a predefined meaning and, once created, they are automatically used to build suitable report components.

The aFontName parameter defines the font style name, the aFontSize parameter defines the font size in points, the aFontColor parameter defines the font colour, the aBold parameter specifies bold type and the aItalic parameter selects italic type. While defining the font colour, predefined colours specified in the MigraDoc.DocumentObjectModel.Colors class can be used (e.g. Colors.Orange).

The aAlignment parameter specifies the way for text positioning within the component in which the text has been inserted (e.g. inside paragraph).

The aShaderColor parameter defines the background colour of the component for which the style will be used. For transparent (empty) background, the Color.Empty constant should be used.

The command returns the style object.


ReportHeader Class

Home > Script Reports > 5 Object Model of Script Reports > 5.3 ReportHeader Class

5.3 ReportHeader Class

This class represents the report header. An object of this class is created automatically at the moment of the object of the Report class generation. The object can be accessed through the Header property of the Report class.

Most methods and properties of the report header class are inherited from the ReportHeaderFooter class.


ReportHeader Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.3 ReportHeader Class > 5.3.1 ReportHeader Class Properties

5.3.1 Properties

MigraHeader

MigraDoc.DocumentObjectModel.HeaderFooter MigraHeader { get; }

ReadOnly Property MigraHeader As MigraDoc.DocumentObjectModel.HeaderFooter

This property returns the base header object of the MigraDoc library report.


ReportFooter Class

Home > Script Reports > 5 Object Model of Script Reports > 5.4 ReportFooter Class

5.4 ReportFooter Class

This class represents the report footer. An object of this class is created automatically at the moment of the object of the Report class generation. The object can be accessed through the Footer property of the Report class.

Most methods and properties of the footer class are inherited from the ReportHeaderFooter class.


ReportFooter Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.4 ReportFooter Class > 5.4.1 Properties

5.4.1 Properties

MigraFooter

MigraDoc.DocumentObjectModel.HeaderFooter MigraFooter { get; }

ReadOnly Property MigraFooter As MigraDoc.DocumentObjectModel.HeaderFooter
This property returns the base footer object of the MigraDoc library report.


ReportHeaderFooter Class Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.5 ReportHeaderFooter Class > 5.5.1 Methods

5.5.1 Methods

AddImage

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, MigraDoc.DocumentObjectModel.ShapePosition aLeft, MigraDoc.DocumentObjectModel.ShapePosition aTop);

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, MigraDoc.DocumentObjectModel.ShapePosition aLeft);

ReportImage AddImage(string aImageName, MigraDoc.DocumentObjectModel.WrapStyle aWrap, int aLeft, int aTop);

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle , aLeft As MigraDoc.DocumentObjectModel.ShapePosition, aTop As MigraDoc.DocumentObjectModel.ShapePosition) As ReportImage

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle, aLeft As MigraDoc.DocumentObjectModel.ShapePosition) As ReportImage

Function AddImage(ByVal aImageName As String, aWrap As MigraDoc.DocumentObjectModel.WrapStyle, aLeft As Integer, aTop As Integer) As ReportImage

This method inserts an image in the report header or footer. The aImageName parameter specifies the name of the image file. It is recommended to specify the file name only, without providing the complete access path. In such case, it is assumed that the image file is stored in the Addons subfolder of the application definition folder.

The aWrap parameter specifies the way for fitting the image among other components. The aLeft and aTop parameters define the position of the image, specified as constants of the ShapePosition type or provided in millimeters.

The command returns the image object.


ReportParagraph Class

Home > Script Reports > 5 Object Model of Script Reports > 5.6 ReportParagraph Class

5.6 ReportParagraph Class

This class represents a text paragraph inserted in the report, header or footer content. Objects of the ReportParagraph class are created with the use of the AddParagraph method, accessed through the Report and ReportHeaderFooter classes.


ReportParagraph Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.6 ReportParagraph Class > 5.6.1 Properties

5.6.1 Properties

MigraParagraph

MigraDoc.DocumentObjectModel.Paragraph MigraParagraph { get; }

ReadOnly Property MigraParagraph As MigraDoc.DocumentObjectModel.Paragraph

This property returns the base paragraph object of the MigraDoc library.


ReportParagraph Class Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.6 ReportParagraph Class > 5.6.2 Methods

5.6.2 Methods

AddNumPagesField

ReportParagraph AddNumPagesField();

Function AddNumPagesField() As ReportParagraph

This method adds to the report a special field to include the total number of pages of the report. Typically, this method is used for paragraphs inserted in the report header or footer.

The method returns the paragraph object.

Example:

report.Footer.AddParagraph(”Page ”).AddPageField().AddText(” of ”).AddNumPagesField()

Execution of the above code inserts in the report footer a text including the current page number and the total number of pages of the report. It is possible to sequentially execute the subsequent methods of the ReportParagraph class, as each of the method returns its own paragraph object.

AddPageField

ReportParagraph AddPageField();

Function AddPageField() As ReportParagraph

This method adds to the paragraph a special field to include the current number of the report page. Typically, this command is used for paragraphs inserted in the report header or footer.

The method returns the paragraph object.

AddText

ReportParagraph AddText(string aText);

Function AddText(ByVal aText As String) As ReportParagraph

This method adds to the paragraph the text defined by the aText parameter. This text is added to the text previously inserted in the paragraph (usually at the moment of the paragraph generation).

The method returns the paragraph object.


ReportImage Class

Home > Script Reports > 5 Object Model of Script Reports > 5.7 ReportImage Class

5.7 ReportImage Class

This class represents an image inserted in the report, header or footer content. Objects of the ReportImage class are created with the use of the AddImage method, accessed through the Report and ReportHeaderFooter classes..


ReportImage Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.7 ReportImage Class > 5.7.1 Properties

5.7.1 Properties

MigraImage

MigraDoc.DocumentObjectModel.Shapes.Image MigraImage { get; }

ReadOnly Property MigraImage As MigraDoc.DocumentObjectModel.Shapes.Image

This property returns the base image object of the MigraDoc library.


ReportStyleStandardNames Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.8 ReportStyleStandardNames Class > 5.8.1 Properties

5.8.1 Properties

Footer

string Footer { get; }

ReadOnly Property Footer As String

This style is used for the report page footer.

Header

string Header { get; }

ReadOnly Property Header As String

This style is used for the report page header.

Normal

string Normal { get; }

ReadOnly Property Normal As String

Default style for all report components. It is used when no other style for a component has been defined.

TableAltRow

string TableAltRow { get; }

ReadOnly Property TableAltRow As String

This style is used in the even cells of the table rows.

TableErrorCell

string TableErrorCell { get; }

ReadOnly Property TableErrorCell As String

This style is used for those cells of the table for archival data which include an incorrect value.

TableHeader

string TableHeader { get; }

ReadOnly Property TableHeader As String

This style is used for the table header cells.

TableRow

string TableRow { get; }

ReadOnly Property TableRow As String

This style is used in the cells of the table rows. If the TableAltRow style is defined, then the TableRow style is used for odd rows only.


ReportStyle Class

Home > Script Reports > 5 Object Model of Script Reports > 5.9 ReportStyle Class

5.9 ReportStyle Class

Style definition class for displaying report components. Objects of the ReportStyle class are created with the use of the SetStyle command of the Report class.

Use of the styles with standard names (defined in the ReportStyleStandardNames class) is fully automatic. Use of other styles requires defining the style name in the methods used to generate the report components.


ReportStyle Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.9 ReportStyle Class > 5.9.1 Properties

5.9.1 Properties

Alignment

MigraDoc.DocumentObjectModel.ParagraphAlignment Alignment { get; set;}

Property Alignment As MigraDoc.DocumentObjectModel.ParagraphAlignment

This property specifies the way for text positioning within the component in which the text has been inserted (e.g. inside paragraph).

FontBold

bool FontBold { get; set;}

Property FontBold As Boolean

This property specifies whether the font is bolded.

FontColor

MigraDoc.DocumentObjectModel.Color FontColor { get; set;}

Property FontColor As MigraDoc.DocumentObjectModel.Color

This property specifies the font colour. While defining the font colour, predefined colours specified in the MigraDoc.DocumentObjectModel.Colors class can be used (e.g. Colors.Orange).

FontItalic

bool FontItalic { get; set;}

Property FontItalic As Boolean

This property specifies whether the font is italicised.

FontName

string FontName { get; set;}

Property FontName As String

This property specifies the font style name.

FontSize

double FontSize { get; set;}

Property FontName As Double

This property specifies the font size expressed in points.

MigraStyle

MigraDoc.DocumentObjectModel.Style MigraStyle { get; }

ReadOnly Property MigraStyle As MigraDoc.DocumentObjectModel.Style

This property returns the base style object of the MigraDoc library.

Name

string Name { get; }

ReadOnly Property Name As String

This property stores the style name.

ShaderColor

MigraDoc.DocumentObjectModel.Color ShaderColor { get; set;}

Property ShaderColor As MigraDoc.DocumentObjectModel.Color

This property defines the background colour of the component for which the style will be used. While defining the colour, predefined colours specified in the MigraDoc.DocumentObjectModel.Colors class can be used (e.g. Colors.Orange).


ReportStyle Class Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.9 ReportStyle Class > 5.9.2 Methods

5.9.2 Methods

AddTabStops

ReportStyleAddTabStops(params int[ ] aPositions);

Function AddTabStops(ByVal ParamArray aPositions( ) As Object) As ReportStyle

This command adds to the style the position of the subsequent tab characters. The position is defined in millimeters.

Example:

report.SetStyle(”szpalty”, ”Arial”, 10, Colors.Black, false, false, ParagraphAlignment.Left,

Color.Empty).AddTabStops(50,100);

report.AddParagraph("1\tfirst\t11111”, "szpalty”);

report.AddParagraph("2\tsecond\t22222”, "szpalty”);

Execution of the above code will display text in three columns.

AddTabStop

ReportStyleAddTabStop(int aPosition, MigraDoc.DocumentObjectModel.TabAlignment aAlignmnet);

Function AddTabStop(ByVal aPosition As Integer, ByVal aAlignment As MigraDoc.DocumentObjectModel.TabAlignment) As ReportStyle

This method adds to the style the position of the next single tab character, altogether with the text alignment way in the tab point. The position is defined by the aPosition parameter expressed in millimeters. The way for alignment is defined by the aAlignment parameter.


ReportTable Class

Home > Script Reports > 5 Object Model of Script Reports > 5.10 ReportTable Class

5.10 ReportTable Class

This class represents the table object inserted in the report content. Objects of the ReportTable class are created with the use of the AddVerticalTable and AddHorizontalTable methods of the Report class. Once the table has been created, a set of columns (AddColumn method for vertical tables) or a set of rows (AddRow method for horizontal tables) should be added to it. In case of tables generated on the basis of archival data of process variables, it is also necessary to specify the readout parameters for archival data with the use of the SetQueryData method.


ReportTable Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.10 ReportTable Class > 5.10.1 Properties

5.10.1 Properties

EndTimeColumn

string EndTimeColumn { get; }

ReadOnly Property EndTimeColumn As String

The name of a special column in the vertical table for archival data, triggering the use of the aggregation period of variable values in the end time column. This property should be used in the AddColumn method in the position of the aVarName parameter.

FirstStyle

string FirstStyle { get; }

ReadOnly Property FirstStyle As String

This property stores the style name for the first column of the horizontal table header. This style is set at the moment of the table generation with the use of the AddHorizontalTable method of the Report class.

MigraTable

MigraDoc.DocumentObjectModel.Table MigraTable { get; }

ReadOnly Property MigraTable As MigraDoc.DocumentObjectModel.Table

This property returns the base table object of the MigraDoc library.

NextStyle

string NextStyle { get; }

ReadOnly Property NextStyle As String

This property stores the style name for the second and the next columns of the horizontal table header. This style is set at the moment of the table generation with the use of the AddHorizontalTable method of the Report class.

StartTimeColumn

string StartTimeColumn { get; }

ReadOnly Property StartTimeColumn As String

The name of a special column in the vertical table for archival data, triggering the use of the aggregation period of variable values in the start time column. This property should be used in the AddColumn method instead of the aVarName parameter.


ReportTable Class Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.10 ReportTable Class > 5.10.2 Methods

5.10.2 Methods

AddCalculatedColumn

ReportTableCalcColumn AddCalculatedColumn(string aHeaderText, CalculationType aCalcType, int aWidth, string aFormat = null, CellCallback aCallback = null, string aHeaderStyle = null, string aColumnStyle = null, string aColumnAltStyle = null, string aErrorStyle = null);

Function AddCalculatedColumn(ByVal aHeaderText As String, , ByVal aCalclType As CalculationType, ByVal aWidth As Integer, ByVal aFormat As String = Nothing, ByVal aCallback As CellCalback = Nothing, ByVal aHeaderStyle As String = Nothing, ByVal aColumnStyle As String = Nothing, ByVal aColumnAltStyle As String = Nothing, ByVal aErrorStyle As String = Nothing) As ReportTableCalcColumn

The method is used to add the calculated column to the report table. Calculation is realised on the basis of cell values for each row of the table.

The aHeaderText parameter specifies the text displayed in the table header line.

The aCalcType parameter specifies the way of calculation for column cell content. The following values are possible:

CalculationType.Custom – custom calculation performed in the callback function aCallback

CalculationType.Sum – sum of the values for the row cells

CalculationType.Min – minimum value for row cells

CalculationType.Max – maximum value for row cells

CalculationType.Avg – average value for row cells

The aWidth parameter specifies the column width in millimeters, and the aFormat parameter specifies the way the values displayed in the column cells are formatted.

The aCallback parameter allows to declare the callback function which will be performed for each column cell at the moment of generation of its value. The mechanism allow to implement the own way of calculating the value, controlling and additional formatting the result value. The callback function can change both the cell content and generation style. The callback function must comply with the following delegate:

delegate bool CellCallback(ReportTableCell aCell);

Delegate Sub CellCallback(ByVal aCell As IReportTableCell)

The aCell parameter is used for identification of the cell. It also allows access to the proposed content of the cell and its possible modification. By the aCall parameter it is also possible to access to the values of all cells of the row which the given call of callback function referres to. Based on these values it is possible to implement its own way of calculating an aggregate row value. The callback function returns the true value if it creates the cell content independently. The return value false means that the cell content should be generated on the basis of data contained in the aCell cell object.

Optional parameters: aHeaderStyle, aColumnStyle, aColumnAltStyle, aErrorStyle allow you to specify individually style names for: header cell, value cells in even rows, value cells with invalid data status.

AddCalculatedRow

ReportTableCalcRow AddCalculatedRow(string aFirstColumnText, CalculationType aCalcType, string aFormat = null, CellCallback aCallback = null, string aFirstStyle = null, string aNextStyle = null, string aErrorStyle = null);

Function AddCalculatedRow(ByVal aFirstColumnText As String, , ByVal aCalclType As CalculationType,, ByVal aFormat As String = Nothing, ByVal aCallback As CellCalback = Nothing, ByVal aFirstStyle As String = Nothing, ByVal aNextStyle As String = Nothing, ByVal aErrorStyle As String = Nothing) As ReportTableCalcRow

The method is used to add the calculated row to the report table. Calculation is realised on the basis of cell values for each column of the table.

The aFirstColumnText parameter specifies the text displayed in the first row column.

The aCalcType parameter specifies the way of calculation for row cell content. The following values are possible:

CalculationType.Custom – custom calculation performed in the callback function aCallback

CalculationType.Sum – sum of the values for the column cells

CalculationType.Min – minimum value for column cells

CalculationType.Max – maximum value for column cells

CalculationType.Avg – average value for column cells

The aFormat parameter specifies the way the values displayed in the row cells are formatted.

The aCallback parameter allows to declare the callback function which will be performed for each row cell at the moment of generation of its value. The mechanism allow to implement the own way of calculating the value, controlling and additional formatting the result value. The callback function can change both the cell content and generation style. The callback function must comply with the following delegate:

delegate bool CellCallback(ReportTableCell aCell);

Delegate Sub CellCallback(ByVal aCell As IReportTableCell)

The aCell parameter is used for identification of the cell. It also allows access to the proposed content of the cell and its possible modification. By the aCall parameter it is also possible to access to the values of all cells of the row which the given call of callback function referres to. Based on these values it is possible to implement its own way of calculating an aggregate row value. The callback function returns the true value if it creates the cell content independently. The return value false means that the cell content should be generated on the basis of data contained in the aCell cell object.

Opcjonalne parametry aFirstStyle, aNextStyle, aErrorStyle pozwalają na indywidualne określenie nazwy stylów dla: pierwszej komórki wiersza(opisu wiersza), komórek wartości, komórek wartości z niepoprawnym statusem.

Optional parameters: aFirstStyle, aNextStyle, aErrorStyle allow you to specify individually style names for: first cell of row (row description), value cells, value cells with invalid data status.

AddColumn

ReportTableColumn AddColumn(string aHeaderText, string aVarName, string aAggrName, int aWidth, string aFormat = null, ReportTableCellErrorBehavior aErrorMode = ReportTableCellErrorBehavior.Normal, CellCallbackaCallback = null, string aHeaderStyle = null, string aColumnStyle = null, string aColumnAltStyle = null, string aErrorStyle = null);

Function AddColumn(ByVal aHeaderText As String, ByVal aVarNameAs String, ByVal aAggrName As String, ByVal aWidth As Integer, ByVal aFormat As String= Nothing, ByVal aErrorMode As ReportTableCellErrorBehavior= ReportTableCellErrorBehavior.Normal, ByVal aCallback As CellCalback= Nothing, ByVal aHeaderStyle As String= Nothing, ByVal aColumnStyle As String= Nothing, ByVal aColumnAltStyleAs String = Nothing, ByVal aErrorStyle As String= Nothing) As ReportTableColumn

This command is used to add a column to the vertical table generated on the basis of archival data of process variables.

The aHeaderText parameter defines the text displayed in the table header line.

The aVarName and aAggrName parameters define the name of the process variable and the name of the aggregate calculated. Instead of the aVarName attribute, two special names can be used: ReportTable.StartTimeColumn or ReportTable.EndTimeColumn. This allows to define columns in which the start and end times of individual periods of aggregate values calculation will be displayed.

The aWidth parameter specifies the column width in millimeters, while the aFormat parameter defines the way for formatting the values displayed in the column cells. If the aFormat parameter is not specified, then a value format attribute from the variable definitions data base will be used.

The aErrorMode parameter defines the way for the generation of content in value cells in which there is no data or whose status is incorrect. The following values are possible:

ReportTableCellErrorBehavior.Empty - the cell is empty

ReportTableCellErrorBehavior.Normal - ignore all errors

ReportTableCellErrorBehavior.Normal_EmptyIfNoData - ignore status errors, the cell is empty if there is no data

ReportTableCellErrorBehavior.AddQuestion - add a question mark

ReportTableCellErrorBehavior.Normal_EmptyIfNoData - add a question mark for status errors, the cell is empty if there is no data

The aCallback parameter allows to declare a callback function which will be used for each value cell at the moment of its content generation. This mechanism allows to implement a user-defined reaction to errors or a method for checking the values of variables. The callback function can modify both the cell content and the generation style. The callback function must comply with the following delegate:

delegate bool CellCallback(ReportTableCell aCell);

Delegate Sub CellCallback(ByVal aCell As IReportTableCell)

The aCell parameter is used to identify a cell. It also allows to access the proposed cell content and modify it, if necessary. The callback function returns the true value in cases where the cell content has been created by this function. If the returned value is false, it means that the cell content should be generated on the basis of data included in the aCell object.

The optional aHeaderStyle, aColumnStyle, aColumnAltStyle, aErrorStyle parameters allow to individually specify the style names for: the header cell, value cells, value cells in even rows, value cells with incorrect data status.

ReportTableColumn AddColumn(string aHeaderText, string aFieldName, int aWidth, string aFormat = null, CellCallback aCallback = null, string aHeaderStyle = null, string aColumnStyle = null, string aColumnAltStyle = null);

Function AddColumn(ByVal aHeaderText As String, ByVal aFieldNameAs String, ByVal aWidth As Integer, ByVal aFormat As String= Nothing, ByVal aCallback As CellCalback= Nothing, ByVal aHeaderStyle As String= Nothing, ByVal aColumnStyle As String= Nothing, ByVal aColumnAltStyleAs String = Nothing) As ReportTableColumn

This method is used to add a column to the vertical table generated on the basis of data transferred at the moment of the table generation (through the object of DataTable or ICollection type).

The aHeaderText parameter defines the text displayed in the table header row.

The aFieldName parameter defines the name of the component used by the column. It is the name of the column in the object of DataTable type or the property name of the objects transferred in ICollection.

The aWidth parameter specifies the column width in millimeters, while the aFormat parameter defines the way for formatting the values displayed in the column cells.

The aCallback parameter allows to declare a callback function which will be used for each value cell at the moment of its content generation. This mechanism allows to implement a user-defined reaction to errors or a method for checking the values of variables.

The optional aHeaderStyle, aColumnStyle, aColumnAltStyle parameters allow to individually specify the style names for: the header cell, value cells, value cells in even rows.

AddRow

ReportTableColumn AddRow(string aFirstColumnText, string aVarName, string aAggrName, string aFormat = null, ReportTableCellErrorBehavior aErrorMode = ReportTableCellErrorBehavior.Normal, CellCallbackaCallback = null, string aFirstStyle = null, string aNextStyle = null, string aErrorStyle = null);

Function AddRow(ByVal aFirstColumnText As String, ByVal aVarNameAs String, ByVal aAggrName As String, ByVal aFormat As String= Nothing, ByVal aErrorMode As ReportTableCellErrorBehavior= ReportTableCellErrorBehavior.Normal, ByVal aCallback As CellCalback= Nothing, ByVal aFirstStyle As String= Nothing, ByVal aNextStyle As String= Nothing, ByVal aErrorStyle As String= Nothing) As ReportTableColumn

This method is used to add a row to the horizontal table generated on the basis of historical data of process variables.

The aFirstColumnText parameter defines the text displayed in the first column of the row.

The aVarName and aAggrName parameters define the name of the process variable and the name of the aggregate calculated.

The aFormat parameter defines formatting of the values displayed in the row cells. If the aFormat parameter is not specified, then a value format attribute from the variable definition data base will be used.

The aErrorMode parameter defines the way for the generation of content in value cells in which there is no data or whose status is incorrect. Detailed indications for use can be found in the description of the AddColumn method.

The aCallback parameter allows to declare a callback function which will be used for each value cell at the moment of its content generation. Detailed indications for use can be found in the description of the AddColumn method.

The optional aFirstStyle, aNextStyle, aErrorStyle parameters allow to individually specify the style names for: the cells in the first column of the row, cells in the second and the next columns of the row, value cells with incorrect data status.

 ReportTableColumn AddRow(string aFirstColumnText, string aFieldName, string aFormat = null, CellCallback aCallback = null, string aFirstStyle = null, string aNextStyle = null);

Function AddRow(ByVal aFirstColumnText As String, ByVal aFieldNameAs String, ByVal aFormat As String= Nothing, ByVal aCallback As CellCalback= Nothing, ByVal aFirstStyle As String= Nothing, ByVal aNextStyle As String= Nothing) As ReportTableColumn

This method is used to add a row to the horizontal table generated on the basis of data transferred at the moment of the table generation (through the object of the DataTable or ICollection type).

This method is used to add a row to the horizontal table generated on the basis of archival data of process variables.

The aFirstColumnText parameter defines the text displayed in the first column of the row.

The aVarName and aAggrName parameters define the name of the process variable and the name of the aggregate calculated.

The aFieldName parameter defines the name of the component used in the row. It is the name of the column in the object of the DataTable type or the property name of the objects transferred in ICollection.

The aFormat parameter defines formatting of the values displayed in the row cells.

The aCallback parameter allows to declare a callback function which will be used for each value cell at the moment of its content generation. Detailed indications for use can be found in the description of the AddColumn method.

The optional aFirstStyle, aNextStyle parameters allow to individually specify the style names for: the cells in the first column of the row, cells in the second and the next columns of the row.

GenerateContent

void GenerateContent ();

Sub GenerateContent ()

This method is used to generate a complete table content on the basis of the data available. The use of this method is not obligatory. The Render method of the Report class executes automatically the GenerateContent method for all the tables for which this method has not yet been executed.

LeftIndent

void LeftIndent(int aIndent);

Sub LeftIndent(ByVal aIndent As Integer)

This method allows to shift the position of the whole table to the right by the number of millimeters specified in the aIndent parameter.

SetEdgeStyle

void SetEdgeStyle(ReportTableEdgeType aEdgeType, MigraDoc.DocumentObjectModel.Color aColor);

Sub SetEdgeStyle(ByVal aEdgeType As ReportTableEdgeType, ByVal aColor As MigraDoc.DocumentObjectModel.Color)

This method is used to set the style for drawing table cell edges. The aEdgeType parameter defines which edges should be drawn. The following values are available:

ReportTableEdgeStyle.None - no edges

ReportTableEdgeStyle.Outline - table outline only

ReportTableEdgeStyle.Columns - edges around columns

ReportTableEdgeStyle.Rows - edges around rows

ReportTableEdgeStyle.Cell - edges around each cell

The aColor parameter specifies the edge colour. While defining the font colour, predefined colours specified in the MigraDoc.DocumentObjectModel.Colors class can be used (e.g. Colors.Orange).

SetQueryData

void SetQueryData(DateTime aStartTime, DateTime aStartTime, TimeSpan aAggrInterval);

Sub SetQueryData(ByVal aStartTime As Date, ByVal aEndTime As Date, ByVal aAggrInterval As System.TimeSpan)

This method defines the parameters of a query for data in case of the tables generated on the basis of historical data of process variables.

The aStartTime and aEndTime parameters specify the start and end times of a query for data. The aAggrInterval defines the data aggregation period.


ReportTableColumn Class

Home > Script Reports > 5 Object Model of Script Reports > 5.11 ReportTableColumn Class

5.11 ReportTableColumn Class

This class represents a column added to the vertical table. Objects of the ReportTableColumn class are created with the use of the AddColumn function of the ReportTable class.


ReportTableCalcColumn Class Properties

5.11.1 Properties

CalcType

CalculationType CalcType { get; set; }

Property CalcType As CalculationType

The property defines the type of the aggregate calculated.

Callback

CellCallback Callback { get; set; }

Property Callback As CellCallback

The property defines the callback function which will be performed for each cell of value at the moment of generating its content. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ColumnStyle

string ColumnStyle { get; set;}

Property ColumnStyle As String

The property defines the style name for the value cell.

ColumnAltStyle

string ColumnAltStyle { get; set;}

Property ColumnAltStyle As String

The property defines the style name for the value cell in even table rows.

ErrorMode

ReportTableCellErrorBehavior ErrorMode { get; set; }

Property ErrorMode As ReportTableCellErrorBehavior

The property defines the way of creation of value cell contents for which is no data or data status is incorrect. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorStyle

string ErrorStyle { get; set;}

Property Errortyle As String

The property defines the style name for value cells with incorrect data status.

Format

string Format { get; set;}

Property Format As String

The property defines the way the values displayed in column cells are formatted.

HeaderText

string HeaderText { get; set;}

Property HeaderText As String

The property defines the text displayed in the line of the column header.

HeaderStyle

string HeaderStyle { get; set;}

Property HeaderStyle As String

The property defines the style name for the cell of the column header.

MigraColumn

MigraDoc.DocumentObjectModel.Column MigraColumn { get; }

ReadOnly Property MigraColumn As MigraDoc.DocumentObjectModel.Column

The property returns the base object of the MigraDoc library table column.

ReportTable

ReportTable ReportTable { get; }

ReadOnly Property ReportTable As ReportTable

The property returns the object of the table which the column belongs to.

Width

int Width { get; set;}

Property Width As Integer

The property defines the column width in millimeters.


ReportTableRow Class

Home > Script Reports > 5 Object Model of Script Reports > 5.12 ReportTableRow Class

5.12 ReportTableRow Class

This class represents a row added to the vertical table. Objects of the ReportTableRow class are created with the use of the AddRow function of the ReportTable class.


ReportTableRow Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.12 ReportTableRow Class > 5.12.1 Properties

5.12.1 Properties

AggName

string AggName { get; set;}

Property AggName As String

This property defines the aggregate name of the historical values of a process variable.

Callback

CellCallback Callback { get; set; }

Property Callback As CellCallback

This property defines the callback function which will be executed for each value cell at the moment of its content generation. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorMode

ReportTableCellErrorBehavior ErrorMode { get; set; }

Property ErrorMode As ReportTableCellErrorBehavior

This property defines the way for the generation of content in value cells in which there is no data or whose status is incorrect. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorStyle

string ErrorStyle { get; set;}

Property Errortyle As String

This property specifies the style name for value cells with incorrect data status.

FirstStyle

string FirstStyle { get; set;}

Property FirstStyle As String

This property specifies the style name for the cell in the first column of the row.

Format

string Format { get; set;}

Property Format As String

This property defines formatting of the values displayed in the row cells.

HeaderText

string HeaderText { get; set;}

Property HeaderText As String

This property defines the text displayed in the first column of the row.

ItemName

string ItemName { get; set;}

Property ItemName As String

Depending of the context of its use, this property defines:

- the name of the process variable whose archival values are read,

- the name of the data collection field transferred to the table.

MigraRow

MigraDoc.DocumentObjectModel.Row MigraRow { get; }

ReadOnly Property MigraRow As MigraDoc.DocumentObjectModel.Row

This property returns the base object of the table row of the MigraDoc library.

NextStyle

string NextStyle { get; set;}

Property NextStyle As String

This property specifies the style name for the cells in the second and the next columns of the row.

ReportTable

ReportTable ReportTable { get; }

ReadOnly Property ReportTable As ReportTable

This property returns the table object which the row belongs to.


ReportTableCalcColumn Class

Home > Script Reports > 5 Object Model of Script Reports > 5.13 ReportTableCalcColumn Class

5.13 ReportTableCalcColumn Class

The class represents the column calculated added to the table. The ReportTableColumn class objects are created by the AddCalculatedColumn function of the ReportTable class.


ReportTableCalcRow Class

Home > Script Reports > 5 Object Model of Script Reports > 5.14 ReportTableCalcRow Class

5.14 ReportTableCalcRow Class

The class represents the row calculated added to the table. The objects of the ReportTableCalcRow class are created by the function AddCalculatedRow of the ReportTable class.


ReportTableCalcRow Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.14 ReportTableCalcRow Class > 5.14.1 Properties

5.14.1 Properties

CalcType

CalculationType CalcType { get; set; }

Property CalcType As CalculationType

The property defines the type of the aggregate calculated.

Callback

CellCallback Callback { get; set; }

Property Callback As CellCallback

The property defines the callback function which will be performed for each value cell at the moment of its content generation. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorMode

ReportTableCellErrorBehavior ErrorMode { get; set; }

Property ErrorMode As ReportTableCellErrorBehavior

The property defines the way of content creation of value cell for which there is no data or the data status is incorrect. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorStyle

string ErrorStyle { get; set;}

Property Errortyle As String

The property defines the style name for value cells with incorrect data status.

FirstStyle

string FirstStyle { get; set;}

Property FirstStyle As String

The property defines the style name for the cell in the first row column.

Format

string Format { get; set;}

Property Format As String

The property defines the way of formatting of values displayed in row cells.

HeaderText

string HeaderText { get; set;}

Property HeaderText As String

The property defines the text displayed in the first row column.

MigraRow

MigraDoc.DocumentObjectModel.Row MigraRow { get; }

ReadOnly Property MigraRow As MigraDoc.DocumentObjectModel.Row

The property returns the base object of the table row of the MigraDoc library.

NextStyle

string NextStyle { get; set;}

Property NextStyle As String

The property defines the style name for cells in the second and subsequent row columns.

ReportTable

ReportTable ReportTable { get; }

ReadOnly Property ReportTable As ReportTable

The property returns the table object for which the row belongs.


ReportTableCell Class

Home > Script Reports > 5 Object Model of Script Reports > 5.15 ReportTableCell Class

5.15 ReportTableCell Class

This class represents the object of a single table cell. Objects of the ReportTableCell class are generated automatically. They are used as the parameter of the callback function of the CellCalback type, enabling to check the cell content. This mechanism is explained in the description of the AddColumn method of the ReportTable class.

Some of the class properties are used to identify a cell, while others allow to modify the cell final content.


ReportTableCell Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.15 ReportTableCell Class > 5.15.1 Properties

5.15.1 Properties

CalcColumn

ReportTableCalcColumn CalcColumn { get; }

ReadOnly Property CalcColumn As ReportTableCalcColumn

This property stores a reference to the object of the column calculated to which the cell belongs. The null value mens that the cell does not belong to the column calculated.

CalcRow

ReportTableCalcRow CalcRow { get; }

ReadOnly Property CalcRow As ReportTableCalcRow

This property stores a reference to the object of the row calculated to which the cell belongs. The null value mens that the cell does not belong to the row calculated.

Column

ReportTableColumn Column { get; }

ReadOnly Property Column As ReportTableColumn

This property stores a reference to the object of the column to which the cell belongs. This property is valid for vertical tables only.

Content

string Content { get; set;}

Property Content As String

This property defines the text which will be inserted in the cell content. This text has been created on the basis of the value of the RawValue cell, its status ValueStatus and other properties defined in the row or cell definition. The CellCallback callback function can modify the property value in order to modify the cell content.

Index

int Index { get;}

ReadOnly Property Index As Integer

This property defines, depending on the table type, the index of the row or column to which the cell belongs.

MigraCell

MigraDoc.DocumentObjectModel.Cell MigraCell { get; }

ReadOnly Property MigraCell As MigraDoc.DocumentObjectModel.Cell

This property returns the base object of the table cell of the MigraDoc library.

Row

ReportTableRow Row { get; }

ReadOnly Property Row As ReportTableRow

This property stores a reference to the object of the row to which the cell belongs. This property is valid for horizontal tables only.

RowIdx

int RowIdx { get;}

ReadOnly Property RowIdx As Integer

The property defines the row index to which the cell belongs. This property is valid for cells from columns calculated only.

RawValue

object RawValue { get;}

ReadOnly Property RavValue As Object

This property stores the raw value of the cell. The value originates from a query for archival data or from a data collection provided for the table.

SourceValues

System.Collections.ICollection<CellValue> SourceValues { get;}

ReadOnly Property SourceValues As System.Collections.ICollection(Of CellValue)

The property transfers the value collection of all cells of rows and columns. It is used only in cells belonging to the column or row calculated. It alows to implement own algorithms of aggregate value calculation.

Style

string Style { get; set;}

Property Style As String

This property specifies the cell style name. The CellCallback callback function can modify the style name in order to modify the cell appearance.

ValueStatus

Askom.Ascent.StatusOpc ValueStatus { get; }

ReadOnly Property ValueStatus As Askom.Ascent.StatusOpc

This property stores the cell value status originating from a query for archival data of a process variable.


ReportTableCell Class Methods

Home > Script Reports > 5 Object Model of Script Reports > 5.15 ReportTableCell Class > 5.15.2 Methods

5.15.2 Methods

AvgValue

object AvgValue();

Function AvgValue () As Object

The method calculates the average value of the cells of the row or column for the cell belongs to the column or row calculated.

MaxValue

object MaxValue();

Function MaxValue () As Object

The method calculates the maximum value for row or column cells for the cell belongs to the column or row calculated.

MinValue

object MaxValue();

Function MinValue () As Object

The method calculates the minimum value for row or column cells for the cell belongs to the column or row calculated.

SumValue

object SumValue();

Function SumValue () As Object

The method calculates the value sum for row or column cells for the cell belongs to the column or row calculated.


CellValue Class

Home > Script Reports > 5 Object Model of Script Reports > 5.16 CellValue Class

5.16 CellValue Class

The class represents the object used to store the table cell values. It is used during aggregate value calculation for cells belong to the column or row calculated. The collections of the CellValue objects are created automatically. The sccess to them is realised by the SourceValues property of the ReportTableCell class objects.


CellValue Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.16 CellValue Class > 5.16.1 Properties

5.16.1 Properties

Content

string Content { get;}

ReadOnly Property Content As String

The property shares the table cell content after conversion into a text.

Status

StatusOpc Status { get; }

ReadOnly Property Status As Askom.Ascent.StatusOpc

The property shares the value status of the table cell.

TimeStamp

DateTime TimeStamp { get; }

ReadOnly Property TimeStamp As DateTime

The property shares the time stamp of the table cell value. It is valid only for the tables created on the basis of queries for archival data.

Value

object Value { get;}

ReadOnly Property Value As Object

The property shares the table cell value in the source form.


ReportChart Class

Home > Script Reports > 5 Object Model of Script Reports > 5.17 ReportChart Class

5.17 ReportChart Class

The class represents the object of the chart placed in the report content. The objects of the ReportChart class are created by the AddChart method of the Report class.


ReportChartSeries Class Methods

5.18.2 Methods

SetDataLabels

void SetDataLabels(string aStyle, string aFormat, MigraDoc.DocumentObjectModel.Shapes.Charts.DataLabelPosition aPosition);

Sub SetDataLabels(ByVal aStyle As String, ByVal aFormat As String, ByVal aPosition As MigraDoc.DocumentObjectModel.Shapes.Charts.DataLabelPosition)

This method is used to define the way for the generation of data series labels. If this method is not executed, the labels will not be generated. Labels are not available for all series types.

The aStyle parameter defines the style name used to generate labels. The aFormat parameter defines formatting (value to text conversion) of the label values. The aPosition parameter defines the position of labels in relation to series points.

SetMarkersStyle

void SetMarkersStyle(MigraDoc.DocumentObjectModel.Shapes.Charts.MarkerStyle aStyle, int aSize, MigraDoc.DocumentObjectModel.Color aForegroundColor, MigraDoc.DocumentObjectModel.Color aBackgroundColor);

Sub SetMarkersStyle(ByVal aStyle As MigraDoc.DocumentObjectModel.Shapes.Charts.MarkerStyle, ByVal aSize As Integer, ByVal aForegroundColor As MigraDoc.DocumentObjectModel.Color, ByVal aBackgroundColor As MigraDoc.DocumentObjectModel.Color)

This method is used to define the way for the generation of data series markers. If this method is not executed, the markers will not be generated. Markers are not available for all series types.

The aStyle parameter specifies the appearance of the markers. The aSize parameter defines the size of the markers expressed in millimeters. The aForegroundColor and aBackgroundColor parameters determine colouring of the markers.


ReportChartSeries Class

Home > Script Reports > 5 Object Model of Script Reports > 5.18 ReportChartSeries Class

5.18 ReportChartSeries Class

This class represents the data series object inserted in the chart. Objects of the ReportChartSeries class are created with the use of the AddSeries method of the ReportChart class.


ReportChartSeries Class Properties

Home > Script Reports > 5 Object Model of Script Reports > 5.18 ReportChartSeries Class > 5.18.1 Properties

5.18.1 Properties

AggrName

string AggrName { get; set;}

Property AggrName As String

This property defines the aggregate name of the historical values of a process variable.

ItemName

string ItemName { get; set;}

Property ItemName As String

Depending of the context of its use, this property defines:

- the name of the process variable whose historical values are read,

- the name of the data collection field transferred to the chart.

MigraSeries

MigraDoc.DocumentObjectModel.Shapes.Charts.Series MigraSeries { get; }

ReadOnly Property MigraSeries As MigraDoc.DocumentObjectModel.Shapes.Charts.Series

This property returns the base series object of the MigraDoc library.


Welcome

Home > Scripts

>> Help for Asix

www.asix.com.pl

Asix.Evo - Scripts


1. The Basics of Using Scripts

In many applications there is a need to implement functionality that can not be achieved with standard mechanisms of diagrams and visualization objects. The typical examples of such functions are:

  • Performing non-standard calculations of the process variable values, particularly with the use of archival values.

  • Programming unusual responses to the events occurring in a controlled process.

  • Transferring the variable values and other information about the system operation outside the Asix.Evo application.

  • Advanced strategies for detecting alarm situations.

  • Loading data from non-standard data sources, e.g. from third-party databases.

  • Creating reports.

  • Creating specialized user interfaces, based on freely created windows.

In order to perform the above functions (and other similar), Asix.Evo features a module supporting the user script. Asix.Evo provides an integrated environment for creating and running scripts.

Asix.Evo uses the possibilities offered by the Net. platform. In fact, application scripts are fully compiled Net. modules. It is possible to use the C# and Visual Basic programming languages. The user scripts can use the full set of objects and the functions of .NET platform. Additionally, the script execution environment is extended with access functions to the Asix.Evo application components.

The user scripts are run in separate application domains and in their own threads. The scripts and the main application are isolated from each other. This way, the risk that the entire application will crush due to a script runtime error is minimized.


1.1 Creating Script

To create a new script:

  • Open the Application Explorer panel.

  • Double-click with the mouse on the Scripts node or execute the Create Script command from the context menu of the Scripts node. This will open the following window:

Fig. New Script Declaration Window.

  • Specify the script name and language and use the Create button.

The above activities will generate the script initial template and open the script edit panel.


1.2. Script Edition

Script edit panel is a basic tool for writing and running scripts in a test mode of the Asix.Evo application. Any other programming editor may be used as well - provided that the script file localization will be saved in the application definition directory.

Fig. Edit Panel of Scripts.

The Script Editor provides: code colouring based on a syntax, automatic formatting, immediate detection of errors, name prompting and completion, developing of component classes.

Incorrect code fragments are underlined in red. Additionally, a summary description of an error may by displayed in a tooltip. It is also possible to perform a full compilation of a script using the Test button. Any errors will be displayed in the table of messages.

One of the most useful editor function is developing components and complementation of names. The editor automatically detects the edition context, and at the right moments displays a box with alternatives proposed - they can be the class component names, variable names, enumeration components. The user can open the tooltip with the Ctrl-space keyboard shortcut.

The edit panel also allows for an easy management of script execution. The script can be run (with specified parameters or not), it is also possible to force its termination.


1.3. Methods to Run Scripts

Scripts in the Asix.Evo application are always run using the Script operator action.

Script(name, parameter1, parameter2, ...)

In the call content, the script name and the correct number of run parameters should be specified. The Script action can be used wherever the use of operator action is permitted.

Two main categories of scripts can be distinguished: interactive scripts run as a result of the operator activities and autonomous scripts, run in the application background, performing function not directly related to the operator activities.


1.3.1. Interactive Scripts

In the case of the interactive scripts, the Script operator action is used as an action linked to the visualization object event or as the user menu action.

Fig. The Example of Operator Action for Interactive Scripts.

The above example shows the component definition of the user menu which, when used, executes the StartAll script.

Fig. The Script Used to Handle the Button Press Event in the Button Class Object.

The following example shows identical action, but this time used to handle the button press event in the Button class object.


1.3.2. Autonomous Scripts

Autonomous scripts are usually run through the schedule mechanism. Scripts of this type are mostly used in the schedule components, which execution mode is set to Once at application start. In this mode, the script is run at the start-up and operates until the application is closed. It is also possible to use a periodic mode of initialisation or initialisation when a specific event occurs. In these modes, the script is run repeatedly, it should perform its task and then terminate.

Note:

The functionality of performing certain functions periodically or in response to the occurrence of certain events, can be easily implemented into the script which is run once. This technique is more effective, it does not require time-consuming process of running the script each time.

Fig. Scheduler - Execution Modes of Scripts.

The above example shows different execution modes of scripts.


1.4. Active Script Management

Interactive management of running scripts is carried out via the script diagnostic panel. The Active Scripts panel is opened by selecting the Diagnostics/Active Scripts node in the Application Explorer panel or in the application execution mode via the control panel.

Fig. The Active Script Panel.

The active script window allows monitoring, closing and restarting all the currently running scripts. It also enables starting new scripts.

Alternative commands for the control of script operation are based on the use of the ScriptRestart and ScriptClose operator actions and the IsScriptWorking function. A script can also force its own restart using the RestartScript command.


1.5. Script Code Structure

The Asix.Evo scripts can be created in the C# and Visual Basic object-oriented languages. When the script is created, its code structure is generated:

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class SkryptT1 : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
return true;
}

public void FinalizeScript()
{
}
}

VB

Imports System;
Imports System.Windows.Forms;

Imports Askom.AsixEvo.Scripting;

Public Class SkryptT2
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As IApplication) As Boolean Implements IScript.Initialize

Return True
End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The main script class must implement the IScript interface defined within the Askom.AsixEvo.Scripting area.

C#

public interface IScript
{
bool Initialize(string[] aParameters, IApplication aApplication);
void FinalizeScript();
}

VB

Public Interface IScript
Function Initialize(ByVal aParameters() As String, ByVal aApplication As IApplication) As Boolean
Sub FinalizeScript()
End Interface

The Initialize function, is the main function of the script called at the time of its initialization. The function receives two input parameters:

  • aParameters - it is the table containing all the parameters transmitted at the script execution;

  • aApplication - transmits a reference to the IApplication interface, which allows accessing the running application state. It is the basic mechanism of the script interoperability with the Asix.Evo application environment.

The value returned by the Initialize function, determines whether the script has been terminated. The true value means that the script has performed all of its functions and should be closed. This is a typical action of the so called one-time scripts. The resident scripts should return the false value. The script remains in the memory and will be able to continue running.

The FinalizeScript function is called directly before the script exits. It enables executing operations required for the correct closing of the script, e.g. release of the used system resources, closing connections with database, etc.


2.1. One-time Scripts

The one-time scripts are usually run interactively, by the operator or periodically, according to a schedule. Generally, the one-time script runs for a short period of time. All of its functions are within the Initialize method (or within the other methods called by the Initialize method). In the case of the one-time script, the Initialize method must return the true value.

The example shows the script which has to record the information on operator presence in a text file. The operator is responsible for periodical initialization of the script (e.g. by using correctly configured Button object), and each initialization will save a message to the registry file.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;
using System.IO;

public class Single : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
StreamWriter writer = new StreamWriter(

Path.Combine(aApplication.ApplicationWorkingDirectory, "logs\\rejestr.txt"), true,

System.Text.ASCIIEncoding.GetEncoding(1250));
String msg = String.Format("{0} Operator presence notification: operator = {1}, workstation= {2}",

DateTime.Now, aApplication.CurrentUserName, aApplication.CurrentStationName);
writer.WriteLine(msg);
writer.Close();

aApplication.ReportMessage(EvoMessageType.Info, "Operator presence notification registered");

return true;
}

public void FinalizeScript()
{

}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting
Imports System.IO

Public Class SingleVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim writer As StreamWriter
writer = New StreamWriter(Path.Combine(aApplication.ApplicationWorkingDirectory,

"logs\\rejestr.txt"), True, System.Text.ASCIIEncoding.GetEncoding(1250))

Dim msg As String
msg = String.Format("{0} Operator presence notification: operator = {1}, workstation= {2}", _
Date.Now, aApplication.CurrentUserName, aApplication.CurrentStationName)
writer.WriteLine(msg)
writer.Close()

aApplication.ReportMessage(EvoMessageType.Info, " Operator presence notification registered ")

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The entire code is located in the Initialize function. First, the StreamWriter class object is created. In the object constructor a file name is transferred, the writing to file option and the text encoding method are selected (as the default UTF8 encoding would be used). The file name is created based on the application working directory name, returned by the ApplicationWorkingDirectory property. Then, a message text containing the name of the user currently logged in: CurrentUserName, and the workstation name: CurrentStationName, is created and saved. At the end, the Initialize function returns the true property informing of the termination of the script running.

The call of the ReportMessage function is not necessary. However, it is recommended to register messages informing about the script running and its possible execution errors in the standard message log.


2.2. Resident Scripts

The characteristic feature of the resident scripts is that after their initialization, they remain running until the application is closed. Generally, they are started along with the application according to the scheduler mechanism.

In the resident scripts, the Initialize method is usually used to initialize the script, and the main functionality is implemented in the created threads or in the declared return functions. For the resident script, the Initialize method must return the false value.

Different programming templates for resident script creation are available, and these templates are described in the subsequent sections.


2.2.1. Loops in Initialize Method

The method of continuous loop in the Initialize method is the simplest structure that have much in common with the one-time scripts. The main functionality is achieved by the Initialize method. However, the method running never ends (it will be automatically ended when the application is closed). This is the only case where, for obvious reasons, the value returned by the Initialize method is of no importance.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class Loop : IScript
{
IApplication application;

public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;
while (true)
{
DoTask();
aApplication.Sleep(TimeSpan.FromSeconds(1));
}

return true;
}

public void FinalizeScript()
{

}

void DoTask()
{
application.ReportMessage(EvoMessageType.Info, "The script running cycle completed");
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class LoopVB
Implements IScript

Dim application As IApplication
Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication
While (True)

DoTask()
aApplication.Sleep(TimeSpan.FromSeconds(1))

End While

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Sub DoTask()

application.ReportMessage(EvoMessageType.Info, "The script running cycle completed")

End Sub

End Class

The main script functionality is achieved by the DoTask method. The Initialize method includes the While type continuous loop in which the DoTask method is called cyclically. Between the subsequent calls, the 1-second suspension of the running cycle takes place. The used Sleep method of the IApplication interface is the recommended method of suspending the script operation for a specific period of time.


2.2.2. Use of RegisterTimeEvent Function

The method of the RegisterTimeEvent function of the IApplication interface involves declaring the callback function, which will be executed periodically. The RegisterTimeEvent function allows the period and moments of the callback function execution to be very carefully specified.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class Timer : IScript
{
IApplication application;
public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;
application.RegisterTimeEvent(Report1Hour, TimeSpan.FromHours(1),

                                    TimeSpan.FromMinutes(15));
return false;
}

public void FinalizeScript()
{

}

void Report1Hour()
{
application.ReportMessage(EvoMessageType.Info, "Creating a report at a time" +

DateTime.Now);
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class TimerVB
Implements IScript

Dim application As IApplication
Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

application = aApplication
application.RegisterTimeEvent(AddressOf Report1Hour, TimeSpan.FromHours(1), _

TimeSpan.FromMinutes(15))
Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Sub Report1Hour()

application.ReportMessage(EvoMessageType.Info, "Creating a report at a time" _

& DateTime.Now)
End Sub

End Class

In the Initialize method the Report1Hour callback function is registered. Returning the false value loads the script into the memory.

The second parameter of the RegisterTimeEvent method specifies the period of time between the subsequent callback function calls, and the third parameter specifies the initial point offset. The Report1Hour method will be called every 1 hour, at 15 minutes past each full hour.


2.2.3. Creating Threads

When using the method of multiple threads, the CreateThread method of the IApplication interface is used. It is possible to create multiple threads to be executed independently. The threads functioning and their mutual synchronization is entirely arbitrary - the synchronization methods provided by the .NET platform should be used.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class ThreadDemo : IScript
{
IApplication application;
public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;

System.Threading.Thread t1 = aApplication.CreateThread(ThreadFun);
t1.Start();

return false;
}

public void FinalizeScript()
{

}

void ThreadFun()
{
while (true)
{
application.ReportMessage(EvoMessageType.Info, "The script running cycle completed");
application.Sleep(TimeSpan.FromSeconds(1));
}
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class ThreadDemoVB
Implements IScript

Dim application As IApplication
Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication
Dim t As System.Threading.Thread
t = aApplication.CreateThread(AddressOf ThreadFun)
t.Start()
Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Sub ThreadFun()

While True
application.ReportMessage(Askom.MessageLogging.MessageType.Warning, _

"The script running cycle completed")
application.Sleep(TimeSpan.FromSeconds(1))
End While

End Sub

End Class

In the Initialize method, with the CreateThread method a new working thread is created. The ThreadFun method is specified as the thread function. After creating, a new thread is run. Returning the false value loads the script into the memory, and the thread continues to operate.

Running the thread calls the ThreadFun method. The main script functionality is performed by the While continuous loop. Between the subsequent running cycles, the 1-second pause takes place. Creating threads that run without interruption should be avoided, as it causes a CPU overloading.

The method of independent threads should be used, when initialisation of more than one thread is necessary. The example shown can be implemented in an easier way, using the continuous loop method within the Initialize method.


2.2.4. Monitoring the Process Variable Changes

The method of creating the resident scripts, synchronised by the current process variable value changes involves declaring callback function which will be called whenever the variable state changes. To register a callback function, the RegisterStateEvent method of the IVariable interface is used. En example code can be found in the section concerning the readout of current values of process variables (see: 2.4. Readout of Current Values of Process Variables).


2.2.5. Monitoring Alarm Status

The method of creating the resident scripts, synchronised by the changes of the selected alarm status involves declaring the callback function which will be called whenever the alarm status changes. To register a callback function, the RegisterStateEvent method of the IAlarm interface is used. En example code can be found in the section concerning monitoring alarm status (see: 2.9. Controlling the Alarm Status).


2.3. Readout of Script Starting Parameters

When starting a script, the aParameters array, from which all the call parameters values can be readout is transferred to the Initialize function. The parameter mechanism allows writing the universal scripts, which functioning details depend on the call method. The transfer of process variable name, an alarm ID, a file name, etc., are the typical examples.

Two call parameters readout methods are available. The first method is used to view all elements of the parameter array. In the second one, an access to an argument by specifying its consecutive number is used.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class Argumenty : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
int i = 0;
if (aParameters != null)
{
foreach (string p in aParameters)
aApplication.ReportMessage(EvoMessageType.Info,

String.Format("Parametr {0} = {1}", ++i, p));
}

return true;
}

public void FinalizeScript()
{

}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class ArgumentyVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

Dim i As Integer
i = 0

If (Not aParameters Is Nothing) Then
For Each p As String In aParameters
i += 1
aApplication.ReportMessage(EvoMessageType.Info, _

String.Format("Parametr {0} = {1}", i, p))
Next p
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The above code shows iteration method which applies to all the elements of the aParameters parameter array.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class Argumenty : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{

if (aParameters == null || aParameters.Length < 2)
aApplication.ReportMessage(EvoMessageType.Info, "Too few parameters");
else
{
aApplication.ReportMessage(EvoMessageType.Info, "Parametr 1 = " + aParameters[0]);
aApplication.ReportMessage(EvoMessageType.Info, "Parametr 2 = " + aParameters[1]);
}

return true;
}

public void FinalizeScript()
{

}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class ArgumentyVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

If (aParameters Is Nothing) Then
aApplication.ReportMessage(EvoMessageType.Info, "No parameters")
ElseIf (aParameters.Length < 2) Then
aApplication.ReportMessage(EvoMessageType.Info, "Too few parameters")
Else
aApplication.ReportMessage(EvoMessageType.Info, "Parametr 1 = " + aParameters(0))
aApplication.ReportMessage(EvoMessageType.Info, "Parametr 2 = " + aParameters(1))
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The above code shows the parameter readout method involving specification of the component index in the aParameters array. Prior the readout attempt it is necessary to check if the correct number of parameters was transmitted into the script.


2.4. Readout of Current Process Variable Values

Readout of current process variable values can be carried out using two methods. The first one is the use of the GetVariableValue or ReadVariables command of the IApplication interface. The second command is based on readout using the IVariable interface objects. The IVariable object for a selected variable can be created using the GetVariable function of the IApplication interface.

The GetVariableValue method should be used for very simple scripts only in which a variable value is read out once. In other cases the command involving the IVariable object should be used, as it is much more efficient.

The ReadVariables methid is similar to GetVariableValue. It allows you to read multiple variables simultaneously and is generally more efficient than multiple call of SetVariableValue.

The example shows the simplest case in which the current variable value is stored in the messages log once.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class CurrValues : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
VariableState v = aApplication.GetVariableValue(aParameters[0], false);
if (v == null)

aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Zmienna {0} nie jest zdefiniowana", aParameters[0])); else
{
if (v.IsGood)
{
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Wartość zmiennej {0}, Stempel czasu: {1}",
v.Value, v.TimeStamp));
}
else
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Niepoprawny status wartości {0} ", v.Status));
}

return true;
}

public void FinalizeScript()
{
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class CurrValuesVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim v As VariableState
v = aApplication.GetVariableValue(aParameters(0), False)
If v Is Nothing Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Zmienna {0} nie jest zdefiniowana", aParameters(0)))
Else
If (v.IsGood) Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Wartość zmiennej {0}, Stempel czasu: {1}", _
v.Value, v.TimeStamp))
Else
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Niepoprawny status wartości {0} ", v.Status))
End If
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The first variant of the script uses the GetVariableValue function which is recommended in this case. After obtaining a correct VariableState object for the variable of the name transmitted in the call parameters, the variable value is stored in the log. The current value, status and time stamp are accessed via the properties of the VariableState object. Please take note how the variable correctness is verified via calling the IsGood command.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class CurrValues : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
IVariable v = aApplication.GetVariable(aParameters[0], false);
if (v == null)

aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Zmienna {0} nie jest zdefiniowana", aParameters[0])); else
{
if (v.VariableState.IsGood)
{
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Wartość zmiennej {0}, Stempel czasu: {1}",
v.VariableState.Value, v.VariableState.TimeStamp));
}
else
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Niepoprawny status wartości {0} ", v.VariableState.Status));

v.Dispose();
}

return true;
}

public void FinalizeScript()
{
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class CurrValuesVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim v As IVariable
v = aApplication.GetVariable(aParameters(0), False)
If v Is Nothing Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Zmienna {0} nie jest zdefiniowana", aParameters(0)))
Else
If (v.VariableState.IsGood) Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Wartość zmiennej {0}, Stempel czasu: {1}", _
v.VariableState.Value, v.VariableState.TimeStamp))
Else
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Niepoprawny status wartości {0} ", v.VariableState.Status))
End If
v.Dispose()
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

In the second variant, for comparison purposes, an object of the IVariable class is used. After obtaining the correct IVariable object for the variable of the name transmitted in the call parameters, the variable value is stored in the log. The current value, status and timestamp are accessed via the VariableState property of the variable object. Please take a note how the variable correctness is verified via calling the IsGood method. After the information has been stored to the log, the object variable is released by calling the Dispose command.

The variable value obtained in the example is the result of the last scheduled refreshing

of variable. When variables are rarely refreshed, this variable can be outdated.

If a script requires running with the most current value, set the second parameter of the GetVariableValue function to true or use the Read function of the IVariable interface.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class CurrValuesRead : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
IVariable v = aApplication.GetVariable(aParameters[0], false);
if (v == null)
{
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Zmienna {0} nie jest zdefiniowana", aParameters[0]));
}
else
{
VariableState vValue = v.Read();
if (vValue.IsGood)
{
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Wartość zmiennej {0}, Stempel czasu: {1}",
vValue.Value, vValue.TimeStamp));
}
else
aApplication.ReportMessage(EvoMessageType.Error,
string.Format("Niepoprawny status wartości {0} ", vValue.Status));

v.Dispose();
}
return true;
}

public void FinalizeScript()
{
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class CurrValuesReadVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim v As IVariable
v = aApplication.GetVariable(aParameters(0), False)
If v Is Nothing Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Zmienna {0} nie jest zdefiniowana", aParameters(0)))
Else
Dim vValue As VariableState
vValue = v.Read()
If (vValue.IsGood) Then
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Wartość zmiennej {0}, Stempel czasu: {1}", _
vValue.Value, vValue.TimeStamp))
Else
aApplication.ReportMessage(EvoMessageType.Error, _
String.Format("Niepoprawny status wartości {0} ", vValue.Status))
End If
v.Dispose()
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

However, it should be noted that an excessive use of the read function can heavily overload a communication link and deteriorate the performance of the entire Application.


2.4.1. Cyclical Readout of Current Process Variable Values

The necessity for the cyclical readout and processing the process variable value is a typical case. In such cases, the periodical call mechanism of the selected function may be used.

The following example script saves the current values of two variables to a text file. Saving is performed every 15 minutes.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;
using System.IO;

public class CurrValuesReport : IScript
{
IApplication application;
IVariable v1, v2;

public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;
v1 = aApplication.GetVariable(aParameters[0], true);
v2 = aApplication.GetVariable(aParameters[1], true);
aApplication.RegisterTimeEvent(Report15Min, TimeSpan.FromMinutes(15),

TimeSpan.FromMinutes(0));
return false;
}

public void FinalizeScript()
{

}

void Report15Min()
{
StreamWriter writer = new StreamWriter(
Path.Combine(application.ApplicationWorkingDirectory, "logs\\reports.txt"), true,
System.Text.ASCIIEncoding.GetEncoding(1250));
String msg = String.Format("{0},{1},{2}",
DateTime.Now, v1.VariableState.IsGood ? v1.VariableState.Value : "?",
v2.VariableState.IsGood ? v2.VariableState.Value : "?");
writer.WriteLine(msg);
writer.Close();
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting
Imports System.IO

Public Class CurrentValuesReportVB
Implements IScript

Dim application As IApplication
Dim v1, v2 As IVariable
Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication
v1 = aApplication.GetVariable(aParameters(0), True)
v2 = aApplication.GetVariable(aParameters(1), True)
application.RegisterTimeEvent(Report15Min, TimeSpan.FromMinutes(15), _

TimeSpan.FromMinutes(0))
Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Sub Report15Min()

Dim writer As StreamWriter
writer = New StreamWriter( _
Path.Combine(application.ApplicationWorkingDirectory, "logs\\reports.txt"), True, _
System.Text.ASCIIEncoding.GetEncoding(1250))
Dim msg, v1v, v2v As String
If v1.VariableState.IsGood Then v1v = v1.VariableState.Value Else v1v = "?"
If v2.VariableState.IsGood Then v2v = v2.VariableState.Value Else v2v = "?"
msg = String.Format("{0},{1},{2}", DateTime.Now, v1v, v2v)
writer.WriteLine(msg)
writer.Close()

End Sub

End Class

Within the Initialize function two IVariable objects which will be used to readout the variable values are created. It is important to set the second parameter of the GetVariable function to True. This enables the process variable refreshing - if the refreshing is not performed, the variable value, when loaded within the periodic function, is outdated.

The RegisterTimeEvent function registers the Report15Min periodic function. The function will be performed every 15 minutes, at 0, 15, 30 and 45 minute.

The Initialize function returns the False value, which causes the script to continue running.

Within the Report15Min function, data recording to a file is executed - the variable values are loaded in the standard way, via the VariableState property.


2.4.2. Current Value Readout Controlled by the Variable

Home > Scripts > 2. Examples of Typical Scripts > 2.4. Readout of Current Process Variable Values > 2.4.2. Current Value Readout Controlled by the Variable Refreshing

2.4.2. Current Value Readout Controlled by the Variable Refreshing

The other method of variable value cyclic processing is to use the RegisterStateEvent function that register a callback function called immediately whenever the variable is refreshed. This allows for immediate response to a change of the variable status. The callback function method is used in scenarios such as automatic calculation of the derivative value or detection of alarm situations.

The example of the script that uses RegisterStateEvent function is shown in the section concerning setting the variable values (see 2.5. Setting Process Variable Values).


2.5. Setting Process Variable Values

Similar to readout of process variable values, setting process variable values can be carried out using two commands. In simple cases when a variable value is saved once, the SetVariableValue, SetVariableBits or ToggleBits commands of the IApplication interface should be used. It is more versatile to use the IVariable interface objects. The variable value can be changed using the SetVariableValue, SetVariableBits and ToggleBits commands of the interface. The SetVariableBits command allows changing the individual bits of the variable value, and the ToggleBits command to change the value of selected bits into opposite values.

The IApplication interface also features the SetVariables command, which allows to set the values of many variables with the use of a single call – using this command is usually faster that repeated execution of the SetVariableValue command.


2.5.1. Calculation of Variable Derivative Values

The below script shows the method of calculating the third variable value based on the values of two standard variables. The script also shows the application of the refreshing callback function used to monitor the input variable values.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class VarCalc : IScript
{
IApplication application;
IVariable vIn1, vIn2, vOut;

public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;
vIn1 = aApplication.GetVariable(aParameters[0], true);
vIn2 = aApplication.GetVariable(aParameters[1], true);
vOut = aApplication.GetVariable(aParameters[2], false);
vIn1.RegisterStateEvent(RefreshedEvent);
vIn2.RegisterStateEvent(RefreshedEvent);
return false;
}

public void FinalizeScript()
{

}

void RefreshedEvent(string aVariableName, VariableState aVariableState)
{
try
{
if (vIn1.VariableState.IsGood && vIn2.VariableState.IsGood)
{
vOut.SetVariableValue(Recalculate(Convert.ToDouble(vIn1.VariableState.Value),
Convert.ToDouble(vIn2.VariableState.Value)));
}
}
catch (Exception e)
{
application.ReportMessage(EvoMessageType.Error, e.Message);

}
}

double Recalculate(double v1, double v2)
{
return v1 + v2;
}

}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class VarCalcVB
Implements IScript

Dim application As IApplication
Dim vIn1, vIn2, vOut As IVariable

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication
vIn1 = aApplication.GetVariable(aParameters(0), True)
vIn2 = aApplication.GetVariable(aParameters(1), True)
vOut = aApplication.GetVariable(aParameters(2), False)
vIn1.RegisterStateEvent(AddressOf RefreshedEvent)
vIn2.RegisterStateEvent(AddressOf RefreshedEvent)
Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript
End Sub

Sub RefreshedEvent(ByVal aVariableName As String, ByVal aVariableState As VariableState)

Try
If (vIn1.VariableState.IsGood And vIn2.VariableState.IsGood) Then

vOut.SetVariableValue(

Recalculate(Convert.ToDouble(vIn1.VariableState.Value), _
Convert.ToDouble(vIn2.VariableState.Value)))

End If
Catch e As Exception
application.ReportMessage(EvoMessageType.Error, e.Message)
End Try

End Sub

Function Recalculate(ByVal v1 As Double, ByVal v2 As Double) As Double

Recalculate = v1 + v2

End Function

End Class

Within the Initialize function two IVariable objects which will be used to readout the variable values and one Ivariable object of calculated variable are created. It is important to set the second parameter of the GetVariable function to True for both input variables. Then, using the registerStateEvent method the RefresehedEvent callback function is declared for the input variables. It will be called whenever values of any of the input variables are changed.

The Initialize function returns the False value, which causes the script to continue running.

Within the RefreshedEvent function a new calculated value is calculated, and then the calculated variable is set using the SetVariableValue function. The parameters of the aVariableName and aVariableState callback functions can be used to determine which variable has been changed and to which value, but in the script from the example it was not needed.

Please take a note of the method of protecting the code using the try structure. The code is resistant to lack of, or incorrect input variable values.


2.5.2. Obtaining Values from External Sources

The below script sends periodically a ping to a device specified with an address or name. On the basis of the result, it sets the value of the selected variable to true or false. The calculated variable should be located in the None type channel.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;
using System.Net.NetworkInformation;

public class Ping : IScript
{
IEventInfo mTimeTickInfo;
System.Net.NetworkInformation.Ping mPing;
IVariable mPingVar;
string mHost;

public bool Initialize(string[] aParameters, IApplication aApplication)
{
mHost = aParameters[0];

mPing = new System.Net.NetworkInformation.Ping();
mPingVar = aApplication.GetVariable(aParameters[1], false);

if (mPingVar != null && mPing != null)
{
mTimeTickInfo = aApplication.RegisterTimeEvent(PingCheck, TimeSpan.FromSeconds(5),

TimeSpan.MinValue);
return false;
}
else
return true;
}

public void FinalizeScript()
{
}

void PingCheck()
{
System.Net.NetworkInformation.PingReply reply = mPing.Send(mHost, 500);
mPingVar.SetVariableValue(reply.Status==System.Net.NetworkInformation.IPStatus.Success);
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class PingVB
Implements IScript

Dim mTimeTickInfo As IEventInfo
Dim mPing As System.Net.NetworkInformation.Ping
Dim mPingVar As IVariable
Dim mHost As String

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

mHost = aParameters(0)

mPing = New System.Net.NetworkInformation.Ping()
mPingVar = aApplication.GetVariable(aParameters(1), False)

If (mPingVar Is Nothing Or mPing Is Nothing) Then
Return True
Else
mTimeTickInfo = aApplication.RegisterTimeEvent(AddressOf PingCheck, _

TimeSpan.FromSeconds(5), TimeSpan.MinValue)
Return False
End If

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript
End Sub

Sub PingCheck()

Dim reply As System.Net.NetworkInformation.PingReply

reply = mPing.Send(mHost, 500)
mPingVar.SetVariableValue(reply.Status=System.Net.NetworkInformation.IPStatus.Success)

End Sub

End Class

The PingCheck function is executed every 5 seconds. The process variable value is set based on the Send function result for the System.Net.NetworkInformation.Ping class object.


2.6. Readout of Archive Values of Process Variables

Along with access to the current values of process variables, the script system also allows for reading out historical values of variables. Generating reports and production indicator calculation based on archived data are the typical applications of this function.

Readout of historical data can be carried out using two mechanisms. It is more versatile to use the IVariable interface. This command allows for more precise control over the readout process. In simple cases, the GetVariableArcData command of the IApplication interface can be used.

The following example shows the command of creating a simple report in the HTML format using the IVariable interface. An example of the use of the GetVariableArcData command can be found in the description of the command. The way in which data read is handled is identical for both mechanisms.

C#

using System;
using System.IO;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class RaportHtml : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
IVariable v = aApplication.GetVariable(aParameters[0], false);
if(v == null)
{
aApplication.ReportMessage( EvoMessageType.Error,

" Report generation error: Variable missing " + aParameters[0]);
return true;
}

DateTime day = DateTime.Today;
DateTime day0 = day.AddDays(-1);
ArcQuery q = new ArcQuery(day0, day, "average", TimeSpan.FromHours(1));

IArcQueryResult res = v.OrderArcData(q);

int loopCnt = 0;
while(res.ResultStatus == ArcResultStatus.Processing)
{
if(loopCnt > 200)
{
aApplication.ReportMessage(EvoMessageType.Error, "Report generation error! Response timed out.");
v.Dispose();
return true;
}

aApplication.Sleep(TimeSpan.FromMilliseconds(100));
loopCnt++;
}

if(res.ResultStatus == ArcResultStatus.Ready)
{
StreamWriter sw = null;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
try
{
sb.AppendLine(

"<html><head><title>Raport -

Hourly averages of the previous day </title></head><body>"); sb.AppendLine("<table width=\"25%\" align=\"center\" border=\"1\" >");
sb.AppendLine("<tr><th>Godzina</th><th>Srednia</th></tr>");

if(res.Values != null)
{
foreach(ArcVariableState p in res.Values)
{

sb.AppendLine(

"<tr><td>" + p.TimeStamp.ToString() + "</td><td>" + p.Value + "</td></tr>"); }
}
sb.AppendLine("</table>");
sb.AppendLine("</body></html>");

string file = Path.Combine(aApplication.ApplicationWorkingDirectory,

"reports\\report.html");

sw = new StreamWriter(file);
sw.Write(sb.ToString());
System.Diagnostics.Process.Start(file);
}
catch(Exception ex)
{
aApplication.ReportMessage(EvoMessageType.Error,

"File saving error: " + ex.Message);
}
finally
{
if(sw != null)
{
sw.Close();
sw.Dispose();
}
}
}
else if(res.ResultStatus == ArcResultStatus.Error)
aApplication.ReportMessage(EvoMessageType.Error,

"Report generation error! " + res.ErrorDescription);

v.Dispose();
return true;
}

public void FinalizeScript()
{
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class RaportHtmlVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim v As IVariable
v = aApplication.GetVariable(aParameters(0), False)
If (v Is Nothing) Then
aApplication.ReportMessage(EvoMessageType.Error, _

"Report generation error: Variable missing" & aParameters(0))
Return True
End If

Dim day, day0 As DateTime
day = DateTime.Today
day0 = day.AddDays(-1)
Dim q As ArcQuery
q = New ArcQuery(day0, day, "average", TimeSpan.FromHours(1))

Dim res As IArcQueryResult
res = v.OrderArcData(q)

Dim loopCnt As Integer
loopCnt = 0
While (res.ResultStatus = ArcResultStatus.Processing)

If (loopCnt > 200) Then
aApplication.ReportMessage(EvoMessageType.Error, _
"Report generation error! Response timed out.")
v.Dispose()
Return True
End If

aApplication.Sleep(TimeSpan.FromMilliseconds(100))
loopCnt += 1

End While

If (res.ResultStatus = ArcResultStatus.Ready) Then

Dim sw As System.IO.StreamWriter
sw = Nothing
Dim sb As System.Text.StringBuilder
sb = New System.Text.StringBuilder()
Try
sb.AppendLine( _

"<html><head><title>Raport - Hourly averages of the previous day </title></head><body>")
sb.AppendLine("<table width=""25%"" align=""center"" border=""1"" >")
sb.AppendLine("<tr><th>Godzina</th><th>Srednia</th></tr>")

If (Not res.Values Is Nothing) Then

For Each p As ArcVariableState In res.Values
sb.AppendLine( _ "<tr><td>" & p.TimeStamp.ToString() & "</td><td>" & p.Value & "</td></tr>")
Next p
sb.AppendLine("</table>")
sb.AppendLine("</body></html>")

Dim file As String
file = System.IO.Path.Combine( _

aApplication.ApplicationWorkingDirectory, "reports\\report.html")
sw = New System.IO.StreamWriter(file)
sw.Write(sb.ToString())
System.Diagnostics.Process.Start(file)

End If

Catch ex As Exception
aApplication.ReportMessage(EvoMessageType.Error, _

"File saving error: " & ex.Message)
Finally
If (Not sw Is Nothing) Then
sw.Close()
sw.Dispose()
End If
End Try
ElseIf (res.ResultStatus = ArcResultStatus.Error) Then
aApplication.ReportMessage(EvoMessageType.Error, _

"Report generation error! " & res.ErrorDescription)
End If

v.Dispose()
Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

Readout of the archived values is initialized by calling the OrderArcData function of the IVariable interface. The call parameter is an object of the ArcQuery class that specifies what data and from which period are to be loaded. In the example, the data are loaded from the last day, and the returned values are the 1-hourly averages.

Waiting for the operation completion after initiating the readout involves testing the status of the ResultStatus operation execution (the alternative method for the waiting is declaration of a callback function called upon readout termination). After identification of the operation successful termination, the script generates an output report. The archival values are returned in the Values collection accessed via the execution status object. The collection class consists of the ArcVariableState objects - each object determines the value, status and timestamp of a single archival value.

When the report is generated, calling the Start method of the Process object opens the report in the default web browser.


2.7. Using Array Variables

The array variables use method differs marginally from the standard variable handling. Only the interpretation method of the Value property of the VariableState object is different.


2.7.1. Array Variables Readout

The following example saves values of all elements of the array variable of a name specified in the starting parameters to the messages log.

C#

using System;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

public class TableGet : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

VariableState v = aApplication.GetVariableValue(aParameters[0], true);

int[] valTable = (int[])(v.Value);

System.Text.StringBuilder sb = new System.Text.StringBuilder();

foreach (int val in valTable)

{

sb.Append(val);

sb.Append(" ");

}

aApplication.ReportMessage(EvoMessageType.Info, sb.ToString());

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Public Class TableGetVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

Dim v As VariableState = aApplication.GetVariableValue(aParameters(0), True)

Dim valTable() As Integer = v.Value

Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()

For Each val As Integer In valTable

sb.Append(val)

sb.Append(" ")

Next val

aApplication.ReportMessage(EvoMessageType.Info, sb.ToString())

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The key element of the script is to substitute for the ValTable local variable the Value property of the process variable state object associated with a relevant value type declaration. It is important to maintain compliance of the valTable variable type with a type of the process variable resulting from its definition and acquisition method.

In addition to the shown example of the iteration applying to all elements of the array, a direct readout of any element using an index notation, e.g. valTable [5] (C #) or valTable(5) (VB) is also possible.


2.7.2. Saving Array Variables

The following example shows the method of using the array variables to store a lot of information in a single variable. The script reads the text file contents including messages that will be displayed on a diagram. The first five lines of the file are read. The texts read are saved to subsequent components of process variable.

It is assumed that the used variable is located in the channel of NONE type and its Value Type attribute is Table.

C#

using System;

using System.IO;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

public class Messages : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

try

{

StreamReader file = new StreamReader(aParameters[0],System.Text.Encoding.Default);

string[] msgs = new string[5];

msgs[0] = file.ReadLine();

msgs[1] = file.ReadLine();

msgs[2] = file.ReadLine();

msgs[3] = file.ReadLine();

msgs[4] = file.ReadLine();

aApplication.SetVariableValue(aParameters[1], msgs);

file.Close();

}

catch (Exception e)

{

aApplication.ReportMessage(EvoMessageType.Info,"Error in Messages: " + e.Message);

}

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.IO

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Public Class MessagesVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

Try

Dim file As StreamReader = _

New StreamReader(aParameters(0), System.Text.Encoding.Default)

Dim msgs(4) As String

msgs(0) = file.ReadLine()

msgs(1) = file.ReadLine()

msgs(2) = file.ReadLine()

msgs(3) = file.ReadLine()

msgs(4) = file.ReadLine()

aApplication.SetVariableValue(aParameters(1),msgs)

file.Close()

Catch e As Exception

aApplication.ReportMessage(EvoMessageType.Info,"Error in Messages: " + e.Message)

End Try

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

A local five-component array variable is created in a script. Then, based on the text file contents, its subsequent components are set. The standard call to the SetVariableValue method of the IApplication interface terminates the script running.

In the diagram objects, it is possible to call to the array variable component using the TableElement function e.g. TableElement(Variable (zmienna),2).


2.8. Transferring Pattern Trends

The applications using a pattern trends are typically responsible for transferring the trend definition to the controller. It can be done with sequence of operations sending subsequent points via a single variable, but generally, it is preferable to send the entire definition in a single transmission using an array variable.

The GetTrendPatternPoints method of the IApplication interface is used to readout the pattern trends.

C#

using System;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

public class Curve : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

IVariable v = aApplication.GetVariable(aParameters[1], false);

int varSize = Convert.ToInt32(v.VariableAttribute("ElementsCount"));

int[] transferBuffer = new int[varSize];

int pointsCount = 0;

foreach (TrendPatternPoint point in

aApplication.GetTrendPatternPoints(aParameters[0]))

{

if (pointsCount <= varSize - 2)

{

transferBuffer[pointsCount] = (int)point.TimeStamp.TotalSeconds;

transferBuffer[pointsCount + 1] = (int)point.Value;

pointsCount += 2;

}

else

{

if (pointsCount <= varSize)

transferBuffer[pointsCount] = 0;

break;

}

}

v.SetVariableValue(transferBuffer);

v.Dispose();

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Public Class CurveVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

Dim v As IVariable = aApplication.GetVariable(aParameters(1), False)

Dim varSize As Integer = Convert.ToInt32(v.VariableAttribute("ElementsCount"))

Dim pointsCount As Integer = 0

Dim transferBuffer() As Integer = New Integer(varSize) {}

For Each point As TrendPatternPoint In _

aApplication.GetTrendPatternPoints(aParameters(0))

If pointsCount <= varSize - 2 Then

transferBuffer(pointsCount) = CInt(point.TimeStamp.TotalSeconds)

transferBuffer(pointsCount + 1) = CInt(point.Value)

pointsCount += 2

Else

If (pointsCount <= varSize) Then transferBuffer(pointsCount) = 0

Exit For

End If

Next point

v.SetVariableValue(transferBuffer)

v.Dispose()

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

To define the size of the buffer available, the first operation performed within the script is the readout of the ElementsCount attribute of the target variable. It is assumed that the variable components are 32-bit integers. In addition, the transferBuffer array is created which size is compatible with the size of the process variable.

Next, the subsequent points of the trend pattern (loaded via the GetTrendPatternPoints method) are recorded in pairs (a time shift and point value) into the subsequent elements of the transferBuffer array. If the trend does not fill the entire array, a single zero value indicating the trend end is added.

The standard call to the SetVariableValue method terminates the script running.


2.9. Controlling the Alarm Status

Services of the object script model allow the application alarm system operation to be fully controlled. This applies both to monitoring alarm status and application detection of alarm events.


2.9.1. Readout of Active Alarm Status

The group of the IApplication interface methods provides access to the current state of the alarm system. The basic functions include: GetActiveAlarms returning the collection of the alarm IDs currently stored in the active alarm log; GetDefinedAlarms which allows accessing all the defined alarms; and GetAlarm returning a reference to the IAlarm interface. The properties and methods of this interface allow reading all data concerning a specific alarm - its definition and current status.

The presented example shows the method of creating a simple report in which, at the time of script execution, the basic information on all active alarms are recorded.

The script requires determining two parameters: the name of a domain and output file.

C#

using System;

using System.IO;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

public class AlarmReport : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

try

{

StreamWriter sw = new StreamWriter

                                      (aParameters[1], false, System.Text.Encoding.UTF8);

foreach (string aid in aApplication.GetActiveAlarms(aParameters[0]))

{

IAlarm alarm = aApplication.GetAlarm(aid);

if (alarm.AlarmState.IsActive && !alarm.AlarmState.IsFinished)

{

String desc = String.Format

("{0:dd-MM-yyyy hh:mm:ss.fff} {1,10} {2,-40} {3}",

alarm.AlarmState.BeginTimeStamp, alarm.Id,

alarm.AlarmState.FormattedBeginText, alarm.AlarmState.BeginExprValue);

sw.WriteLine(desc);

}

}

sw.Close();

}

catch (Exception)

{

}

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.IO

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Public Class AlarmReportVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

Try

Dim sw As StreamWriter = New StreamWriter _

(aParameters(1), False, System.Text.Encoding.UTF8)

For Each aid As String In aApplication.GetActiveAlarms(aParameters(0))

Dim alarm As IAlarm = aApplication.GetAlarm(aid)

If alarm.AlarmState.IsActive And Not alarm.AlarmState.IsFinished Then

Dim desc As String = String.Format _

("{0:dd-MM-yyyy hh:mm:ss.fff} {1,10} {2,-40} {3}", _

alarm.AlarmState.BeginTimeStamp, alarm.Id, _

alarm.AlarmState.FormattedBeginText, alarm.AlarmState.BeginExprValue)

sw.WriteLine(desc)

End If

Next aid

sw.Close()

Catch a As Exception

End Try

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The GetActiveAlarms function returns the collection of IDs of all alarms belonging to the selected domain, present in the active alarm log at a given moment. Next, for each of these alarms, using GetAlarm function, the reference to the IAlarm object is loaded. Via this reference, all alarm data are loaded. Within the if statement it is checked whether the alarm is active. The AlarmState.IsActive test checks whether the alarm is present in the active alarm log. The second part of the test uses the AlarmState.IsFinished property to determine whether the alarm is terminated - in the active alarm log, the data about a recently terminated alarm can be stored over a certain period of time. After recognition that the alarm is definitely active, the selected information about the alarm is saved to a file.


2.9.2. Active Monitoring of Alarm Status

In addition to the periodic readout of the alarm state shown in the previous example, an active monitoring is also possible. In this variant, it is possible to react immediately to the alarm occurrence or to another change of its status. The state alarm monitoring function can be declared using the RegisterStateEvent method of the IAlarm interface. The example code can be found in the RegisterStateEvent method description. See: 3.4.2.3. RegisterStateEvent ). It is also possible to monitor the state of the domain-wide alarms. To do this, use the method RegisterAlarmDomainEvents of the IApplication interface.


2.9.3. Alarm Notification

The scripts can perform the full functionality of the alarm detection strategy. The example given in this section, performs such a strategy. Its operation is based on the cyclical readout of the text file in which the alarm text IDs separated by a semicolon are saved (via the external application controlling the state of the system). The presence of an ID in the file indicates that the alarm is active. The script is responsible for transferring information from the file to the application alarm system. The initial step is to define the "External" type alarm strategy and the alarm definition associated with this strategy. In the definition of each alarm, in the "Detection parameters" attribute, the ID which corresponds in the text file to this alarm should be specified.

The example script requires at its start the following three parameters to be specified: the text file name, the alarm domain name and the strategy name in the context of which the script will run. The script start should be set in the application schedule, using the Script action. The action should be run in the "once at the application initialization" mode.

C#

using System;

using System.IO;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

using System.Collections.Generic;

public class AlarmStrat : IScript

{

IApplication application;

string alarmStateFile;

string domain;

string strategy;

List<IAlarm> myAlarms = new List<IAlarm>();

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

alarmStateFile = aParameters[0];

domain = aParameters[1];

strategy = aParameters[2];

foreach (string name in application.GetDefinedAlarms(domain))

{

IAlarm ia = application.GetAlarm(domain, name);

if (ia.Definition.Strategy == strategy)

myAlarms.Add(ia);

}

aApplication.RegisterTimeEvent(StrategyFun, TimeSpan.FromSeconds(10),

TimeSpan.FromSeconds(0));

return false;

}

public void FinalizeScript()

{

}

char[] separator = { ';' };

void StrategyFun()

{

if (application.GetAlarmDomainStationMode(domain)!=AlarmStationMode.ActiveController)

return;

try

{

StreamReader file = new StreamReader(alarmStateFile,System.Text.Encoding.Default);

List<string> content = new List<string>(file.ReadToEnd().Split(separator));

foreach (IAlarm alarm in myAlarms)

{

bool isOn = content.IndexOf(alarm.Definition.DetectionParameters) != -1;

if (isOn)

{

if (!alarm.AlarmState.IsActive || alarm.AlarmState.IsFinished)

{

alarm.Raise();

}

}

else

{

if (alarm.AlarmState.IsActive && !alarm.AlarmState.IsFinished)

{

alarm.Cancel();

}

}

}

file.Close();

}

catch (Exception e)

{

application.ReportMessage(EvoMessageType.Info, "Error in AlarmStrat: "+e.Message);

}

}

}

VB

Imports System

Imports System.IO

Imports System.Windows.Forms

Imports System.Collections.Generic

Imports Askom.AsixEvo.Scripting

Public Class AlarmStratVb

Implements IScript

Dim application As IApplication

Dim alarmStateFile As String

Dim domain As String

Dim strategy As String

Dim myAlarms As List(Of IAlarm) = New List(Of IAlarm)

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

application = aApplication

alarmStateFile = aParameters(0)

domain = aParameters(1)

strategy = aParameters(2)

Dim ia As IAlarm

For Each name As String In application.GetDefinedAlarms(domain)

ia = application.GetAlarm(domain, name)

If (ia.Definition.Strategy = strategy) Then

myAlarms.Add(ia)

End If

Next name

aApplication.RegisterTimeEvent(AddressOf StrategyFun, TimeSpan.FromSeconds(10),_

TimeSpan.FromSeconds(0))

Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Dim separator() As Char = {";"}

Public Sub StrategyFun()

If application.GetAlarmDomainStationMode(domain) <> _

AlarmStationMode.ActiveController Then

Return

End If

Try

Dim file As StreamReader = New StreamReader(alarmStateFile, _

System.Text.Encoding.Default)

Dim content As List(Of String) = New List(Of String) _

(file.ReadToEnd().Split(separator))

For Each alarm As IAlarm In myAlarms

Dim isOn As Boolean = _

Not content.IndexOf(alarm.Definition.DetectionParameters) = -1

If isOn Then

If (Not alarm.AlarmState.IsActive) Or alarm.AlarmState.IsFinished Then

alarm.Raise()

End If

Else

If alarm.AlarmState.IsActive And (Not alarm.AlarmState.IsFinished) Then

alarm.Cancel()

End If

End If

Next alarm

file.Close()

Catch e As Exception

application.ReportMessage(EvoMessageType.Info, "Error in AlarmStrat: "+e.Message)

End Try

End Sub

End Class

Within the Initialize function, the list of all alarms belonging to the domain and alarm strategy indicated by the parameters, is created. The GetDefinedAlarms function returns all alarms belonging to the domain. Then, for each domain alarm, the reference to the IAlarm interface is loaded and via this interface it is checked whether the alarm belongs to the right strategy. When the configuration data are read out, the StrategyFun function is registered - this function will be executed every 10 seconds.

At the start, the StrategyFun function checks the domain operation mode. Alarms are detected only when the workstation is the domain active controller. Next, the text file is read out and the list of identifiers is parsed. For each alarm of the strategy, the current status is determined on the basis of data read out from the file. The same applies to the alarm status in the application. If incompatibility is detected, the alarm is reported with the Raise method or cancelled with the Cancel method. Both methods potentially allow reporting additional data related to an event. These data would be stored in the alarm log. It is also possible to specify explicitly the time of event - in the example script, the event time is identical to the time of execution of the Raise or Cancel functions.

The current alarm status detection is performed according to the description in the example concerning the alarm status readout.


2.10 Using the Context of Script Starting

One of the script starting method it to use the Script action associated with handling the visualization object event on a diagram. In such case, it is possible to check the starting context - this allows writing a script that adapts to its call context.

The starting context describes an object of the IContext interface that can be obtained by the readout of the ExecutionContext property of IApplication interface. The most useful property of the IContext object is MainVar property returning the main variable name of the object for which the script has been started.

C#

using System;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

public class Context : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

string mainVar = aApplication.ExecutionContext.MainVariable;

if (!string.IsNullOrEmpty(mainVar))

{

IVariable v = aApplication.GetVariable(mainVar, false);

if (v != null)

{

try

{

if (v.VariableState.IsGood)

{

v.SetVariableValue((UInt32)v.VariableState.Value + 1);

}

}

catch (Exception e)

{

aApplication.ReportMessage(EvoMessageType.Error, e.Message);

}

finally

{

v.Dispose();

}

}

}

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Public Class ContextVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim mainVar As String

mainVar = aApplication.ExecutionContext.MainVariable

If Not String.IsNullOrEmpty(mainVar) Then

Dim v As IVariable

v = aApplication.GetVariable(mainVar, False)

If Not v Is Nothing Then

Try

If (v.VariableState.IsGood) Then

v.SetVariableValue(v.VariableState.Value + 1)

End If

Catch e As Exception

aApplication.ReportMessage(EvoMessageType.Error, e.Message)

Finally

v.Dispose()

End Try

End If

End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

In the above example, the main variable name is loaded from the script starting context. Then, provided that the readout of the current value is successful, the variable value is incremented.

The alternative method of context script starting within the object event handling is a dynamic structure of the operator action contents and transferring context data in the script parameters.

Example:

^Script(Context,LocalProperty(ControlVar))

The above action starts the Context script with transferring, in the form of parameter, the controlled variable name of the object, in the context of which the action is executed.


2.11 Multilingual Scripts

If the scripts runs within the multilanguage application, using a texts compatible with the current application language becomes very important. In this type of scripts it is possible to use two mechanisms. It is possible to use a multilanguage pool of the application texts or to calculate the text correct form in the script code.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class LangMessage : IScript
{
IApplication application;
public bool Initialize(string[] aParameters, IApplication aApplication)
{
application = aApplication;
aApplication.ReportMessage(EvoMessageType.Info,

aApplication.ApplicationText("ScriptStartInfo"));
aApplication.ReportMessage(EvoMessageType.Info, StartMsg());
return true;
}

public void FinalizeScript()
{
}

string StartMsg()
{
switch (application.CurrentApplicationLanguage)
{
case "pl":
return "Skrypt uruchomiony";

case "en":
default:
return "Script started";
}
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class LangMessageVB
Implements IScript

Dim application As IApplication
Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication
aApplication.ReportMessage(EvoMessageType.Info, _

aApplication.ApplicationText("ScriptStartInfo"))
aApplication.ReportMessage(EvoMessageType.Info, StartMsg())
Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript
End Sub

Function StartMsg() As String

Select Case application.CurrentApplicationLanguage

Case "pl"
Return "Skrypt uruchomiony"

Case "en"
Return "Script started"
Case Else
Return "Script started"

End Select

End Function

End Class

In the above code, in the first call of the ReportMessage method, a message contents is loaded from the Application text pool using the ApplicationText method. The "ScriptStartInfo" is the text identifier used in the Application text pool. The ApplicationText method returns the text version compatible with the current operation language.

In the second ReportMessage call, the message contents is determined by the StartMsg function. This function calculates the appropriate language version based on the current values of the ​​CurrentApplicationLanguage property of the IApplication interface.


2.12. Creating Window Interface

The Asix.Evo system scripts also allow creating custom windows for the interaction with the application user. Asix.Evo does not provide any specific mechanisms for creating the windows, however, the application designer can use all the means provided by the .NET programming platform.


2.12.1. Message Displaying

The simplest type of windows are message windows, alternatively extended with the possibility of asking the user to make simple Yes/No type decisions. The easiest way to achieve such functionality is to use the Show method of the System.Windows.Forms.MessageBox class.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class Message : IScript
{
public bool Initialize(string[] aParameters, IApplication aApplication)
{
if (aApplication.HasRole("SuperUser"))
{
DialogResult result = MessageBox.Show("Do you want to start the line? ?", "Start",

MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
IVariable v = aApplication.GetVariable("LineState", false);
v.SetVariableBits(1, 1);
v.Dispose();
}
}
else
MessageBox.Show("Your privileges are insufficient !", "Access denied");
return true;
}

public void FinalizeScript()
{

}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class MessageVB
Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

If aApplication.HasRole("SuperUser") Then

Dim result As DialogResult
result = MessageBox.Show("Do you want to start the line ?", "Start", _

MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then

Dim v As IVariable
v = aApplication.GetVariable("LineState", False)
v.SetVariableBits(1, 1)
v.Dispose()

End If

Else
MessageBox.Show("Your privileges are insufficient !", "Access denied")
End If

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

The script checks whether the user is assigned to the SuperUser role. If yes, the message box asking whether the line is to be started is displayed. When the user confirms the operation, the LineState variable least significant bit is set to 1.


2.12.2. Windows Created within Script Contents

It is possible to application a dialogue window within a script contents. It is possible to create windows of any complexity, however, this technique works for not very big windows.

In the following example, the window consisting of two text edit fields and two buttons is created.

C#

using System;
using System.Windows.Forms;
using Askom.AsixEvo.Scripting;

public class FormBuilder : IScript
{
Form entryForm;
TextBox xPos, yPos;

public bool Initialize(string[] aParameters, IApplication aApplication)
{

IVariable varX, varY;

varX = aApplication.GetVariable(aParameters[0], true);
varY = aApplication.GetVariable(aParameters[1], true);

CreateForm();

xPos.Text = varX.VariableState.FormattedValue;
yPos.Text = varY.VariableState.FormattedValue;
DialogResult res = entryForm.ShowDialog();
if (res == DialogResult.OK)
{
Int32 newX, newY;
if (Int32.TryParse(xPos.Text, out newX) && Int32.TryParse(yPos.Text, out newY))
{
varX.SetVariableValue(newX);
varY.SetVariableValue(newY);
}
else
MessageBox.Show("Incorrect values");
}

varX.Dispose();
varX.Dispose();
return true;
}

public void FinalizeScript()
{
}

void CreateForm()
{
Label label1 = new Label();
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(24, 29);
label1.Size = new System.Drawing.Size(54, 13);
label1.Text = "X Position";

xPos = new TextBox();
xPos.Location = new System.Drawing.Point(97, 26);
xPos.Size = new System.Drawing.Size(132, 20);

Label label2 = new Label();
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(24, 68);
label2.Size = new System.Drawing.Size(54, 13);
label2.Text = "Y Position";

yPos = new System.Windows.Forms.TextBox();
yPos.Location = new System.Drawing.Point(97, 65);
yPos.Size = new System.Drawing.Size(132, 20);

Button buttonOk = new Button();
buttonOk.DialogResult = DialogResult.OK;
buttonOk.Location = new System.Drawing.Point(280, 20);
buttonOk.Size = new System.Drawing.Size(142, 30);
buttonOk.Text = "&OK";
buttonOk.UseVisualStyleBackColor = true;

Button buttonCancel = new Button();
buttonCancel.DialogResult = DialogResult.Cancel;
buttonCancel.Location = new System.Drawing.Point(280, 59);
buttonCancel.Size = new System.Drawing.Size(142, 30);
buttonCancel.Text = "&Cancel";
buttonCancel.UseVisualStyleBackColor = true;

entryForm = new Form();
entryForm.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
entryForm.AutoScaleMode = AutoScaleMode.Font;
entryForm.CancelButton = buttonCancel;
entryForm.ClientSize = new System.Drawing.Size(466, 103);
entryForm.Controls.Add(buttonCancel);
entryForm.Controls.Add(buttonOk);
entryForm.Controls.Add(yPos);
entryForm.Controls.Add(label2);
entryForm.Controls.Add(xPos);
entryForm.Controls.Add(label1);
entryForm.FormBorderStyle = FormBorderStyle.FixedSingle;
entryForm.MaximizeBox = false;
entryForm.MinimizeBox = false;
entryForm.StartPosition = FormStartPosition.CenterScreen;
entryForm.Text = "Coordinates";
entryForm.TopMost = true;
}
}

VB

Imports System
Imports System.Windows.Forms
Imports Askom.AsixEvo.Scripting

Public Class FormBuilderVB
Implements IScript

Dim entryForm As Form
Dim xPos, yPos As TextBox

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim varX, varY As IVariable

varX = aApplication.GetVariable(aParameters(0), True)
varY = aApplication.GetVariable(aParameters(1), True)

CreateForm()

xPos.Text = varX.VariableState.FormattedValue
yPos.Text = varY.VariableState.FormattedValue
If (entryForm.ShowDialog() = DialogResult.OK) Then

Dim newX, newY As Int32
If (Int32.TryParse(xPos.Text, newX) And Int32.TryParse(yPos.Text, newY)) Then
varX.SetVariableValue(newX)
varY.SetVariableValue(newY)
Else
MessageBox.Show("Incorrect values")
End If

End If

varX.Dispose()
varX.Dispose()

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

Sub CreateForm()

Dim label1 As Label
label1 = New Label()
label1.AutoSize = True
label1.Location = New System.Drawing.Point(24, 29)
label1.Size = New System.Drawing.Size(54, 13)
label1.Text = "X Position"

xPos = New TextBox()
xPos.Location = New System.Drawing.Point(97, 26)
xPos.Size = New System.Drawing.Size(132, 20)

Dim label2 As Label
label2 = New Label()
label2.AutoSize = True
label2.Location = New System.Drawing.Point(24, 68)
label2.Size = New System.Drawing.Size(54, 13)
label2.Text = "Y Position"

yPos = New System.Windows.Forms.TextBox()
yPos.Location = New System.Drawing.Point(97, 65)
yPos.Size = New System.Drawing.Size(132, 20)

Dim buttonOk As Button
buttonOk = New Button()
buttonOk.DialogResult = DialogResult.OK
buttonOk.Location = New System.Drawing.Point(280, 20)
buttonOk.Size = New System.Drawing.Size(142, 30)
buttonOk.Text = "&OK"
buttonOk.UseVisualStyleBackColor = True

Dim buttonCancel As Button
buttonCancel = New Button()
buttonCancel.DialogResult = DialogResult.Cancel
buttonCancel.Location = New System.Drawing.Point(280, 59)
buttonCancel.Size = New System.Drawing.Size(142, 30)
buttonCancel.Text = "&Cancel"
buttonCancel.UseVisualStyleBackColor = True

entryForm = New Form()
entryForm.AutoScaleDimensions = New System.Drawing.SizeF(6.0F, 13.0F)
entryForm.AutoScaleMode = AutoScaleMode.Font
entryForm.CancelButton = buttonCancel
entryForm.ClientSize = New System.Drawing.Size(466, 103)
entryForm.Controls.Add(buttonCancel)
entryForm.Controls.Add(buttonOk)
entryForm.Controls.Add(yPos)
entryForm.Controls.Add(label2)
entryForm.Controls.Add(xPos)
entryForm.Controls.Add(label1)
entryForm.FormBorderStyle = FormBorderStyle.FixedSingle
entryForm.MaximizeBox = False
entryForm.MinimizeBox = False
entryForm.StartPosition = FormStartPosition.CenterScreen
entryForm.Text = "Coordinates"
entryForm.TopMost = True

End Sub

End Class

The CreateForm function programs the dialogue window object. Before opening the window, the edit fields are set in accordance with the current variable values transmitted within the script call parameters. Then, the window is opened in the dialogue mode via the ShowDialog method of the window object. Returning to the script code is performed after closing the window. If the window was closed with the OK button, an attempt to convert the entered values into integers and sending the new values to the process variables is performed.


2.12.3. Using Built-in Libraries

The alternative of the direct dialogue window programming is to create windows in the external environment such as the VisualStudio, to compile them into DLL files, and then, to use in the Asix.Evo script only the call to the ready code.

In the following example, the library called EvoDialog.dll including the code of the EvoDialog class that inherits from System.Windows.Forms.Form, will be used. The EvoDialog class provides two properties used to set input values and one property in which, after closing the window, a diagram name will be saved.

C#

using System;

using System.Windows.Forms;

using Askom.AsixEvo.Scripting;

using EvoAddOns;

public class Dialog : IScript

{

public bool Initialize(string[] aParameters, IApplication aApplication)

{

IVariable varX, varY;

varX = aApplication.GetVariable(aParameters[0], true);

varY = aApplication.GetVariable(aParameters[1], true);

EvoDialog dialog = new EvoDialog();

dialog.XPos = varX.VariableState.FormattedValue;

dialog.YPos = varY.VariableState.FormattedValue;

if (dialog.ShowDialog() == DialogResult.OK)

{

if (!String.IsNullOrEmpty(dialog.Diagram))

aApplication.ExecuteAction(EvoMessageType.Info,

"OpenWindow(Main,P1," + dialog.Diagram + ",null)");

}

varX.Dispose();

varY.Dispose();

return true;

}

public void FinalizeScript()

{

}

}

VB

Imports System

Imports System.Windows.Forms

Imports Askom.AsixEvo.Scripting

Imports EvoAddOns

Public Class DialogVB

Implements IScript

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim varX, varY As IVariable

varX = aApplication.GetVariable(aParameters(0), True)

varY = aApplication.GetVariable(aParameters(1), True)

Dim dialog As EvoDialog

dialog = New EvoDialog()

dialog.XPos = varX.VariableState.FormattedValue

dialog.YPos = varY.VariableState.FormattedValue

If dialog.ShowDialog() = DialogResult.OK Then

If Not String.IsNullOrEmpty(dialog.Diagram) Then

aApplication.ExecuteAction(EvoMessageType.Info, _

"OpenWindow(Main,P1," & dialog.Diagram & ",null)")

End If

End If

varX.Dispose()

varY.Dispose()

Return True

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

End Sub

End Class

In the code above the EvoDialog window object is created. Then, the Xpos and Ypos window properties are set in accordance with the current values of two variables of names transmitted in the script starting parameters. The dialogue window is opened using the ShowDialog function, and if the window with the DialogResult.OK status is closed, the operator action opening a diagram of the name transmitted in the Diagram property of the window, is constructed and executed.

For the correct execution of an example script, two additional conditions must be met:

  • the EvoDialog.dll file (alternatively along with the additional libraries) must be copied to the Addons subdirectory of the application definition directory.

  • In the References tab of the script edit panel, the reference to the EvoDialog.dll file should be added.

The described technique of extending the scrip functionality by adding libraries, can be also used to perform other tasks, not related to the user interface.


3.1. IApplication Interface

The IApplication interface is the basic mechanism of script interaction with the Asix.Evo application environment. The interface provides a variety of services. Some have just an informative meaning. Other are used to organise the script operation. The interface is also used to create the other objects that allow accessing the application data such as process variable values, or alarms statuses.

A reference to the object that implements the IApplication interface is transmitted into the script when the script Initialize function is called.


3.1.1. Properties

ApplicationAddonsDirectory

string ApplicationAddonsDirectory { get; }

ReadOnly Property ApplicationAddonsDirectory As String

The property returns a complete access path to the directory where all the files of application extensions of the application are located.

ApplicationDirectory

string ApplicationDirectory { get; }

ReadOnly Property ApplicationDirectory As String

This property returns a complete access path to the application definitional directory. If the script for running requires files with additional parameters, it is recommended to store them in the application definition directory.

ApplicationName

string ApplicationName { get; }

ReadOnly Property ApplicationName As String

This property returns the Application name defined in the workstation settings.

ApplicationWorkingDirectory

string ApplicationWorkingDirectory { get; }

ReadOnly Property ApplicationWorkingDirectory As String

This property returns a complete access path to the application working directory. If the script functioning aims to create and save an information to files, it is recommended to save them in the application working directory.

Asalert

AsalertAccess Asalert { get; }

ReadOnly Property Asalert As AsalertAccess

This property returns a reference to the AsalertAccess class object used to communicate with the AsAlert application server. The object returned allows for sending an alert via SMS or e-mail.

Asbase

AsbaseAccess Asbase { get; }

ReadOnly Property Asbase As AsbaseAccess

This property returns a reference to the AsbaseAccess class object used to access the data archived in the database of the AsBase module.

AsixDataServerStarted

bool AsixDataServerStarted { get; }

ReadOnly Property AsixDataServerStarted As Boolean

This property returns information whether the Data Server has already been activated. The property can be used for monitoring, at the application start-up, whether the system for process variable readout is fully operational.

Aslogger

AsloggerAccess Aslogger { get; }

ReadOnly Property Aslogger As AsloggerAccess

This property returns a reference to the AsloggerAccess class object used to access the data archived in the database of the AsLogger module.

Asservice

AsserviceAccess Asservice { get; }

ReadOnly Property Asservice As AsserviceAccess

This property returns a reference to the AsserviceAccess class object used to access the data archived in the database of the AsService module.

ComputerName

string ComputerName { get; }

ReadOnly Property ComputerName As String

This property returns the workstation name on which the application is run.

ComputerAddress

string ComputerAddress { get; }

ReadOnly Property ComputerAddress As String

This property returns the IP of the workstation on which the application is run.

CurrentApplicationLanguage

tring CurrentApplicationLanguage { get; }

ReadOnly Property CurrentApplicationLanguage As String

This property returns the language name in which the application is currently running. The language names are two-letter abbreviations, e.g., pl for the Polish language, en for the English language.

CurrentStationName

string CurrentStationName { get; }

ReadOnly Property CurrentStationName As String

This property returns the workstation name in the context of which the Application is executed.

CurrentUserId

string CurrentUserId { get; }3.1.1.16. CurrentUserRoles

ReadOnly Property CurrentUserId As String

This property returns the ID of the currently logged user.

CurrentUserName

string CurrentUserName { get; }

ReadOnly Property CurrentUserName As String

This property returns the name of the currently logged user.

CurrentUserRoles

string CurrentUserRoles { get; }

ReadOnly Property CurrentUserRoles As String

The property returns the names of all roles to which the currently logged user is assigned. The role names are returned in the form of a single text in which individual names are separated by commas. If only checking whether the user is assigned to a particular role is required, it is easier to use the HasRole function.

ExecutionContext

IContext ExecutionContext { get; }

ReadOnly Property ExecutionContext As IContext

This property returns a reference to the object implementing the IContext interface. This interface contains properties that define the context of the script call. The call context is particularly important for the interactive scripts started within the event handling of the visualization objects. On the basis of a context, it is possible to load e.g. the object main variable name.

IsAsixUser

bool IsAsixUser { get; }

ReadOnly Property IsAsixUser As Boolean

The property returns a Boolean value indicating whether the currently logged user has been authorised on the basis of the internal user base.

IsDomainUser

bool IsDomainUser { get; }

ReadOnly Property IsDomainUser As Boolean

The property returns a Boolean value indicating whether the currently logged user has been authorised via the Windows domain.

ProgramVersion

string ProgramVersion { get; }

ReadOnly Property ProgramVersion As String

This property returns the AsixEvo application version. The version number is returned in the form of a single text consisting of four numbers separated by dots.

RDSComputerName

string RDSComputerName { get; }

ReadOnly Property RDSComputerName As String

While in RDS mode, the property returns the workstation name on which the RDS session is taking place.

RDSComputerAddress

string RDSComputerAddress { get; }

ReadOnly Property RDSComputerAddress As String

While in RDS mode, the property returns the IP of the workstation on which the RDS session is taking place.

ScriptName

string ScriptName { get; }

ReadOnly Property ScriptName As String

This property returns the name of script being run.

ScriptSettings

IScriptSettings ScriptSettings { get; }

ReadOnly Property ScriptSettings As IScriptSettings

This property returns a reference to the object implementing the IScriptSettings interface. The interface enables to specify the way in which the main application controls launching and running of scripts. Specifically, this refers to the response to a script error.

SystemUser

string SystemUser { get; }

ReadOnly Property SystemUser As String

This property returns the ID of the currently logged system user.


3.1.2. Methods

ApplicationText

string ApplicationText(string aTextId);

Function ApplicationText (ByVal aTextId As String) As String

This function supports the multilingual applications. It returns a text from the application text pool. The text with the ID specified in the aTextIdparameter in a language version compatible with the current application language, is returned.

CreateThread

Thread CreateThread(ThreadStart aThreadFunction);

Function CreateThread (ByVal aThreadFunction As System.Threading.ThreadStart) As System.Threading.Thread

This function creates a new thread for the script running. The aThreadFunction parameter specifies the function which will be executed within the new thread. The thread function must be compatible with the system ThreadStart delegate. The CreateThread function returns the system object of Thread class, through which the script running can be controlled.

It is recommended to create threads via the CreateThread function within the Asix.Evo scripts, instead of using the direct methods of the .NET platform.

Example:

  C#

void ThreadFnc()

{

//

// thread code

//

}

public bool Initialize(string[] aParameters, IApplication aApplication)
{

Thread t1 = aApplication.CreateThread(ThreadFnc);

t1.Start();

return false;
}

VB

Sub ThreadFun()

'

' kod wątku

'

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim t1 As System.Threading.Thread

t1 = aApplication.CreateThread(AddressOf ThreadFun)

t1.Start()

Return False

End Function

The ThreadFnc function constitutes a thread code. The CreateThread call creates a thread, and the Start function of the Thread object starts the thread.

ExecuteAction

bool ExecuteAction(string aAction);

bool ExecuteAction(string aAction, bool aWaitForFinish);

Function ExecuteAction (ByVal aAction As String) As Boolean

Function ExecuteAction (ByVal aAction As String, , ByVal aWaitForFinishRefresh As Boolean) As Boolean

The function starts the operator action specified by the aAction parameter. The aWaitForFinish parameter specifies whether to wait for the finish of the execution of an operator action. The false value or a lack of parameter means that the operator action will be executed asynchronously. The function returns the false value if an error of the action execution occurred.

The ExecuteAction function extends the Asix.Evo script with a full set of operations implemented into the applications via the operator actions. However, it should be noted that some actions executed in the context of the resident script may have adverse effects. For example, executing the OpenWindow action at a random point of time may be unexpected to a user.

GetAlarmDomainController

string[] GetAlarmDomainController(string aDomain);

Function GetAlarmDomainController (ByVal aDomain As String) As String()

This function returns the workstation name of the controller active in the alarm domain specified by the aDomain parameter. If the domain name is blank, the call relates to the application default domain (the first defined).

GetAlarm

IAlarm GetAlarm(string aAlarmName);

IAlarm GetAlarm(string aDomainName, string aAlarmName);

Function GetAlarm (ByVal aAlarmName As String) As IAlarm

Function GetAlarm (ByVal aDomain As String, ByVal aAlarmName As String) As IAlarm

This function returns a reference to the object implementing the IAlarm interface for the alarm of the ID specified by the aAlarmName parameter belonging to the domain called aDomain. The call version which does not specifies the domain name, relates to the application default domain (the first defined).

The IAlarm interface allows obtaining information on the alarm definition and its current status. It also allows controlling the alarm status: the alarm notification, termination and acknowledge.

GetAlarmDomains

string[] GetAlarmDomains();

Function GetAlarmDomains () As String()

This function returns the array of all active alarm domain names defined in the application

GetAlarmDomainStationMode

AlarmStationMode GetAlarmDomainStationName(string aDomain);

Function GetAlarmDomainStationName (ByVal aDomain As String) As AlarmStationMode

This function returns the current alarm system operation m in the alarm domain specified by the aDomain parameter. If the domain name is blank, the call relates to the application default domain (the first defined).

The AlarmStationMode enumerated type can have the following values: ActiveController, PasiveController, Terminal and Undetermined. The Undetermined mode is a transition mode, which can be returned in a transient states, e.g. when the domain is started.

GetActiveAlarms

string[] GetActiveAlarms(string aDomain);

Function GetActiveAlarms (ByVal aDomain As String) As String()

This function returns the array of IDs of all currently active alarms in the alarm domain, specified by the aDomain parameter. If the domain name is blank, the call relates to the application default domain (the first defined).

GetChannelState

ChannelState GetChannelState(string aChannelName);

Function GetChannelName (ByVal aChannelName As String) As ChannelState

This function returns the current operating state of the communication channel of the name specified in the aChannelName parameter.

The ChannelState enumerated type can have the following values:

Correct - the channel functions properly

Initializing - channel initialization

MainChannelCommunicationError - communication error

MainChannelCommunicationErrorRedundantCommunication - redundant communication error

ControllerSTOP - STOP state of the controller

TempraryOff - temporarily switched off

RedundantEvoDriver - redundant driver is active in the Asix.Evo channel

OtherError - other channel error

Unknown Channel - channel unknown

Undetermined - channel state undetermined

GetDefinedAlarms

string[] GetDefinedAlarms(string aDomain);

Function GetDefinedAlarms (ByVal aDomain As String) As String()

This function returns the array of IDs of all alarms defined in the alarm domain, specified by the aDomain parameter. If the domain name is blank, the call relates to the application default domain (the first defined).

GetTrendPatternPoints

TrendPatternPoint[] GetTrendPatternPoints(string aPatternName);

Function GetTrendPatternPoints(ByVal aPatternName As String) As TrendPatternPoint()

The function returns the array of points of the pattern trend which name is specified in the aPatternName parameter.

The function is used in the scripts responsible for transferring the pattern trend curve to a controller.

GetVariable

IVariable GetVariable(string aVarName, bool aRefresh, bool aWithTimeStampsEvent);

IVariable GetVariable(string aVarName, bool aRefresh);

Function GetVariable(ByVal aVarName As String, ByVal aRefresh As Boolean) As IVariable

Function GetVariable(ByVal aVarName As String, ByVal aRefresh As Boolean, ByVal aWithTimeStampsEvent As Boolean) As IVariable

This function returns a reference to the object implementing the IVariable interface for the variable with a name specified by the aVarName parameter. The aRefresh parameter specifies whether to start refreshing (a periodic readout) of variable value. The refreshing should be enabled for monitoring the changes of current variable values. If a script will only use the archival data or will only control the variable value, the refreshing enabling is not required.

The aWithTimeStampsEvent parameter specifies the command for calling the monitoring function of variable values (declared using the RegisterStateEvent command of the IVariable interface). A false value or the lack of a parameter means that the monitoring function will be executed only when the variable value or status changes. A true value means that changes of the variable time stamp will also be monitored.

The IVariable interface allows obtaining information on the variable definition and its current value. It also allows reading out the archival values, and provides methods of recording variable values.

GetVariableArcData

ArcVariableState[ ] GetVariableArcData(string aVarName, DateTime aStartTime, DateTime aEndTime, string aAggregate, TimeSpan aAggregateInterval);

Function GetVariableArcData(ByVal aVarName As String, ByVal aStartTime As Date, ByVal aEndTime As Date, ByVal aAggregate As String, ByVal aAggregateInterval As System.TimeSpan) As ArcVariableState( )

This function allows for reading out historical values for a variable defined by the aVarName parameter. The aStartTime and aEndTime parameters designate respectively the beginning and the end of the period of time from which the data should be read. The aAggregate parameter specifies the name of the aggregate used, and the aAggregateInterva parameter specifies its calculation period.

During the execution of this command the script operation is suspended until the readout of historical data is completed. The command returns the array of points (ArcVariableState objects) of the historical trend read. In case of an error, the null value is returned.

Alternatively, historical data can be read out using the OrderArcData command of the IVariable interface.

See also

Types of archival data aggregates - see: Types of Archival Data Aggregates

Example:

C#

public bool Initialize(string[] aParameters, IApplication aApplication)

{

ArcVariableState[] values = aApplication.GetVariableArcData("Pomiar1",

DateTime.Today, DateTime.Now, "average", TimeSpan.FromMinutes(15));

if (values == null)

aApplication.ReportMessage(EvoMessageType.Error, "Read error");

else

{

foreach (ArcVariableState v in values)

aApplication.ReportMessage(EvoMessageType.Info,

v.TimeStamp.ToString() + ": " + v.Value.ToString());

}

return true;

}

VB

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim values As ArcVariableState()

values = aApplication.GetVariableArcData("Pomiar1", Date.Today, Date.Now, _

"average", TimeSpan.FromMinutes(15))

If (values Is Nothing)

aApplication.ReportMessage(EvoMessageType.Error, "Read Error")

Else

For Each v As ArcVariableState In values

aApplication.ReportMessage(EvoMessageType.Error, _

v.TimeStamp.ToString() + ": " + v.Value.ToString())

Next v

End If

Return True

End Function

Execution of the GetVariableArcData command reads out the 15-minute average values from the period since the beginning of a day until the current moment. If the readout was completed successfully, all archival values returned in the array of the ArcVariableState class elements are saved to the message log.

GetVariableNames

String[] GetVariableNames(string aAttributeName, string aAttributeValue);

Function GetVariableNames(ByVal aAttributeName As String, ByVal aAttributeValue As String) As String()

This function returns the array of all variable names for which the attribute of the name specified in the aAttributeName parameter is in accordance with the value specified in the aAttributeValue parameter. In the aAttributeValue parameter special symbols * and ? can be used.

Example:

C#

sring[] n = aApplication.GetVariableNames("Channel", "K1");

VB

Dim n As String() = aApplication.GetVariableNames("Channel", "K1")

The above call returns the array of all variable names from the communication channel called K1.

GetVariableValue

VariableState GetVariableValue(string aVariableName, bool aForceRead);

Function GetVariableValue(ByVal aVariableName As String, ByVal aForceRead As Boolean) As VariableState

This function returns a VariableState class object with a current variable value of the name specified in the aVariableName parameter. A false value of the aForceRead parameter means that the value returned is the result of the last scheduled refreshing of variable. A true value triggers a direct readout of the current variable value at the time of the function execution.

GlobalProperty

object GlobalProperty(string aPropertyName);

Function GlobalProperty (ByVal aPropertyName As String) As Object

This function returns the definition of the application global property of a name specified by the aPropertyName parameter.

HasRole

bool HasRole(string aRoleName);

Function HasRole (ByVal aRoleName As String) As Boolean

This function returns the boolean value that determines whether the currently logged user is assigned to the role transmitted in the aRoleName parameter.

Login

bool Login(string aUser, string aPassword);

Function ExecuteAction (ByVal aUser As String, , ByVal aPassword As Boolean) As Boolean

This command logs in a user of the ID and password specified in the execution parameters. The command returns a true value if the operation has been ended in a correct way.

The Login command can be used while creating by the user their own logging mechanisms, also involving hardware mechanisms.

OPCTime

DateTime OPCTime(string aOPCTimeString);

DateTime GetVariable(string aOPCTimeString, DateTime  aBaseTime);

Function OPCTime(ByVal aOPCTimeString As  String) As Date

Function OPCTime (ByVal aOPCTimeString As String, ByVal aBaseTime As Date) As Date

This function returns a time value calculated on the basis of the base time and the offset specified using the OPC formatting expression. The base time is specified by the aBaseTime parameter or it is the current time for a single-argument call.

The offset transferred in the aOPCTimeString parameter is described by an extended OPC formatting expression in the following form:

[NOW|SECOND|MINUTE|HOUR|DAY|WEEK|MONTH|YEAR][cycle[/offset]] [[+|-][number][Y|MO|W|D|H|M|S]...]

The first part of the expression specifies the initial offset, e.g. HOUR means the beginning of an hour. The clauses cycle and offset enable the implementation of cycles, e.g. HOUR8/6 enables calculating the beginning of an 8-hour shift, where the first shift starts at 6. The final part of the expression enables to set an additional time offset, e.g. HOUR-15M is 15 minutes before the beginning of the hour.

ReadVariables

VariableState() ReadVariables(params string[] aVarNames);

Function ReadVariables(ByVal ParamArray aVarNames As String()) As VariableState()

This command provides for a group readout of many process variable values. The names of the variables are provided in a table transferred in the aVarNames parameter. The command returns a table of objects of the VariableState class with current variable values. The command executes a real readout of variable values (in the same way as the GetVariableValue command with the aForceRead parameter set to true). The time of the command execution is dependant on the number of variables and the communication channels used. However, it is usually much shorter than in the case of repeated execution of the GetVariableValue command.

RegisterAlarmDomainEvents

IAlarmEventInfo RegisterAlarmDomainEvents(string aDomain, AlarmEvent aFunction,  AlarmDomainEvents aEvent);

Function RegisterAlarmDomainEvents(ByVal aDomain As  String, ByVal aFunction As  AlarmEvent, ByVal aEvent As AlarmDomainEvents) As IAlarmEventInfo

This function is used to register the callback function to be called on every change of the domain state. The aEvent parameter specifies the event types to be monitored. The AlarmDomainEvents enumeration type takes the following values: AlarmBegin (detection of the alarm beginning), AlarmEnd (detection of the alarm end), AlarmManagement (change of state resulting from the operator's actions, such as the alarm acknowledgement), DomainStart(activating the domain), DomainStop(stopping the domain), All (all event types). It is possible to combine event types using the OR boolean operator.

The aFunction parameter specifies the alarm monitoring function - it must be compatible with the AlarmEvent delegate.

delegate void AlarmEvent(string aDomain, string aAlarm, AlarmState aAlarmState, AlarmEventType aEventType);

Delegate Sub AlarmEvent(ByVal aDomain As  String, ByVal aAlarm As String, ByVal aAlarmState As  AlarmState ,ByVal aEventType As  AlarmEventType)

When the monitoring function is called, three parameters are transferred to it. The aDomain and aAlarm parameters specify respectively the domain name and ID of the alarm to which the callback function call refers. The aAlarmState parameter transfers an object from which the current alarm state may be readout. The AEventType parameter specifies the event type. The AlarmEventType enumeration type takes the following values: AlarmBegin (detection of the alarm beginning), AlarmEnd (detection of the alarm end), AlarmManagement (change of state resulting from the operator's actions, such as the alarm acknowledgement), DomainStart(activating the domain), DomainStop(stopping the domain).

The RegisterAlarmDomainEvents command returns an object of the IAlarmEvcentInfo interface. This object provides one command UnregisterStateEvent. It is used to unregister the monitoring function.

Example:

C#

IAlarmEventInfo alarmInfo;

IApplication application;

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

alarmInfo = aApplication.RegisterAlarmDomainEvents("DemoB1", AlarmFun,

AlarmDomainEvents.AlarmBegin | AlarmDomainEvents.AlarmEnd);

return false;

}

public void FinalizeScript()

{

if (alarmInfo != null)

alarmInfo.UnregisterStateEvent();

}

void AlarmFun(string aDoamin,string aId, AlarmState aState, AlarmEventType aType)

{

if (aType == AlarmEventType.AlarmBegin)

application.ReportMessage(EvoMessageType.Info,

"Wykryty początek alarmu " + aId + ", czas detekcji " +

aState.BeginDetectionTimeStamp);

else if (aType == AlarmEventType.AlarmEnd)

application.ReportMessage(EvoMessageType.Info,

"Wykryty koniec alarmu " + aId + ", czas detekcji " +

aState.EndDetectionTimeStamp);

}

VB

Dim alarmInfo As IAlarmEventInfo

Dim application As IApplication

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication _

As IApplication) As Boolean Implements IScript.Initialize

application = aApplication

alarmInfo = aApplication.RegisterAlarmDomainEvents("DemoB1", _

AddressOf AlarmFun, _

AlarmDomainEvents.AlarmBegin Or AlarmDomainEvents.AlarmEnd)

Return False

End Function

Public Sub FinalizeScript() Implements IScript.FinalizeScript

If Not alarmInfo Is Nothing

alarmInfo.UnregisterStateEvent()

End If

End Sub

Sub AlarmFun(aDomain As String, aId As String, aState As AlarmState, _

aType As AlarmEventType)

If aType = AlarmEventType.AlarmBegin

application.ReportMessage(EvoMessageType.Info, _

"Wykryty początek alarmu " + aId + ", czas detekcji " + _

aState.BeginDetectionTimeStamp)

Else If aType = AlarmEventType.AlarmEnd

application.ReportMessage(EvoMessageType.Info, _

"Wykryty koniec alarmu " + aId + ", czas detekcji " + _

aState.EndDetectionTimeStamp)

End If

End Sub

The above code registers the monitoring function in the DemoB1 domain for the alarm beginning and termination events. The monitoring function saves information on each alarm beginning and termination in the message log.

RegisterTimeEvent

IEventInfo RegisterTimeEvent(SimpleEvent aFunction, TimeSpan aPeriod, TimeSpan aAlign);

Function RegisterTimeEvent(ByVal aFunction As SimpleEvent, ByVal aPeriod As System.TimeSpan, ByVal aAlign As System.TimeSpan) As IEventInfo

This function is used to register a callback function that will be periodically called at a specific intervals. The aFunction parameter specifies the function to be executed periodically - this function must be compatible with the SimpleEvent delegate.

delegate void SimpleEvent();

Delegate Sub SimpleEvent()

The aPeriod parameter specifies the period of time during which the callback function will be performed. The aAlign parameter specifies the start time adjustment according to the beginning of a day. If this parameter is lower than zero (e.g. TimeSpan.FromSeconds (-1)), the adjustment is not executed. If the aAlign is equal to zero, the callback function will be called every aPeriod period, starting at 00:00 hour. If the aAlign is higher than zero, the callback function will be called every aPeriod period, starting at 00:00 + aAlign hour.

The RegisterTimeEvent function returns a value that can be used to unregister the callback function with the UnregisterEvent method.

Example:

C#

void CallbackFun()

{

//

// kod funkcji zwrotnej

//

}

public bool Initialize(string[] aParameters, IApplication aApplication)
{

aApplication.RegisterTimeEvent(CallbackFun, TimeSpan.FromHours(1),

TimeSpan.FromMinutes(15));

return false;
}

VB

Sub CallbackFun()

'

' kod funkcji zwrotnej

'

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

   aApplication.RegisterTimeEvent(AddressOf CallbackFun, TimeSpan.FromHours(1),_

TimeSpan.FromMinutes(15))

Return False

End Function

The CallbackFun function will be performed 15 minutes after every hour, i.e. at 0:15, 1:15, 2:15, etc.

ReportMessage

void ReportMessage(EvoMessageType aType, string aText);

Sub ReportMessage (ByVal aType As EvoMessageType, ByVal aText As String)

The function records a message of a contents specified in the aText parameter in the application log. The aType parameter specifies a message priority. The EvoMessageType enumerated type can have the following values: Exception, Error, Warning, Info, Trace. The Trace type messages are not displayed in the message window, they are only stored in a log file.

A reporting level for the script operation recorded in the message log is set by the script developer. However, it should be noted that all errors which occurred during the operation should be reported. In particular, it concerns the resident scripts.

RestartScript

void RestartScript();

Sub RestartScript()

This command allows for a complete restart of a script. It should be used in cases when the control code of a script finds incorrect script running requiring its restart. Independently of this mechanism, in case of an uncontrollable script failure its automatic restart is possible (if the RestartIfFailed property of the IScriptSettings interface has been set).

SetVariableBits

bool SetVariableBits(string aVariableName, long aValue, long aMask);

bool SetVariableValue(string aVariableName, long aValue, long aMask, StatusOpc aStatus);

bool SetVariableValue(string aVariableName, long aValue, long aMask, StatusOpc aStatus, DateTime aTimeStamp);

Function SetVariableBits(ByVal aVariableName As String, ByVal aValue As  Long, ByVal aMask As  Long) As Boolean

Function SetVariableBits(ByVal aVariableName As String, ByVal aValue As  Long, ByVal aMask As  Long, ByVal aStatus As  Askom.Ascent.StatusOpc) As Boolean

Function SetVariableBits(ByVal aVariableName As String, ByVal aValue As Long, ByVal aMask As Long, ByVal aStatus As Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This command sets the process variable value of the name specified in the aVariableName parameter to a new value specified in the aValue parameter with an additional masking of the bits changed by the aMask parameter. In the first phase of the execution, the current variable value is read out, and then the bits whose value corresponds to 1 in the aMask mask are changed according to the values in the aValue parameter.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

In case of a failure, the command returns the false value. Since the command is executed asynchronously, the correctness test only applies to preconditions compliance. In case of a communication error occurrence, the error will be reported in the message panel.

SetVariableValue

bool SetVariableValue(string aVariableName, object aValue);

bool SetVariableValue(string aVariableName, object aValue, StatusOpc aStatus);

bool SetVariableValue(string aVariableName, object aValue, StatusOpc aStatus, DateTime aTimeStamp );

Function SetVariableValue(ByVal aVariableName As String, ByVal aValue As  Object) As Boolean

Function SetVariableValue(ByVal aVariableName As String, ByVal aValue As  Object, ByVal aStatus As  Askom.Ascent.StatusOpc) As Boolean

 Function SetVariableValue(ByVal aVariableName As String, ByVal aValue As  Object, ByVal aStatus As  Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This command sets the process variable value of the name specified in the aVariableName parameter to the value specified in the aValue parameter.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

The possibility to set the time and status depends on the type of the channel to which the variable belongs. Usually physical channels are in particular deprived of this functionality.

In case of a failure, the command returns the false value. Since the command is executed asynchronously, the correctness test only applies to preconditions compliance. In case of a communication error occurrence, the error will be reported in the message panel.

SetVariables

bool SetVariables(string[] aVarNames, object[] aValues);

bool SetVariables(string[] aVarNames, object[] aValues, StatusOpc aStatus);

bool SetVariables(string[] aVarNames, object[] aValues, StatusOpc aStatus, DateTime aTimeStamp );

Function SetVariables(ByVal aVarNames() As String, ByVal aValues() As  Object) As Boolean

Function SetVariables(ByVal aVarNames() As String, ByVal aValues() As  Object, ByVal aStatus As  Askom.Ascent.StatusOpc) As Boolean

 Function SetVariables(ByVal aVarNames() As String, ByVal aValues() As  Object, ByVal aStatus As  Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This command sets the process variable values of the names specified in the aVarNames table to the values specified in the aValues table. The sizes of the name and value tables must be identical. The time needed to execute the SetVariables command is usually shorter than repeated execution of the SetVariableValue command.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

The possibility to set the time and status depends on the type of the channel to which the variable belongs. Usually physical channels are in particular deprived of this functionality.

In case of a failure, the command returns the false value. Since the command is executed asynchronously, the correctness test only applies to preconditions compliance. In case of a communication error occurrence, the error will be reported in the message panel.

Sleep

             void Sleep(TimeSpan aTimeSpan);

Sub Sleep (ByVal aTimeSpan As System.TimeSpan)

This function suspends the script current thread running for a period of time specified in the aTimeSpan parameter. This function should be used wherever a waiting for an event occurrence or elapsing of a specific period of time is required. In no case, do not use the active loop which tests the conditions - it leads to a CPU overloading.

Example:

C#

aApplication.Sleep(TimeSpan.FromSeconds(5));

VB

aApplication.Sleep(TimeSpan.FromSeconds(5))

The call suspends the script for 5 seconds.

TerminateScript

void TerminateScript(bool aWithFinalize);

Sub TerminateScript (ByVal aWithFinalize As Boolean)

Calling the function terminates the script running. The aWithFinalize parameter determines, whether during the process of the script exiting, the script Finalize method should be executed.

The TerminateScript function is used only in special cases. The interactive scripts (one-time) are usually terminated by exiting the Initialize function with the true return value. The resident scripts are terminated automatically, along with the application closing.

ToggleBits

bool ToggleBits(string aVariableName, long aMask);

bool SetVariableToggleBits(string aVariableName, long aMask, StatusOpc aStatus);

bool ToggleBits(string aVariableName, long aMask, StatusOpc aStatus, DateTime aTimeStamp);

Function ToggleBits(ByVal aVariableName As String, ByVal aMask As  Long) As Boolean

Function ToggleBits(ByVal aVariableName As String, ByVal aMask As  Long, ByVal aStatus As  Askom.Ascent.StatusOpc) As Boolean

Function ToggleBits(ByVal aVariableName As String, ByVal aMask As Long, ByVal aStatus As Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This command sets the values of selected process variable bits of the name specified in the aVariableName parameter into opposite values. In the first phase of the execution, the current variable value is read out, and then the bits whose value corresponds to 1 in the aMask parameter are changed into opposite values. The other variable bits remain unchanged.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

In case of a failure, the command returns the false value. Since the command is executed asynchronously, the correctness test only applies to preconditions compliance. In case of a communication error occurrence, the error will be reported in the message panel.

UnregisterEvent

            void UnregisterEvent(IEventInfo aCallbackInfo);

            Sub UnregisterEvent(ByVal aCallbackInfo As IEventInfo)

Unregistering the function started according to a time schedule, which was previously registered using the RegisterTimeEvent function. The value returned at the time of function recording, should be transmitted as the aCallbackInfo parameter.


3.2. IContext Interface

The IContext interface features properties that define the context of script call. The call context is particularly important for the interactive scripts started within the event handling of the visualization objects. The interface allows linking the script to its starting method.

The reference to the IContext interface can be obtained by the readout of the ExecutionContext property of the IApplication interface.


3.2.1. Properties

Diagram

       string Diagram { get; }

ReadOnly Property Diagram As String

This property returns the diagram name in the context of which the script was executed.

DiagramObject

string DiagramObject { get; }

ReadOnly Property DiagramObject As String

This property returns the visualization object name, in the context of which the script was executed.

IsWebBrowser

bool IsWebBrowser { get; }

ReadOnly Property IsWebBrowser As Boolean

This property returns information on whether the application is running in a browser environment.

MainVariable

string MainVariable { get; }

ReadOnly Property MainVariable As String

This property returns the main variable name of the visualization object, in the context of which the script has been executed.

ScriptStartTime

     DateTime ScriptStartTime { get; }

ReadOnly Property ScriptStartTime As Date

This property returns the point of time at which the script has been executed.

SourceFilePath

string SourceFilePath { get; }

ReadOnly Property SourceFilePath As String

The property returns a complete source file path of the script being run.

WebServerAddress

string WebServerAddress { get; }

ReadOnly Property WebServerAddress As String

This property returns the address of the WWW server from which the browser application was loaded.


3.2.2. Methods

IsDiagramActive

bool IsDiagramActive(string aDiagramName, string aParameters);

Function IsDiagramActive (ByVal aDiagramName As String, ByVal aParameters As String) As Boolean

The command returns a Boolean value indicating whether the diagram specified by the aDiagramName parameter and the aParameters opening parameters is currently open and active.

IsDiagramOpened

bool IsDiagramOpened(string aDiagramName, string aParameters, int aScreen);

Function IsDiagramOpened (ByVal aDiagramName As String, ByVal aParameter As String, ByVal aScreen As Integer) As Boolean

The command returns a Boolean value indicating whether a diagram of the name specified by the aWindowName and the aParameters opening parameters is opened on the screen defined by the aScreen parameter. The value of the aScreen parameter can be -1 (meaning any monitor) or 1 and more, indicating the number of the monitor in accordance with the numbering of the operating system.

IsRuntime

bool IsRuntime();

Function IsRuntime () As Boolean

The command returns a Boolean value indicating whether the application is currently running in the operator mode.

IsScriptWorking

bool IsScriptWorking(string aScriptName, params string[] aParameters);

Function IsScriptWorking (ByVal aScriptName As String, ByVal ParamArray aParameters As String()) As Boolean

The command returns a Boolean value indicating whether a script with the indicated name and opening parameters is currently running.

IsWindowOpened

bool IsWindowOpened(string aWindowName, int aScreen);

Function IsWindowOpened (ByVal aWindowName As String, ByVal aScreen As Integer) As Boolean

The command returns a Boolean value indicating whether a window of the name specified by the aWindowName parameter is opened on the screen defined by the aScreen parameter. The value of the aScreen parameter can be -1 (meaning any monitor) or 1 and more, indicating the number of the monitor in accordance with the numbering of the operating system.


3.3.1. Properties

AllowMultipleInstances

MultipleInstanceMode AllowMultipleInstances { get; set; }

Property AllowMultipleInstances As MulitipleInstanceMode

This property specifies the control command for multiple run attempts of a script. The property can have the following values:

Never - multiple script instances cannot be run

Always - any number of script instances can be run

IfDifferentParameters - many script instances can be run if their starting parameters are different (default value)

RestartIfFailed

bool RestartIfFailed { get; set; }

Property RestartIfFailed As Boolean

This property specifies the response to a script execution error. A true value means that in case of a script failure it will be automatically restarted. The default value is false.

Typically, the property is set to true for autonomous scripts once the initialization phase is finished.


3.4.1. Properties

Name

             string Name { get; }

            ReadOnly Property Name As String

This property returns the name of process variable controlled by a reference to the IAlarm interface.

IsRefreshed

             bool IsRefreshed { get; }

ReadOnly Property IsRefreshed As Boolean

This property returns the information whether a cycle refreshing of the variable is performed. The refresh mode is declared at the time of the IVariable interface creation using the GetVariable function of the IApplication interface.

VariableState

             VariableState VariableState { get; }

            ReadOnly Property VariableState As VariableState

This property returns the object of the VariableState class, from which a current value and status of process variable can be read out. A variable value is loaded from the last refreshing of variable. The refreshing period is specified in the definition of process variable.


3.4.2. Methods

OrderArcData

IArcQueryResult OrderArcData(ArcQuery aQuery);

Function OrderArcData (ByVal aQuery As ArcQuery) As IArcQueryResult

This function is used to read out an archival data of process variable. The ArcQuery class object transmitted as the aQuery parameter specifies the readout parameters, in particular, the period of time and aggregation method. The OrderArcData function only initiates the historical data readout process. The returned object of the IArcQueryResult interface is used to control the process of data collection and the process of calculated data readout.

Example:

C#

public bool Initialize(string[] aParameters, IApplication aApplication)

{

IVariable iv = aApplication.GetVariable("A004", false);

IArcQueryResult qr = iv.OrderArcData(new ArcQuery(DateTime.Today, DateTime.Now,

"average", TimeSpan.FromMinutes(15)));

if (qr.ResultStatus == ArcResultStatus.Processing)

qr.Wait();

if (qr.ResultStatus == ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, "OrderArcData error: " +

qr.ErrorDescription);

else

{

foreach (ArcVariableState v in qr.Values)

aApplication.ReportMessage(EvoMessageType.Info, v.TimeStamp.ToString() +

": " + v.Value.ToString());

}

return true;

}

VB

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

Dim iv As IVariable

iv = aApplication.GetVariable("A004", False)

Dim qr As IArcQueryResult

qr = iv.OrderArcData(New ArcQuery(Date.Today, Date.Now, _

"average", TimeSpan.FromMinutes(15)))

If (qr.ResultStatus = ArcResultStatus.Processing)

Qr.Wait()

End If

If (qr.ResultStatus = ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, _

"OrderArcData error: " + qr.ErrorDescription)

Else

For Each v As ArcVariableState In qr.Values

aApplication.ReportMessage(EvoMessageType.Error, _

v.TimeStamp.ToString() + ": " + v.Value.ToString())

Next v

End If

Return True

End Function

The ArcQuery class object transmitted in the call of the OrderArcData method reads out the 15-minute average values from the period since the beginning of a day until the current moment. Pending for the operation termination, by calling the Wait function of the IArcQueryResult object, returned as a result of the OrderArcData method execution, is started after a readout process initialization. If the readout was completed successfully, all archival values returned through the Values property of the IArcQueryResult class object are recorded to the message log.

Read

VariableState Read();

Function Read () As VariableState

This function returns the VariableState class object from which the current value and status of process variable can be read out. This function forces a variable real readout; a variable value relates to the moment at which the function was executed.

The function execution time depends on the time of variable value readout from a data source.

RegisterStateEvent

void RegisterStateEvent(VariableEvent aFunction);

Sub RegisterStateEvent(ByVal aFunction As VariableEvent)

This function is used to register a callback function which will be called whenever a variable value, status, or controlled variable time are changed. The aFunction parameter specifies the function which monitors a variable state - it must be compatible with the SimpleEvent delegate.

delegate void VariableEvent(string aVariableName, VariableState aVariableState);

Delegate Sub VariableEvent(ByVal aVariableName As String, ByVal aVariableState As VariableState)

When the monitoring function is called, two parameters are transmitted into it. The aVariableName parameter specifies the name of variable. It is possible to link the same monitoring function to many variables, and with the aVariableName parameter it can be distinguished to which variable the call applies. The aVariableState parameter forwards the object from which a current variable state can be read out.

For the correct operation of the monitoring function, enabling a variable refreshing when creating an object of the IVariable interface is required. The monitoring function can be unregistered using the UnegisterStateEvent method.

Example:

C#

IApplication application;

void ValueFun(string aVariableName, VariableState aVariableState)

{

// kod funkcji zwrotnej

application.ReportMessage(EvoMessageType.Info, aVariableName + " = " +

aVariableState.FormattedValue);

}

public bool Initialize(string[] aParameters, IApplication aApplication)
{

application = aApplication;

IVariable iv = aApplication.GetVariable("varTest", true);

iv.RegisterStateEvent(ValueFun);

return false;
}

VB

Dim application As IApplication

Sub ValueFun(aVariableName As String, aVariableState As VariableState)

' kod funkcji zwrotnej

application.ReportMessage(EvoMessageType.Info, aVariableName & _

" = " & aVariableState.FormattedValue)

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements Initialize

application = aApplication

Dim iv As IVariable

iv = application.GetVariable("varTest", True)

iv.RegisterStateEvent(AddressOf ValueFun)

Return False

End Function

The above code creates the IVariable object for the varTest variable with a variable refreshing enabled. Then, the ValueFun monitoring function is registered, which whenever a variable state is changed records an information consisting of a variable name and its current value in the message log.

SetVariableBits

bool SetVariableBits(long aValue, long aMask);

bool SetVariableBits(long aValue, long aMask, StatusOpc aStatus);

bool SetVariableBits(long aValue, long aMask, StatusOpc aStatus, DateTime aTimeStamp);

Function SetVariableBits(ByVal aValue As Long, ByVal aMask As Long) As Boolean

Function SetVariableBits(ByVal aValue As Long, ByVal aMask As Long, ByVal aStatus As Askom.Ascent.StatusOpc) As Boolean

Function SetVariableBits(ByVal aValue As Long, ByVal aMask As Long, ByVal aStatus As Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This function sets the process variable to the value specified in the aValue parameter with an additional masking of the bits changed by the aMask parameter. In the first phase of the execution, the current variable value is read out, and then bits to which in the aMask mask the value of 1 corresponds are changed according to the values in the aValue parameter.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

In a case of failure, the function returns the false value. Since the function is executed asynchronously, the correctness test only applies to preconditions compliance. In a case of a communication error occurrence, the error will be reported in the message panel.

SetVariableValue

bool SetVariableValue(object aValue);

bool SetVariableValue(object aValue, StatusOpc aStatus);

bool SetVariableValue(object aValue, StatusOpc aStatus, DateTime aTimeStamp );

Function SetVariableValue(ByVal aValue As Object) As Boolean

Function SetVariableValue(ByVal aValue As Object, ByVal aStatus As Askom.Ascent.StatusOpc) As Boolean

Function SetVariableValue(ByVal aValue As Object, ByVal aStatus As Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This function sets the process variable to the value specified in the AValue parameter.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

The possibility to set the time and status depends on the type of the channel to which the variable belongs. Usually physical channels are in particular deprived of this functionality.

In a case of failure, the function returns the false value. Since the function is executed asynchronously, the correctness test only applies to preconditions compliance. In a case of a communication error occurrence, the error will be reported in the message panel.

ToggleBits

bool ToggleBits(long aMask);

bool SetVariableToggleBits(long aMask, StatusOpc aStatus);

bool ToggleBits(long aMask, StatusOpc aStatus, DateTime aTimeStamp);

Function ToggleBits(ByVal aMask As  Long) As Boolean

Function ToggleBits(ByVal aMask As  Long, ByVal aStatus As  Askom.Ascent.StatusOpc) As Boolean

Function ToggleBits(ByVal aMask As Long, ByVal aStatus As Askom.Ascent.StatusOpc, ByVal aTimeStamp As Date) As Boolean

This command changes the values of selected process variable bits into opposite values. In the first phase of the execution, the current variable value is read out, and then the bits whose value corresponds to 1 in the aMask parameter are changed into opposite values. The other variable bits remain unchanged.

The call version with the aStatus parameter additionally sets a new variable status. Versions without the aStatus parameter always set the status to StatusOpc.Good.

The call version with the aTimeStamp parameter additionally sets a new variable time stamp. Versions without the aTimeStamp parameter always set the time stamp to the time of the command execution.

In case of a failure, the command returns the false value. Since the command is executed asynchronously, the correctness test only applies to preconditions compliance. In case of a communication error occurrence, the error will be reported in the message panel.

UnregisterStateEvent

void UnregisterStateEvent();

Sub UnregisterStateEvent()

Unregistering the monitoring function of a variable value, which was previously registered using the RegisterStateEvent function.

VariableAttribute

object VariableAttribute(string aAttributeName);

Function VariableAttribute (ByVal aAttributeName As String) As Object

This function returns the attribute definition for a process variable of a name specified with the aAttributeName parameter.


3.4. VariableState Class

Home > Scripts > 3. Object Model of Scripts > 3.5. VariableState Class

3.5. VariableState Class

The VariableState class object allows reading the current value of process variable, its status and timestamp. The VariableState class objects are created through the IVariable interface using the VariableState property or the Read function. They are also provided as the parameter of the variable value change monitoring function, registered by the RegisterStateEvent function of the IVariable interface.


VariableState Class_Properties

3.5.1. Properties

FormattedValue

string FormattedValue { get; }

            ReadOnly Property FormattedValue As String

This property returns the text value of the process variable created based on the format defined in the variable definition database.

IsBad

bool IsBad { get; }

ReadOnly Property IsBad As Boolean

This property determines whether a variable value status is incorrect.

IsGood

bool IsGood { get; }

ReadOnly Property IsGood As Boolean

The property determines whether a variable value status is correct.

IsUncertain

bool IsUncertain { get; }

ReadOnly Property IsUncertain As Boolean

The property determines whether a variable value status is uncertain.

RawValue

object RawValue { get; }

ReadOnly Property RawValue As Object

The property returns a raw value of process variable. This is a variable original value read out by a driver of a communication channel, before applying the conversion function defined in the variable database in the ReadConvertingFunction attribute.

NOTE: if the Asix6 communication channel is used, the property value is pre-calculated by the Asmen communication module based on the ConversionFunction attribute.

Status

public StatusOpc Status { get; }

ReadOnly Property Status As Askom.Ascent.StatusOpc

This property returns the detailed status of process variable value ??in the convention of the OPC communication interface. In the case of simple tests of variable status, it is recommended to use the IsGood, IsBad and IsUncertain properties.

TimeStamp

              DateTime TimeStamp { get; }

ReadOnly Property TimeStamp As Date

This property returns the readout time of variable value.

Value

object Value { get; }

ReadOnly Property Value As Object

This property returns a process variable value after completing all the calculations resulting from the variable definition in the variable database definition.


3.5. ArcQuery Class

Home > Scripts > 3. Object Model of Scripts > 3.6. ArcQuery Class

3.6. ArcQuery Class

The ArcQuery class is used to specify the parameters for a process variable archive values readout. The ArcQueryobjects are used in the OrderArcData method calls of the IVariable interface.


3.5.1. Constructor

Home > Scripts > 3. Object Model of Scripts > 3.6. ArcQuery Class > 3.6.1. Constructor

3.6.1. Constructor

ArcQuery (DateTime aStartTime, DateTime aEndTime)

Public Sub New(ByVal aStartTime As Date, ByVal aEndTime As Date)

The constructor creates an object of parameters for the query relating to a raw data readout. The aStartTime and aEndTime parameters designate respectively the beginning and the end of the period of time from which the data should be read.

ArcQuery ( DateTime aStartTime, DateTime aEndTime, string aAggregate, TimeSpan aAggregateInterval)

Public Sub New(ByVal aStartTime As Date, ByVal aEndTime As Date, ByVal aAggregate As String, ByVal aAggregateInterval As System.TimeSpan)

The constructor creates an object of parameters for the query relating to an aggregate data readout. The aStartTime and aEndTime parameters designate respectively the beginning and the end of the period of time from which the data should be read. The aAggregate parameter specifies the name of the used aggregate, and the aAggregateInterva parameter specifies its calculation period.

See also

Types of Archival Data Aggregates


ArcQuery_Class_Properties

3.6.2. Properties

Aggregate

string Aggregate { get; }

            ReadOnly Property Aggregate As String

This property returns the aggregate name used in the query on archival data.

AggregateInterval

TimeSpan TimeStamp { get; }

ReadOnly Property AggregateInterval As System.TimeSpan

This property returns the aggregate calculation period used in the query on archival data.

EndTime

DateTime EndTime { get; }

ReadOnly Property EndTime As Date

This property returns the end of the period of time from which archival data are to be read.

ProcessedDataQuery

bool ProcessedDataQuery { get; }

ReadOnly Property ProcessedDataQuery As Boolean

This property returns the information on the type of archival data to which the query relates. The true value indicates on an aggregated data readout, and the false value indicates on a raw data readout.

StartTime

DateTime StartTime { get; }

ReadOnly Property StartTime As Date

This property returns the beginning of the period of time, from which archival data are to be read out.


3.7. IArcQueryResult Interface

The IArcQueryResult interface is used to control the execution of archival data readout operation initiated by the OrderArcData method of the IVariable interface. The properties and methods of the interface allow checking whether, and how the operation was completed and provide the read out values.


IArcQueryResult_Interface_Properties

3.7.1. Properties

ErrorDescription

string ErrorDescription { get; }

            ReadOnly Property ErrorDescription As String

This property returns the text describing an archival data readout error (when the ResultStatus property is equal to ArcResultStatus.Error).

Query

ArcQuery Query { get; }

ReadOnly Property Query As ArcQuery

This property returns the ArcQuery class object from which the archival data readout parameters can be read, used in the OrderArcData function.

ResultStatus

ArcResultStatus ResultStatus { get; }

ReadOnly Property ResultStatus As ArcResultStatus

This property returns the current progress for the historical data reading operation. The enumeration type of ArcResultStatus may have the following values:

· Processing - the data reading operation is in progress

· Ready - the data reading operation has been completed successfully

· Error - the data reading operation has been completed with an error

Values

ArcVariableState[ ] Values { get; }

ReadOnly Property ArcVariableState As ArcVariableState( )

This property returns the historical trend points array, which is obtained by executing the OrderArcData function.

VariableName

string VariableName { get; }

            ReadOnly Property VariableName As String

This property returns the name of the variable for which the historical data are read.


IArcQueryResult_Interface_Methods

3.7.2. Methods

CancelQuery

void CancelQuery( );

Sub CancelQuery ( )

The CancelQuery method allows to stop the historical data reading operation in progress.

RegisterQueryResultEvent

void RegisterQueryResultEvent(ArcQueryResultEvent aFunction);

Sub RegisterQueryResultEvent(ByVal aFunction As ArcQueryResultEvent)

This function is used to register the callback function to be called when the historical data reading operation is completed. The aFunction parameter specifies the callback function - it must be compatible with the ArcQueryResultEvent delegate.

delegate void ArcQueryResultEvent(IArcQueryResultaQueryResult);

Delegate Sub ArcQueryResultEvent(ByVal aQueryResult As IArcQueryResult)

The reference to the IArcQueryResult interface is transferred through the aQueryResult parameter to the callback function which was performed in the context of this interface.

The function of waiting for the completion of the reading can be unregistered by using the UnregisterQueryResultEvent method.

Example:

C#

IApplication application;

void ArcQueryFun(IArcQueryResult aQueryResult)

{

if (aQueryResult.ResultStatus == ArcResultStatus.Error)

application.ReportMessage(EvoMessageType.Error, "OrderArcData error: " +

aQueryResult.ErrorDescription);

else

{

foreach (ArcVariableState v in aQueryResult.Values)

application.ReportMessage(EvoMessageType.Error, v.TimeStamp.ToString() +

": " + v.Value.ToString());

}

application.TerminateScript(true);

}

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

IVariable iv = aApplication.GetVariable("A004", false);

IArcQueryResult qr = iv.OrderArcData(new ArcQuery(DateTime.Today,

DateTime.Now,"average",TimeSpan.FromMinutes(15)));

if (qr.ResultStatus == ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, "OrderArcData error: " +

qr.ErrorDescription);

else

qr.RegisterQueryResultEvent(ArcQueryFun);

return false;

}

VB

Dim application As IApplication

Sub QueryArcFun(aQueryResult As IArcQueryResult)

If (aQueryResult.ResultStatus = ArcResultStatus.Error)

application.ReportMessage(EvoMessageType.Error, _

"OrderArcData error: " + aQueryResult.ErrorDescription)

Else

For Each v As ArcVariableState In aQueryResult.Values

application.ReportMessage(EvoMessageType.Error, _

v.TimeStamp.ToString() + ": " + v.Value.ToString())

Next v

End If

application.TerminateScript(True)

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication

Dim iv As IVariable

iv = aApplication.GetVariable("A004", False)

Dim qr As IArcQueryResult

qr = iv.OrderArcData(New ArcQuery(Date.Today, Date.Now, _

"average", TimeSpan.FromMinutes(15)))

If (qr.ResultStatus = ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, _

"OrderArcData error: " + qr.ErrorDescription)

Else

qr.RegisterQueryResultEvent(AddressOf QueryArcFun)

End If

Return False

End Function

The ArcQuery class object transmitted in the call of the OrderArcData method reads out the 15-minute average values from the period since the beginning of a day until the current moment. If the initiation of reading operation is successful, the ArcQueryFun function will be registered and executed at the operation completion. The record to the message log is done within the ArcQueryFun callback function for all the historical values that have been returned by the Values property of object of IArcQueryResult class transferred by the function call. Then, the script running is completed.

UnregisterQueryResultEvent

void UnregisterQueryResultEvent();

Sub UnregisterQueryResultEvent()

Unregistering the function being in progress, which was previously registered using the RegisterQueryResultEvent function.

Wait

bool Wait();

Function Wait() As Boolean

This function suspends running of the script until the historical data read operation is completed. This function is provided with a 5-minute waiting time limit. If the data is not read within this time, the function returns false.

An alternative to the Wait function is to use the Sleep function of the IApplication interface combined with the QueryResult status monitoring.


3.7. ArcVariableState Class

Home > Scripts > 3. Object Model of Scripts > 3.8. ArcVariableState Class

3.8. ArcVariableState Class

The object of ArcVariableState class stores information on the single value of historical process variable. The historical values array which is returned as the result of a query for the historical trend of variable may be obtained using the Values property of the IArcQueryResult interface.


ArcVariableState_Class_Properties

3.8.1. Properties

IsBad

bool IsBad { get; }

ReadOnly Property IsBad As Boolean

This property determines whether a variable value status is incorrect.

IsGood

bool IsGood { get; }

ReadOnly Property IsGood As Boolean

The property determines whether a variable value status is correct.

IsUncertain

bool IsUncertain { get; }

ReadOnly Property IsUncertain As Boolean

The property determines whether a variable value status is uncertain.

Status

public StatusOpc Status { get; }

ReadOnly Property Status As Askom.Ascent.StatusOpc

This property returns the detailed status of process variable value in the convention of the OPC communication interface. In the case of simple tests of variable status, it is recommended to use the IsGood, IsBad and IsUncertain properties.

TimeStamp

              DateTime TimeStamp { get; }

ReadOnly Property TimeStamp As Date

This property returns the time stamp of the historical value.

Value

object Value { get; }

ReadOnly Property Value As Object

This property returns the historical value of the process variable registered at the time specified by the TiemStamp property.


3.8. IAlarm Interface

Home > Scripts > 3. Object Model of Scripts > 3.9. IAlarm Interface

3.9. IAlarm Interface

The IAlarm interface allows you to obtain information concerning the definition of alarm and its current status. It also allows controlling the alarm status: the alarm notification, termination and acknowledge.

The reference to the IAlarm interface for the selected alarm can be obtained by calling the GetAlarm function from the IApplication interface.


IAlarm_Interface_Properties

3.9.1. Properties

AlarmState

AlarmState AlarmState { get; }

ReadOnly Property AlarmState As AlarmState

This property returns an object of AlarmState class from which the information regarding the current state of the alarm monitored via the reference to the IAlarm interface can be read out. If the active alarm log contains more than one event, the latest event status is returned.

Definition

AlarmProperties Definition { get; }

ReadOnly Property Definition As AlarmProperties

This property returns an object of AlarmProperties class from which the information regarding the definition of the alarm monitored via the reference to the IAlarm interface can be read out.

Domain

string Domain { get; }

ReadOnly Property Domain As String

This property returns an alarm domain name which includes the alarm monitored via the reference to the IAlarm interface.

Id

string Id { get; }

ReadOnly Property Id As String

This property returns the ID of the alarm monitored via reference to the IAlarm interface.


IAlarm_Interface_Methods

3.9.2. Methods

Accept

bool Accept();

Function Accept() As Boolean

This method is used to acknowledge the alarm. It acts the same way as the alarm acknowledgement done by the operator using the alarm table. This function returns the initial execution status. A value of true means that the operation has been accepted for execution. Acknowledgement can not be completed due to failure in meeting conditions checked in later phases of the operation execution, such as lack of workstation permissions for acknowledge of the alarms of the domain.

Cancel

bool Cancel(params object[ ] aParameters);

bool Cancel(DateTime aEndTime, params object[ ] aParameters);

Function Cancel(ByVal ParamArray aParameters( ) As Object) As Boolean

Function Cancel(ByVal aEndTime As Date , ByVal ParamArray aParameters( ) As Object) As Boolean

This method allows reporting the alarm event termination. An optional aParameters parameter table is used to provide additional data related with the event. The significance of these data is entirely up to application designer. The call made using the aEndTime parameter allows explicit specification of the event time. If the call does not include the aEndTime parameter the event time is automatically set at the current moment. The method can be performed only for alarms that belong to an external alarm diagnosis strategy.

This function returns the initial execution status. A value of true means that the operation has been accepted for execution. However, the declaration may be ignored because of the failure in meeting conditions checked in later phases of the operation execution, e.g. the workstation is not an active domain controller and the normal external strategy (not global) has been used.

Raise

bool Raise(params object[ ] aParameters);

bool Raise(DateTime aStartTime, params object[ ] aParameters);

Function Raise(ByVal ParamArray aParameters( ) As Object) As Boolean

Function Raise(ByVal aStartTime As Date , ByVal ParamArray aParameters( ) As Object) As Boolean

This method allows reporting the alarm event beginning. An optional aParameters parameter table is used to provide additional data related with the event. The significance of these data is entirely up to application designer. The call made using the aStartTime parameter allows explicit specification of the event time. If the call does not include the parameter the event time is automatically set at the current moment. The method can be performed only for alarms that belong to an external alarm diagnosis strategy.

This function returns the initial execution status. A value of true means that the operation has been accepted for execution. However, the declaration may be ignored because of the failure in meeting conditions checked in later phases of the operation execution, e.g. the workstation is not an active domain controller and the normal external strategy (not global) has been used.

RegisterStateEvent

void RegisterStateEvent(AlarmEvent aFunction);

Sub RegisterStateEvent(ByVal aFunction As AlarmEvent)

This function is used to register the callback function to be called on every change of the controlled alarm state. This applies to both alarm beginning and termination events as well as status changes caused by the operator actions, such as the alarm acknowledgement.

The aFunction parameter specifies the alarm monitoring function - it must be compatible with the AlarmEvent delegate.

delegate void AlarmEvent(string aDomain, string aAlarm, AlarmStateaAlarmState, AlarmEventType aEventType);

Delegate Sub AlarmEvent(ByVal aDomain As String, ByVal aAlarm As String, ByVal aAlarmState As AlarmState ,ByVal aEventType As AlarmEventType)

When the monitoring function is called the three parameters are transmitted to it. The aDomain and aAlarm parameters specify correspondingly the domain name and Alarm ID, which is concerned by the callback function call. The aAlarmState parameter forwards the object from which the current alarm state may be readout. The AEventType parameter specifies the type of event. The AlarmEventType enumeration type takes the following values: AlarmBegin (detection of the alarm beginning), AlarmEnd (detection of the alarm end), AlarmManagement (change of state resulting from the operator's actions, such as the alarm acknowledgement), DomainStart(activating the domain), DomainStop(stopping the domain).

The monitoring function can be unregistered using the UnegisterStateEvent method.

Example:

C#

IApplication application;

void AlarmFun(string aDomain, string aAlarm, AlarmState aAlarmState,

AlarmEventType aEventType)

{

// kod funkcji zwrotnej

if (aEventType == AlarmEventType.AlarmBegin)

application.ReportMessage(EvoMessageType.Info, aAlarm + ": alarm rozpoczęty");

}

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

IAlarm ia = application.GetAlarm("Blok1","DemoB1");

ia.RegisterStateEvent(AlarmFun);

return false;

}

VB

Dim application As IApplication

Sub AlarmFun(aDomain As String, aName As String, aAlarmState As AlarmState, aEventType As AlarmEventType)

' kod funkcji zwrotnej

If aEventType = AlarmEventType.AlarmBegin Then

application.ReportMessage(EvoMessageType.Info, aName & ": alarm rozpoczęty")

End If

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication

Dim ia As IAlarm

ia = application.GetAlarm("Blok1", "DemoB1")

ia.RegisterStateEvent(AddressOf AlarmFun)

Return False

End Function

The above code creates the IAlarm object for the DemoB1 alarm from the Blok1 domain. Then, the AlarmFun monitoring function is recorded, which checks the type of event and records the information on alarm beginning events in the message log every time the alarm state is changed.

UnregisterStateEvent

void UnregisterStateEvent();

Sub UnregisterStateEvent()

Unregistering the alarm state monitoring function, which was previously registered using the RegisterStateEventfunction.


3.9. AlarmState Object

Home > Scripts > 3. Object Model of Scripts > 3.10. AlarmState Class

3.10. AlarmState Class

The AlarmState object stores information about the current alarm state. The AlarmState objects can be obtained via the AlarmState property of the IAlarm interface. They are also provided as a parameter of the alarm state monitoring function, which is registered using the RegisterStateEvent function of the IAlarm interface.

Access to the alarm states is provided based on the active alarm log - this means that the details of the alarm status are available only if the event relating to this alarm exists in the active alarm log. When the data are not available, the IsActive property object is false.


AlarmState_Class_Properties

3.10.1. Properties

AcceptanceOperatorId

string AcceptanceOperatorId { get; }

            ReadOnly Property AcceptanceOperatorId As String

This property returns the ID of the user who acknowledged the alarm event.

AcceptanceStationName

string AcceptanceStationName { get; }

ReadOnly Property AcceptanceStationName As String

This property returns the name of workstation on which the alarm event was acknowledged.

AcceptanceTimeStamp

DateTime AcceptanceTimeStamp { get; }

ReadOnly Property AcceptanceTimeStamp As Date

This property returns the time the alarm event was acknowledged by the user.

BeginDetectionTimeStamp

DateTime BeginDetectionTimeStamp { get; }

ReadOnly Property BeginDetectionTimeStamp As Date

This property returns the time at which the beginning of the alarm event was detected.

BeginExprValue

object BeginExprValue { get; }

ReadOnly Property BeginExprValue As Object

This property returns the value of the expression associated with the alarm, calculated at the alarm beginning detection.

BeginTimeStamp

DateTime BeginTimeStamp { get; }

ReadOnly Property BeginTimeStamp As Date

This property returns the time of the alarm event beginning

EndDetectionTimeStamp

DateTime EndDetectionTimeStamp { get; }

ReadOnly Property EndDetectionTimeStamp As Date

This property returns the time at which the end of the alarm event was detected.

EndExprValue

object EndExprValue { get; }

ReadOnly Property EndExprValue As Object

This property returns the value of the expression associated with the alarm, calculated at the alarm end detection.

EndTimeStamp

DateTime EndTimeStamp { get; }

ReadOnly Property EndTimeStamp As Date

This property returns the time of the alarm event end.

FormattedBeginText

string FormattedBeginText { get; }

ReadOnly Property FormattedBeginText As String

This property returns the text describing the beginning of the alarm event. All dynamically created inserts associated with the call parameters are generated within the text returned.

FormattedEndText

string FormattedEndText { get; }

ReadOnly Property FormattedEndText As String

This property returns the text describing the end of the alarm event. All dynamically created inserts associated with the call parameters are generated within the text returned.

IsAccepted

bool IsAccepted { get; }

ReadOnly Property IsAccepted As Boolean

This property determines whether the alarm event has been acknowledged by the user.

IsActive

bool IsActive { get; }

ReadOnly Property IsActive As Boolean

This property determines whether the event entry relating to the alarm monitored by the object exists in the active alarm log. The value of false means that there is no information about the alarm and all the other properties of AlarmState object have indefinite values.

IsExcluded

bool IsExcluded { get; }

ReadOnly Property IsExcluded As Boolean

This property determines whether the alarm is excluded from handling. The excluded alarms are not shown in the alarm tables, but their details are stored in the active alarm log and are available for use in the scripts.

IsFinished

bool IsFinished { get; }

ReadOnly Property IsFinished As Boolean

This property determines whether the alarm stored in the active alarm log has already been ended. Depending on the configuration, the active alarm log is able to keep the details of the event that has already been ended. The alarm should be considered as active (not ended) if the IsActive property is true and IsFinished property is false.

WasFiltered

bool WasFiltered { get; }

ReadOnly Property WasFiltered As Boolean

This property determines whether an alarm event recorded in the log was subjected to the time filter mechanisms.


3.10 AlarmProperties Object

Home > Scripts > 3. Object Model of Scripts > 3.11. AlarmProperties Class

3.11. AlarmProperties Class

The AlarmProperties object stores information about the alarm definition. The object can be obtained via the Definition property of the IAlarm interface.


AlarmProperties_Class_Properties

3.11.1. Properties

Action

string Action { get; }

ReadOnly Property Action As String

This property returns the contents of the operator action defined for the alarm.

DetectionParameters

string DetectionParameters { get; }

ReadOnly Property DetectionParameters As String

This property returns the Detection parameters attribute of alarm definition. If the external alarm detection strategy is carried out by means of script mechanism, it is possible to use the DetectionParameters as the information source specifying how the alarm state is to be detected.

BeginText

string BeginText { get; }

ReadOnly Property BeginText As String

This property returns the text describing the beginning of the alarm in the original form used in the alarm definition - formatting inserts {} are not converted.

EndText

string EndText { get; }

ReadOnly Property EndText As String

This property returns the text describing the end of the alarm in the original form used in the alarm definition - formatting inserts {} are not converted.

Id

string Id { get; }

ReadOnly Property Id As String

This property returns the ID of the alarm, which attributes are stored in the object.

IsStartOnly

bool IsStartOnly { get; }

ReadOnly Property IsStartOnly As Boolean

This property returns information specifying if the alarm belongs to the notification category. Alarms of this category do not have the events assigned to their ends.

Priority

int Priority { get; }

ReadOnly Property Priority As Integer

This property returns the alarm priority (importance). The following values are available:

· 0 - critical alarm

· 1 - urgent alarm

· 2 - alert alarm

· 3 - warning

· 4 - message

Strategy

string Strategy { get; }

ReadOnly Property Strategy As String

This property returns the name of the alarm detection strategy.


AlarmProperties_Class_Methods

3.11.2. Methods

GetAlarmAttribute

object GetAlarmAttribute(string aAttributeId);

Function GetAlarmAttribute (ByVal aAttributeId As String) As Object

This function returns a definition of the attribute whose ID is specified by the aAttributeId parameter. This command allows for loading the value of any attribute, including a grouping attribute.


3.11 TrendPatternPoint Object

Home > Scripts > 3. Object Model of Scripts > 3.12. TrendPatternPoint Class

3.12. TrendPatternPoint Class

The TrendPatternPoint object defines a single point of pattern trend. The array of pattern trend points can be downloaded using the GetTrendPatternPoints method of the IApplication interface.


Home > Scripts > 3. Object Model of Scripts > 3.12. TrendPatternPoint Class > 3.12.1. Properties

3.11.1. Properties


TrendPatternPoint_Class_Properties

3.12.1. Properties

TimeStamp

TimeSpan TimeStamp { get; }

ReadOnly Property TimeStamp As System.TimeSpan

This property specifies the pattern trend point - specified as the time interval from the beginning of the curve.

Value

double Value { get; }

ReadOnly Property Value As Double

This property determines the value of the pattern trend point.


AsalertAccess Class

Home > Scripts > 3. Object Model of Scripts > 3.13. AsalertAccess Class

3.13. AsalertAccess Class

An object of the AsalertAccess class allows for sending an alert (notification) through the AsAlert application. Access to the AsalertAccess object can be obtained by means of the Asalert properties of the IApplication interface.


AsalertAccess_Class_Methods

3.13.1. Methods

Send

bool Send(string aTo, string aFrom, string aSubject, string aMessage);

Function Send (ByVal aTo As String, ByVal aFrom As String, ByVal Subject As String, ByVal aMessage As String) As Boolean

The Send command allows for sending an alert through the AsAlert application.

The aTo parameter defines the name of the recipient to whom the alert is to be sent. The recipient must be previously defined in the AsAlert application.

The aFrom, aSubject and aMessage parameters specify the alert content, respectively: the sender's name, alert subject and alert content.

This command returns the status of successful operation execution.

Prior to execution of the Send command, the SetAccessData command should be used in order to define the communication parameters with the AsAlert application (if different from the default ones).

SetAccessData

void SetAccessData(string aMachineName, string aUserName, string aPassword);

Sub SetAccessData(ByVal aMachineName As String, ByVal aUserName As String, ByVal aPassword As String)

This command is used to define the communication parameters with the AsAlert application server. The aMachineName parameter specifies the system name of the computer on which the AsAlert application is installed. The default blank value means communication with the local server installed on the same computer as the application.

The aUserName parameter allows to specify the name of the user defined in the AsAlert application, to whom an alert will be sent. The default user name is AsixEvo. Using the aPassword parameter causes a password prompt to appear (by default - no password). In order to ensure proper operation, an equivalent user should be created in the AsAlert application.


AsbaseAccess Class

Home > Scripts > 3. Object Model of Scripts > 3.14. AsbaseAccess Class

3.14. AsbaseAccess Class

An object of the AsbaseAccess class provides access to the data archived in the database of the AsBase module. Access to the AsbaseAccess object can be obtained by means of the Asbase properties of the IApplication interface.

In order to ensure proper operation of the AsbaseAccess object it is necessary to configure access rights to the Asbase database in the Data sources tab of the workstation settings operating panel.


AsbaseAccess_Class_Commands

3.14.1. Commands

ExecuteQuery

System.Data.DataTable ExecuteQuery(string aQuery);

Function ExecuteQuery(ByVal aQuery As String) As System.Data.DataTable

This command allows for sending any query defined in the aQuery parameter on the basis of the AsBase data. The database structure and the nomenclature used in the columns can be found in the documentation of the Asbase module.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.

NOTE

Although typically this command is designed to handle queries of Select type, it is also possible to execute commands changing the data in the database. However, great caution is advised &endash; incorrect use may lead to the loss of all data stored.

ReadArchive

System.Data.DataTable ReadArchive(string aArchiveId, string aDetailsDataSourceId, int aRecordCount, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, string aOrderPhrase);

Function ReadArchive(ByVal aArchiveId As String, ByVal aDetailsDataSourceId As String, ByVal aRecordCount As Integer, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data stored in the registration set of the ID specified in the aArchiveId parameter. Optionally, it is possible to add the data from a related second registration set or recipe group, defined by the ID specified in the aDetailsDataSourceId parameter. The relation between both the data sources must be provided for in the Asbase application.

The aRecordCount parameter allows to reduce the number of returned records &endash; 0 value means no limitation.

The aStartTimeUtc and aEndTimeUtc are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase allows to optionally change the order of records. As standard, the records are organised in accordance with the registration time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.

ReadLoads

System.Data.DataTable ReadLoads(string aRecipesId, string aDetailsDataSourceId, string aRecipeName, int aRecordCount, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, string aOrderPhrase);

Function ReadLoads(ByVal aRecipeId As String, ByVal aDetailsDataSourceId As String, ByVal aRecipeName As String, ByVal aRecordCount As Integer, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data stored in the table registering the recipe load events from the recipe group of the ID specified in the aRecipeId parameter. Optionally, it is possible to add the data from a related registration set, defined by the ID specified in the aDetailsDataSourceId parameter. The relation between both the data sources must be provided for in the Asbase application.

The aRecipeName parameter allows to reduce the number of the records read to those which refer to the recipe of a given name. In this parameter special symbols in SQL notation can be used (* and ?) in order to select more than one name. A blank parameter (or %) means no selection by recipe names.

The aRecordCount parameter allows to reduce the number of returned records &endash; 0 value means no limitation.

The aStartTimeUtc and aEndTimeUtc are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase allows to optionally change the order of records. As standard, the records are organised in accordance with the registration time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.

ReadRecipes

System.Data.DataTable ReadRecipes(string aRecipesId, string aRecipeName, int aRecordCount, string aWherePhrase, string aOrderPhrase);

Function ReadRecipes(ByVal aRecipeId As String, ByVal aRecipeName As String, ByVal aRecordCount As Integer, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the recipes stored in the recipe definition table for a recipe group of the ID specified in the aRecipeId parameter.

The aRecipeName parameter allows to reduce the number of the records read to those which refer to the recipe of a given name. In this parameter special symbols in SQL notation can be used (* and ?) in order to select more than one name. A blank parameter (or %) means no selection by recipe names.

The aRecordCount parameter allows to reduce the number of returned records &endash; 0 value means no limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the recipe names. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.


AsloggerAccess Class

Home > Scripts > 3. Object Model of Scripts > 3.15. AsloggerAccess Class

3.15. AsloggerAccess Class

An object of the AsloggerAccess class provides access to the data archived in the database of the AsLogger module. It is also possible to save new series. Access to the AsloggerAccess object can be obtained by means of the Aslogger properties of the IApplication interface.

Directly after obtaining a correct AsloggerAccess object, its SetDataAccess command should be executed in order to specify the access parameters to the database of the AsLogger module.

The AsloggerAccess class provides a number of commands used to read out the recorded measurement series. All these commands return information in the objects of the standard DataTable class. This allows, among others, to directly use the read out data in the script report generation system.

The AsloggerAccess class also allows to save new measurement series. To this end, the CreateSeries command is used, returning an object of the AsloggerSeries class, with the use of which data series are recorded in the database.


AsloggerAccess_Class_Commands

3.15.1. Commands

CreateSeries

AsloggerSeries CreateSeries(string aPlanName, string aDescription, DateTime aSeriesTimeUtc, int aSamplingTime);

Function CreateSeries(ByVal aPlanName As String, ByVal aDescription As String, ByVal aSeriesTimeUtc As DateTime, ByVal aSamplingTime As Integer) As AsloggerSeries

This command is used in the process of saving new measurement series - it creates an object of the AsloggerSeries class, which is then used for the construction of the series content and its saving.

The aPlanName parameter defines the name of the plan to which the series will belong. The aDescription parameter is used to add a description to the series.

The aSeriesTimeUtc parameter defines the time stamp of the series to be saved in the UTC standard, and the aSamplingTime parameter specifies the time period between consecutive values of the series expressed in microseconds.

NOTE

In order to add a series to the database, a registration plan including all constituent points must be defined previously in the database of the AsLogger module.

ExecuteQuery

System.Data.DataTable ExecuteQuery(string aQuery);

Function ExecuteQuery(ByVal aQuery As String) As System.Data.DataTable

This command allows for sending any query defined in the aQuery parameter on the basis of the AsBase data. The command returns an object of the DataTable class including the records read.

Using this command requires the knowledge of the AsLogger data base structure. This command should only be used when none of the special commands of the AsLoggerAccess class is sufficient.

NOTE

Although typically this command is designed to handle queries of Select type, it is also possible to execute commands changing the data in the database. However, great caution is advised &endash; incorrect use may lead to the loss of all data stored.

ReadPlans

System.Data.DataTable ReadPlans(string aPlanName, string aWherePhrase);

Function ReadPlans(ByVal aPlanName As String, ByVal aWherePhrase As String) As System.Data.DataTable

This command is used to read the information regarding registration plans defined in the database of the AsLogger module. The aPlanName parameter is used to define a registration plan name. Transmission of a blank value (null or Nothing) returns the data for all the registration plans. In this parameter special symbols in SQL notation can be used (* and ?) in order to select a plan subgroup.

If selection by plan names is insufficient, the aWherePhrase parameter can be used. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

ReadPoints

System.Data.DataTable ReadPoints(string aPlanName, string aWherePhrase);

Function ReadPoints(ByVal aPlanName As String, ByVal aWherePhrase As String) As System.Data.DataTable

This command is used to read the information regarding the points included in a registration plan of the name defined in the aPlanName parameter.

As standard, the data of all plan points is returned. The returned information can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure. In particular, the value of the Name = ’P1’ parameter denotes a query about the configuration data of the point called P1 only.

ReadSeries

System.Data.DataTable ReadSeries(string aPlanName, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, bool aAddLocalTimeColumn);

Function ReadSeries(ByVal aPlanName As String, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean) As System.Data.DataTable

This command is used to read the information regarding the the recorded measurement series for a registration plan of the name defined in the aPlanName parameter.

The aStartTimeUtc and aEndTimeUtc parameters are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). Transmission of a blank value (null or Nothing) means no time limitation.

As standard, the data of all series from the period defined by the aStartTime and aEndTime parameters is returned. The returned information can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column BeginTimeLocal returning the times of the beginning of series as local time. As standard, only UTC format is available in the BeginTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The IdSerie column is of particular importance in the set of columns included in the DataTable object returned by the command. It includes the series IDs which can be later on used to read the individual series using the ReadSeriesData command.

ReadSeriesAggregates

System.Data.DataTable ReadSeriesAggregates(string aPlanName, SeriesAggregateId aAggregate, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, bool aAddLocalTimeColumn, params string[] aPointsNames);

Function ReadSeriesAggregates(ByVal aPlanName As String, ByVal aAggregate As SeriesAggregateId, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean, ByVal ParamArray aPointsNames() As String) As System.Data.DataTable

This command is used to read the aggregates of the recorded measurement series for a registration plan of the name defined in the aPlanName parameter.

The aAggregate parameter specifies the aggregate type:

SeriesAggregateId.SeriesMinimum - minimum value in a series

SeriesAggregateId.SeriesMaximum - maximum value in a series

SeriesAggregateId.SeriesAverage - average value of a series

The aStartTimeUtc and aEndTimeUtc parameters are used to specify the time period of the measurement series for which aggregates are loaded. Time is reported as Coordinated Universal Time (UTC). Transmission of a blank value (null or Nothing) means no time limitation.

As standard, the aggregates of all series from the period defined by the aStartTime and aEndTime parameters are returned. The set of series can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column SampleTimeLocal returning the times of the aggregates as local time. As standard, only UTC format is available in the SampleTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The aPointsNames parameter is used to transfer the names of the points in a series, for which aggregates are to be loaded. If this parameter is not used, then the aggregates of all points will be loaded.

ReadSeriesData

System.Data.DataTable ReadSeriesData(string aPlanName, AggregateId aAggregate, int? aSeriesId, string aWherePhrase, bool aAddLocalTimeColumn, params string[] aPointsNames);

Function ReadSeriesData(ByVal aPlanName As String, ByVal aAggregate As AggregateId, ByVal aSeriesId As Integer?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean, ByVal ParamArray aPointsNames() As String) As System.Data.DataTable

This command is used to read the values recorded in a measurement series defined by the plan name ( aPlanName parameter) and the ID of the series (aSeriesId parameter). A set of correct series IDs can be obtained using the ReadSeries command. Transmission of a blank value in the aSeriesId parameter denotes a readout of the values for the last series recorded.

The aAggregate parameter specifies the type of the readout point values:

AggregateId.RawData - raw data

AggregateId.Minimum - periodic minimum value (calculated based on 100 subsequent raw values)

AggregateId.Maximum - periodic maximum value (calculated based on 100 subsequent raw values)

AggregateId.Average - periodic average value (calculated based on 100 subsequent raw values)

AggregateId.SeriesMinimum - minimum value in a series

AggregateId.SeriesMaximum - maximum value in a series

AggregateId.SeriesAverage - average value of a series

The aWherePhrase parameter allows to additionally limit the set of returned values. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column SampleTimeLocal returning the sampling times as local time. As standard, only UTC format is available in the SampleTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The aPointsNames parameter is used to transfer the names of the points in a series, for which values are to be loaded. If this parameter is not used, then the values of all points will be loaded.

SetAccessData

void SetAccessData(string aServerName, string aDatabaseName);

Sub SetAccessData (ByVal aServerName As String, ByVal aDatabaseName As String)

The SetAccessData command should always be executed as the first one after obtaining access to the AsloggerAccess object. It is used to specify the location of the database of the AsLogger module. The aServerName parameter specifies the name of the SQL server, and the aDatabaseName parameter specifies the name of the database.


AsloggerSeries Class

The object of the AsloggerSeries class is used to create new measurement series. Objects in this class are developed with the CreateSeries command of the AsloggerAccess class.

Typically, after creating the series object, the values of the series for individual points of the registration plan are added to it, using the AddPointValues command. After loading of all values for all the points, the Save command should be executed, which will save a complete measurement series in the database.


AsloggerSeries_Class_Commands

3.16.1. Commands

AddPointsRecord

bool AddPointsRecord(params System.Collections.ICollection[] aValues);

Function AddPointsRecord(ByVal ParamArray aValues() As System.Collections.ICollection) As Boolean

This command is used to add point values to the series in the record mode - that is, in a single call one value is added to each point of the series. Prior to execution of the AddPointsRecord command, the points for which values will be added should be defined. To this end, the AddPointValues command with a blank aValues parameter should be executed a required number of times.

The aValues parameter of the AddPointsRecord command is used to transfer a record of point values. It is possible to transfer any collection of objects (a table being the simplest case), which can be converted to a value of the double type. Subsequent elements of a collection specify the values for the points of the series in accordance with the order in which they were added using the AddPointValues command.

AddPointValues

bool AddPointValues(string aPointName, System.Collections.ICollection aValues);

Function AddPointValues(ByVal aPointName As String, Optional ByVal aValues As System.Collections.ICollection = Nothing) As Boolean

This is a basic command used to add points together with the series data to a measurement series.

The aPointName parameter specifies the point name &endash; a point of this name must be defined in the registration plan to which the series belongs. The aValues parameter is used to transfer the series values for a point. It is possible to transfer any collection of objects (a table being the simplest case), which can be converted to a value of the double type. Subsequent elements of the collection specify subsequent point values for a measurement series.

For the process of adding point values, the following rules apply:

a) The command can be used repeatedly for the same point name &endash; new values will be added to the data entered previously.

b) If data for more than one point is added, then the final number of values for all the points must be identical.

c) It is not necessary to add values to all the points defined in the registration plan. The points with no values added will have the NULL value assigned in all series data.

Save

bool Save();

Function Save() As Boolean

This command is used to save the content of a measurement series in the database. Prior to execution of the command, its content should be added to the series using the AddPointValues and AddPointsRecord commands.


AsserviceAccess Class

Home > Scripts > 3. Object Model of Scripts > 3.17. AsserviceAccess Class

3.17. AsserviceAccess Class

An object of the AsserviceAccess class provides access to the data archived in the database of the AsService module. Access to the AsserviceAccess object can be obtained by means of Asservice properties of the IApplication interface.

In order to ensure proper operation of the AsserviceAccess object it is necessary to configure access rights to the AsService database in the Data sources tab of the workstation settings operating panel.

This class provides two commands for the readout of counter status and definitions: ReadArcCounters and ReadCounters. The set of returned information is similar. However, the below differences exist:

a) The ReadCounters command returns a single record for each counter. Reset data refers to the last reset event or it is filled with blank values.

b) The ReadArcCounters command returns records only for those counters for which a reset event has been recorded. The number of records for each counter results from the number of reset events recorded.


AsserviceAccess_Class_Commands

3.17.1. Commands

ReadArcCounters

System.Data.DataTable ReadArcCounters(string aCounterId, string[] aFieldNames, DateTime? aStartTime, DateTime? aEndTime, string aWherePhrase, string aOrderPhrase);

Function ReadArcCounters(ByVal aCounterId As String, ByVal aFieldNames() As String, ByVal aStartTime As DateTime?, ByVal aEndTime As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to read reset history of the counters of the IDs specified in the CounterId parameter. In the content of this parameter special symbols in SQL notation should be used (* and ?) in order to select more than one counter. A blank parameter (or %) denotes data readout for all the counters.

A table with the counter field names transferred in the aFieldNames parameter is used to specify which data referring to the counters is to be readout from the database. It is most convenient to use the field names defined in the AsServiceAcces.Names static class.

The aStartTime and aEndTime parameters are used to specify the time period of the counters' reset for the returned records. The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the counters' IDs and the reset time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read.

ReadCounters

System.Data.DataTable ReadCounters(string aCounterId, string[] aFieldNames, LimitCheckMode aLimitMode, string aWherePhrase, string aOrderPhrase);

Function ReadCounters(ByVal aCounterId As String, ByVal aFieldNames() As String, ByVal aLimitMode As LimitCheckMode, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data describing the definition, current status and the last reset of the counters of the IDs specified in the CounterId parameter. In the content of this parameter special symbols in SQL notation should be used (* and ?) in order to select more than one counter. A blank parameter (or %) denotes data readout for all the counters.

A table with the counter field names transferred in the aFieldNames parameter is used to specify which data referring to the counters is to be readout from the database. It is most convenient to use the field names defined in the AsServiceAcces.Names static class.

The aLimitMode parameter allows to limit the set of counters to those which exceed the currently selected alarm limits.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the counters' IDs. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read.

Example:

C#

DataTable dt = aApplication.Asservice.ReadCounters("U%", new string[] {

AsserviceAccess.Names.Identifier,

AsserviceAccess.Names.Name,

AsserviceAccess.Names.Value,

AsserviceAccess.Names.OperatingLevel},

AsserviceAccess.LimitCheckMode.Operating, null, null);

VB

Dim names As String() = { _

AsserviceAccess.Names.Identifier, _

AsserviceAccess.Names.Name, _

AsserviceAccess.Names.Value, _

AsserviceAccess.Names.OperatingLevel }

Dim dt As DataTable = aApplication.Asservice.ReadCounters("U%", names, _

AsserviceAccess.LimitCheckMode.Operating, Nothing, Nothing)

The above call reads the data from all the counters whose ID starts from the letter U and whose operating limit is exceeded. The readout fields are the ID and counter's name, the current counter value and operating limit.


AsserviceAccess.Names Class

Home > Scripts > 3. Object Model of Scripts > 3.18. AsserviceAccess.Names Class

3.18. AsserviceAccess.Names Class

The AsServiceAccessNames class is a static class which provides a set of texts describing the names of all counter fields that can be extracted using the ReadCounters and ReadArcCounters commands.

Fields referring to the counter definition and current status
ID | Counter ID
Name | Text description of a counter
CounterType | Counter type
CounterTypeDesc | Text description of a counter type
VarName | The name of the process variable on the basis of which the counter value is calculated
AggrName | The name of the aggregate used for the calculations
MainCounter | True/False flag specifying if the counter is the main counter of the device
RefreshFreq | Refresh period of the counter value
StartValue | Initial counter value
Value | Current counter value
StartTime | Time of the count start
NoValueTime | Period of time during which no correct source variable values have been read
LastReadTime | Time of the last counter readout
NextReadTime | Time of the next counter readout planned
OperatingLevel | Operating limit value
CyclicOperatingLevel | True/False flag specifying if the operating limit value is to be reconstructed after each reset
WarningLevel | Warning limit value
WarningLevel2 | Value of the second warning limit
AutoResetReason | Reason for automatic counter reset
AutoResetReasonDesc | Text description of the reason for automatic counter reset
OperatingTask | Operating task related to exceeding of the counter limit
OperatingTaskDesc | Text description of an operating task
Fields referring to the definition of the device to which the counter belongs
DeviceId | ID of the device
DeviceName | Name of the device
DeviceDesc | Text description of the device
DeviceSymbol | Alphanumeric symbol of the device
DeviceRegistryNum | Registry number of the device
DeviceFactoryNum | Factory number of the device
DeviceProdYear | Year of production of the device
DevicePurchaseDate | Date of purchase of the device
DevicePowerInst |
DeviceDimensions | Dimensions of the device
DeviceMass | Total weight of the device
DeviceVirtual | True/False flag specifying if the device is virtual
DeviceMachine | Name of the machine to which the device belongs
DeviceMachineDesc | Text description of the machine
DeviceDepartment | Name of the department to which the device belongs
DeviceDepartmentDesc | Text description of the department
DeviceProducer | Producer of the device
DeviceProducerDesc | Text description of the producer
DeviceSupplier | Supplier of the device
DeviceSupplierDesc | Text description of the supplier
DeviceLine | Name of the line to which the device belongs
DeviceLineDesc | Text description of the line
DeviceGroup | Name of the group to which the device belongs
DeviceGroupDesc | Text description of the device group
DevicePowerInst | Power supply of the device
DevicePowerType | Type of power supply of the device
DevicePowerTypeDesc | Text description of the type of power supply
DeviceStatus | Status of the device
DeviceStatusDesc | Text description of the device status
DeviceTechCond | Technical condition of the device
DeviceTechCondDesc | Text description of the device technical condition
Fields describing the last reset of the counter
ArcEndValue | Value of the counter at the time of reset
ArcStartValue | Initial counter value
ArcStartTime | Time of the counter start-up
ArcEndTime | Time of the counter reset
ArcNoValueTime | Period of time during which no correct source data has been read
ArcProtocolNo | Number of the protocol connected with the counter reset
ArcExecutedBy | Operator performing reset
ArcResetReason | Reason for the counter reset
ArcResetReasonDesc | Text description of the reason for the counter reset


Welcome

Home > Start_up_of_WWW_Applications

>> Help for Asix

www.asix.com.pl

Asix.Evo -

- Start-up of WWW Applications


Requirements

Home > Start_up_of_WWW_Applications > 1. Requirements

1. Requirements

Asix.Evo to be launched in the web browser requires the support of the Windows (XP SP2 or later) operating system or server system (Windows Server 2003 or later). Additionally, it requires installation of the Microsoft .NET 4 Framework 4.0 platform and the Internet Explorer browser 6 or higher.


First Start-up

Home > Start_up_of_WWW_Applications > 2. First Start-up

2. First Start-up

Configure suitably the web browser and the .Net platform on the PC on which Asix.Evo in the browser version is launched for the first time. The configuration can be run automatically with the use of BrowserConfigurator.exe. program. This program is available on the web server where Asix.Evo application for web browsers has been published.

a. Open the Asix.Evo home page on a suitable server by entering in the Internet Explorer the following address http://<SERVER_ADDRESS>/EvoNet, where <SERVER_ADDRESS> is the physical IP address or the server name on which the application has been published.

Fig. Home Page Window of the Asix.Evo System Web Application Server.

b. From the Asix.Evo main page download and save on the hard drive (e.g. on the desktop) BrowserConfigurator.exe program, selecting the option Save Target As… on its hyperlink from the context menu.

c. Run BrowserConfigurator.exe from the location where it has been saved. Do not run this application directly from the browser - even if this option is available. For complete and proper configuration, administrative privileges on the local PC are required.

d. In the program edit box enter the address or name of the server on which Asix.Evo has been published, then press the Apply button.

Fig. Web Browser Configuration Window.

e. When the user account control window is displayed, allow it to make changes to the computer by clicking Yes. If the current user does not have administrative privileges, enter in this window the login and password of a user with administrative privileges.

Fig. User Account Control Window.

f. Once the configuration is completed and the window informing about successful completion is displayed, close the window and then close IE window. In case more IE browser windows have been opened or a window with many tabs has been opened, all of them should be closed. In case the configuration application reports an error or informs that the configuration cannot be completed, please contact the system or web server administrator.

g. Open the Internet Explorer browser, enter the address as in point a) and then run Asix.Evo application clicking on one of the hyperlinks of the applications published. Each application can be run in Lite or Pro mode. The Lite mode enables to run the application in a read-only mode, without the possibility to control process variables, confirm or exclude alarms and execute other operations influencing the system operation. The Pro mode allows to perform all the above. Availability of these modes depends on the number of Pro and Lite web licenses purchased.

h. The first start-up of the application on a given PC can take up to a few minutes, since the browser must download from the server the current application version altogether with the definition files of the application published.

i. During the first start-up of the application in the browser, the Windows operating system can require acceptance of the Askom software certificate. The Run button should be pressed.

j. In case the application does not open or reports an error during start-up, please contact the system or web server administrator.


Checking Used and Available Web Licenses

Home > Start_up_of_WWW_Applications > 3. Checking Used and Available Web Licenses

3. Checking Used and Available Web Licenses

By entering the http://<SERVER_ADDRESS>/EvoNet/clientsinfo.aspx address in the Internet Explorer browser the user gains access to the website providing information about the number of free and available web licenses (of Lite and Pro type) and detailed information about the PCs currently using these licenses.

Fig. Window with Information About Web Licenses.


Welcome

Home > How to Do It

>> Help for Asix

www.asix.com.pl

Asix.Evo - How to Do It


1.1 Starting the Program in the Architect Mode

Start the AsixEvo.exe program without any parameters. In the opened window of the architect mode, open the relevant application or create a new one using the commands from the File menu.

Alternatively, enter the name of the application definitional directory in the start up command of the Asix.Evo.exe program.


1.2 Starting the Application in the Run Mode

Run the AsixEvo.exe application transferring the name of the application definitional directory and the /run switch in the parameters, e.g.

AsixEvo / run c: \ asixapp \ EC

It is recommended to create a shortcut to the application using the shortcut wizard. The Shortcuts Builder command in the Tools menu of the architect mode window runs the wizard.


1.3 Switching from the Run Mode to Edit Mode

Open the control panel window using the key combination Ctrl-Shift-F1.

Fig. The Control Panel Window - the Work Mode Button Contextual Commands.

Select a new operation mode with the Work Mode button contextual commands.

The Diagrams Edit Mode and the Windows Edit Mode commands switch the currently open diagrams or windows to the simplified edit mode. Other changes in the application will not be possible. The return to the executive mode will occur at the moment when the editing toolbox window is closed.

The Architect mode command forces movement to the AsixEvo.exe standard window with full editing possibilities. The return to the executive mode will occur at the moment when the Run application command in the main menu of the architect mode window is executed.

The opening functions for the control panel and the operation mode switching can be integrated into the application diagrams by the use of the SwitchWorkMode and ShowControlPanel operator actions.


1.4 Editing Large Windows and Diagrams

For two-monitor application it can be decided to undock the work panels of Properties Window and Application Explorer type with the use of the mouse, and to move them to the other monitor. This makes free space on the primary monitor.

An alternative method is to use the Full screen mode command from the main menu. All unnecessary elements will be hidden - only an editable window or diagram and simplified panel of universal toolbox remain. If the panel covers the screen area of interest, it is enough to press and hold the shift - key when the cursor is over that area and the toolbox window will move automatically.

The standard edit mode will be restored at the moment when the toolbox is closed.


1.5 Operation Test of Diagrams in the Edit Mode

The first diagram operation test is carried out when the diagram is edited. The appearance of the objects reflects the current state of the process variables. If the configuration of channels, archives and data source parameters has been completed, the actual data will be loaded. The Variable Preview panel may also be used to verify or simulate the variable values.

It is impossible to check everything in the edition mode. Motion animations as well as handling the object visibility property are not performed. The interactive functions of objects are not available either. Switching to the complete functional test is done by executing the Preview command of the context menu or by using the [image] toolbar button.

The Variable Preview panel is also available in the diagram test mode. Open the control panel (Ctrl-Shift-F1) and open the preview panel using the button contextual command called Tools.

The edit mode will be restored upon the diagram closing or using the Return to Architect button of the control panel.


1.6 Operation Test of the Application in the Edit Mode

Execute the Run application command in the main menu of the architect mode window of AsixEvo.exe. The application start-up windows with loaded default diagrams will be opened. It will be possible to test the operation of diagrams, including the switching function for the diagrams inside the window panels.

Alternatively, an edit window may be opened and the Run command from the context menu may be executed. The current window will be opened in the test mode, with the default diagrams loaded.

The architect mode will be restored at moment of closing all the test windows.


2.1 Interactive Editing

Use the button [image] located in the properties box. The dialogue window will be opened with a set of tabs for selecting the property edit mode.

Fig. The Dialogue Window with a Set of Tabs for Selecting the Property Edit Mode.

Select the relevant option and enter a value or select it from the list of available values.


2.2 Manual Editing

Start entering a new value. Depending on the property type, the list of possible values compatible with the context of use and previously entered value will be displayed. Complete the editing or select the value from the list.


2.3 Using the Value Entered Previously

Use the button [image] located in the properties box. A list of previously used values compatible with the type of the edited property will be displayed. Select the appropriate value.


2.4 Changing of the Enumeration Type Property

Double-click on the property box. The value will change sequentially.


2.5 Entering a Reference to the Process Variable

Use the button [image] located in the properties box. Select a variable in the process variable selection window. An alternative method is to start entering from the & symbol. A simple list of variable names compatible with the previously entered value will be displayed. Select a variable from the list. For the main and controlled variable property, the & symbol must be omitted - start with entering the name itself.


2.6 Entering a Reference to the Variable Attribute

Start with entering the @ symbol. The list of attribute names compatible with previously entered value will be displayed. Select the attribute name from the list. A reference to the attribute through the @name notation means reading out of the main variable attribute of the object.


2.7 Entering a Reference to a Diagram or Template Property

Start with entering the % symbol. The list of parameter names compatible with previously entered value will be displayed. Select a parameter from the list.


2.8 Entering a Reference to the Global Property

Start with entering the ! symbol. The list of global property names compatible with previously entered value will be displayed. Select a property name from the list.


2.9 Selecting from the Component Selection Window

For some types of properties a selection from values in the item selection window is possible. This applies to the colour, picture name and cursor type property. For these properties an additional button will appear in the edit box - its appearance depends on the value type.

Fig. A Component Selection Window.


3.1 Creating a Window or Diagram

In the application explorer panel, double click on the Windows or Diagrams node, or on the node of window or diagram group.


3.2 Creating a Window or Diagram Group

In the application explorer panel, use the Create Window command of the Windows or Diagrams node context menu.


3.3 Changing the Location of the Window, Diagram or

Home > How to Do It > 3 Editing Windows and Diagrams > 3.3 Changing the Location of the Window, Diagram or

3.3 Changing the Location of the Window, Diagram or Window/Diagram Group

In the application explorer panel drag the selected component and drop it at a new location.


3.4 Changing the name of a window, diagram or group

Use the Rename command from the component context menu. Alternatively, open the item for edition and change the Window Name or Diagram Name property.


3.5 Creating a Copy of a Window or Diagram

Use the Clone Window or Clone Diagram command from the component context menu.


3.6 Opening a Window or Diagram for Editing

In the application explorer panel double click on the node of the selected window or diagram.


3.7 Changing the Window Appearance

Set the window properties responsible for the window appearance.


3.8 Adding a Panel into a Window

Open the window for editing. From the context menu of the window select the Add Panel command.


3.9 Changing the Location of a Panel

Select the panel using the mouse and drag it to a new location. Alternatively, select the panel and change the X and Y coordinates.


Home > How to Do It > 3 Editing Windows and Diagrams > 3.10 Sticking a Panel to the Selected Edge of a Window

3.10 Sticking a Panel to the Selected Edge of a Window

Select a panel and change the Dock Style property.


3.11 Changing the Size of a Panel

Select the panel with a mouse and drag one of the square markers on the selection frame. Alternatively, select the panel and change the Width and Height properties.


3.12 Adding a Menu to a Window

Enter the name of the previously created menu to the Menu property of the window.


3.13 Creating a New Object

In the Tools panel in the Objects, Favourites or Last Used sections locate the correct type of object. Then drag the object to the appropriate location on the screen. A new object of standard size will be created. Then change the size of the object. Alternatively, click on the object name in the toolbox and using the mouse select an area on the diagram in which the object is to be created.

When several object of the same type are to be created, the subsequent objects can be created by selecting the name of the object class from the diagram context menu and then selecting the object area.


3.14 Creating a New Vertex Object

At the moment of their creation some objects (e.g. Pipe) are defined by a set of vertexes. In this case, instead of selecting a frame, click on all the vertex locations. The sequence of vertex selection is terminated by clicking the right mouse button.


3.15 Selecting the Item for Editing

Click within the component area. In the Properties panel, the properties definitions of the selected component will be shown.

If the item is invisible, it can be selected from the component list available in the Properties panel.

Fig. The List of Elements Available in the Properties Panel.

If several objects are located within the same screen area, then subsequent clicks select sequentially the particular objects.


3.16 Selecting Many Objects

Using the mouse mark the frame surrounding the objects which are to be selected. The selection should be started within the area which is not occupied by any object. When the frame is stretched from the left to right side, then all objects will be selected even if partially covered by the frame. When the frame is stretched from the right to left side, then only the objects completely covered by the frame will be selected.

An alternative method of selection is to click the following objects to be selected while holding down the Ctrl key.


3.17 Selecting all Objects of the Same Type

Choose one of the objects, and then execute the Select all the same type command from the context menu or use the toolbar [image] button.


3.18 Selecting all Objects

Execute the Select all command from the context menu or use the toolbar [image] button (shortcut Ctrl-A).


3.19 Grouping Objects

Sometimes it is advantageous to combine objects in groups. Groups facilitate editing large diagrams. Groups also allow common control of the object motion animation. When an object of the group is selected, other objects of this group are selected automatically.

The selected objects may be grouped with the Group command from the Grouping context menu or using the toolbar [image] button (keyboard shortcut Ctrl-g). A group can be deleted using the Ungroup command (the shortcut Ctrl-u).

If a single object of the group is to be edited, the objects can be temporarily ungrouped using the Ungroup Temporarily command (shortcut Ctrl-t). The objects will be automatically re-grouped when the diagram is reopen. The re-grouping may be done also by selecting any object of the group and using the Group Again command.


3.20 Copying Objects

Select the objects to be copied and execute the Clone command from the context menu or use the [image] button (keyboard shortcut Ctrl-d).

The copy/paste method is an alternative way that allows to copy the objects to another diagram as well. Select the objects to be copied. Execute the Copy command from the context menu or use the toolbar [image] button (keyboard shortcut Ctrl-c). Select the diagram on which the objects have to be copied and execute the Paste command or use the [image] button (keyboard shortcut Ctrl-v ). If a keyboard shortcut is used, the exact location of objects to be pasted can be pointed by the mouse.

Instead of the Paste command, the Paste scaled command can be used. In the case of copying objects between diagrams of different sizes, the objects will be adequately scaled.


3.21 Changing the Position of Objects

Select an object or objects which are to be moved. Press the left mouse button and drag the objects to a new location.

The arrow keys on the keyboard can also be used. Pressing such a button will move the objects by a single pixel in the desired direction. If additionally the Shift key is pressed, the object will be moved by 10 pixels.

Current coordinates of the objects can be tracked in the box displayed in the status bar.

Fig. Coordinates Displayed in the Status Bar.

The position of an object may also be changed by direct setting of the object X and Y properties.


3.22 Changing the Size of a Single Object

Select the object the size of which is to be changed. Then move the mouse over one of the resizing markers on the selection frame. Press the left mouse button and drag the marker to a new location. After pressing the mouse button, resizing can also be continued by using the arrow keys, if need be, with additional pressing the Shift key.

The Ctrl-arrow keys combination allows to switch the active marker of position change.

The size of an object may also be changed by direct setting the Width and Height properties of the object.


3.23 Changing the Size of an Object Group

Select the object group whose size is to be changed. Then proceed as in the case of a single object.

The difference in performance, compared to a single object, is that the size change affects directly only the selection frame. Objects change their size proportionally to the occupied area.

When it comes to setting of the same width or height for several objects, then after they were selected the value of the Width or Height properties have to be changed directly.


3.24 Editing the Shape of a Vertex Objects

Select an object by double-click. In addition to the standard selection frame the vertex markers will also be displayed. Select an appropriate marker with the mouse and drag it to a new location. The arrow keys or shift-arrow combination may be used to move the marker. The active marker switching is done by ctrl-arrow keys.

If some vertex is required to be added or removed, the Insert Vertex and Remove Vertex commands from the Vertices context menu or from the [image] button menu may be used.


3.25 Transforming the Shape of Vertex Objects

For vertex objects the shape transformations involving a vertex symmetrical transformation or rotation are available.

The relevant command from the Vertices /Vertices transformation context menu or Vertices transformation menu of the [image] button may be used.


3.26 Adjusting the Size of an Object to the Size of a Picture

Select the object of the Picture class and execute the Resize to picture command or use the [image] button. The size of the object will be set in such a way so that the displayed picture is not subject to scaling or cropping.


3.27 Adjusting the Size of an Object to the Size of a Diagram

Select the object and execute the Adjust to diagram command from the Align to context menu or use the [image] button. The object will cover the entire diagram area.


3.28 Undoing of Changes in the Location and Size of Objects and

Home > How to Do It > 3 Editing Windows and Diagrams > 3.28 Undoing of Changes in the Location and Size of Objects and

3.28 Undoing of Changes in the Location and Size of Objects and Restoring Deleted Objects

The diagram editor stores a multilevel history of the size and position changes for the objects and deleted objects. The previous version of the diagram is returned by repeatedly execution of the Undo command from the contest menu or by using the toolbar [image] button (keyboard shurtcut Ctrl-z).


3.29 Temporary Hiding the Objects in the Edit Mode

In the case of diagrams with a large number of objects, particularly those overlayed, temporary hiding some of the objects may be helpful.

Select the objects to be hidden. Execute the Selected Objects command from the Hide context menu or use the [image] button.

Alternatively, select the object to be brought to the front and execute the command Covering Objects from the Hide context menu or use the [image] button. All objects the position of which overlap in any way with the selected object will be hidden.

To show all of the objects again, use the Unhide All command from the context menu or click on the [image] button.


3.30 Locking the Changes of the Object Size and Position

It is possible to prevent against an accidental change of the size or position of the objects when editing a diagram. To do this, select the objects and execute the relevant command from the Lock context menu or use the [image] button.

To remove the locks, select objects and execute the Unlock command from context menu or use the [image] button.


3.31 Determining the Sequence of the Object Overlaying

The way the mutual overlaying of the objects located within the same area of a diagram is controlled by the value of the Layer property. The objects with a higher number of the layer are displayed on the top of other objects. By explicit setting the Layer property it is possible to control the object overlaying. The overlaying method may also be set interactively.

Select an object or objects and execute one of the commands form the Order context menu or use the [image] button. The overlaying method changes, and the Layer property of the selected objects will change simultaneously. The following keyboard shortcuts can also be used: ctrl-home brings the object to the top, and the crtl-end put the object below all the others.


3.32 Aligning the Position of Objects

Select the objects and execute a relevant command form the Align to context menu or use the [image] button. One of the Alt-arrow shortcuts may also be used. Depending on the command or shortcut used, the relevant edge of the selected objects will be aligned.


3.33 Moving the Objects Closer to Each Other

If there is a need to arrange the objects so they adjoin each other, select the objects and a relevant command from the Move to context menu or use the [image] button. Depending on the command or shortcut used, the object at the edge remains unchanged, while the others will be positioned to adjoin each other in a corresponding axis.


3.34 Justifying the Objects

Sometimes it is necessary to evenly arrange the objects on a diagram. To do this, select the objects (at least 3) and execute the Horizontal or Vertical command from the Justify context menu, or use the [image] button.

The objects located at margins of the diagram will remain unchanged, while the others will be arranged in such a way so that the distances between their left (top) edges will be equal.


3.35 Overlaying the Objects

Select the objects which are to be put centrally one over the other. Depending on the required method of centring the objects, execute the relevant command from the Center context menu or from the menu of the [image] button.


3.36 Creating a Template from the Diagram Objects

Select the diagram objects, from which the template should be created. Execute the Create template command from the Grouping context menu or from the menu of the [image] button (keyboard shortcut Ctrl-p). In the open diagram edit panel change the Diagram Name property, and then execute the save operation (shortcut Ctrl-S).


3.37 Embedding a Template Inside a Diagram

In the Tools panel in the Templates, Favourites or Last Used sections locate the correct name of the template. Then drag the template to the appropriate location on the screen. The template will be embedded inside a diagram, and its size will be consistent with the original size. Alternatively, click on the object name in the toolbox and with the mouse select the diagram area in which the object is to be embedded. The template size and its objects will be scaled accordingly.

The original size of the template can be set using the Original template size command from the context menu or by using the toolbar [image] button.

For parametrised templates, after its embedment, the embedment parameters should be specified in the panel.


3.38 Disconnecting the Embedded Template from the Source

Select the embedded diagram and execute the Ungroup temporarily command from the Grouping context menu or from the menu of the [image] button.

Once disconnected, all the constituent objects of the template will be available for normal editing. Subsequent changes to the template definition will not apply to the disconnected objects.


3.39 Group Modification of the Used Variables

In case of individual objects, a simple method for changing the names of the used variables is direct modification of the relevant properties of the object. If the change involves replacing the main variable name by the same name for many objects, select all the objects in which the change is to be made and enter a new name in the Main Variable property box.

In a general case, the global replacement function may be used. Select the objects in which the change is to be made (in particular, use Ctrl-a shortcut to select all objects) and execute the Group replacement of variables command from the context menu or use the [image] button.

Fig. "The Group Replacement of Variables" Window.

All the originally used variables are listed in the left column while the new names are listed in the right column of the displayed dialogue window.

The window lists all variables used in the properties defining the variable name directly (e.g. Main Variable) and the variables used in the & short notation.


3.40 Preview of the Properties and Simulation of the Values

Preview of the current variables values or their simulation and manual setting may be helpful when editing a diagram. All these functions are performed by the Variable Preview panel which is opened by the Preview Variable command from the View menu. Variables can be added to the preview panel using the buttons located inside the panel.

In case of viewing the variables used in the specific objects the function for automatic adding of the variables may be used. Select the objects the variables of which are to be shown in the preview panel (in particular, use Ctrl-a shortcut to select all objects) and execute the Add variables to simulation command from the context menu or use the [image] button.


3.41 Adding Parameters into a Diagram or Template

Click on the diagram or template area not occupied by the objects or use the [image] button to cancel the selection of objects. The diagram (template) properties will be displayed in the Properties panel. Click on the Parameters row, and then on the + button.

Fig. Adding Parameters into the Properties Panel.

The new parameter definition window will be displayed.

Enter the parameter name and its default value. When the diagram is opened without specifying the parameters, default values are used. In particular, when the diagram is opened in the edit mode.

With the button - in the properties panel the selected parameter can be removed.

A new parameter can also be created by referencing to a non-existing parameter. Enter the parameter name in the % short notation in any of the object property. If such a parameter does not exist, the user will be asked to create one.


Welcome

Home > Known Problems

>> Help for Asix

www.asix.com.pl

Asix.Evo - Known Problems


Asix.Evo_Known_Problems

Home > Known Problems > Known Problems

Problem

Description and solution

Very long boot time for AsixEvo and other executable files from the package

All executables of the Asix.Evo package are digitally signed with an Askom certificate. In some computer configurations which do not have access to the Internet and thus cannot verify the server certificate, Windows tries to verify the application certificate for a long time, which considerably increases the starting time. The solution then is to create configuration files for all executable files (exe) in the Asix.Evo installation directory of configuration files, with the same name as the executable file with the extension ".config" e.g.: for the file "AsixEvo.exe" the name of the file will be "AsixEvo.exe.config". Each file should contain the following entry:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<runtime>

<generatePublisherEvidence enabled="false" />

</runtime>

</configuration>

There are ready configuration files for executable files in the subdirectory "ExeConfigs" of the installation directory of Asix.Evo. Should the problem described above occur, just copy them to the main installation directory.

Loading error of Asix.Evo application published on Windows Server 2003 in the browser

Add two MIME types in the IIS manager for the virtual directory EvoNet:

· For .dll type application/x-msdownload

· For .mdb type application/x-msdownload

· For .* type text/plain

These settings are available in the properties of the virtual directory in the HTTP Headers tab in the MIME Types section.

The access error displayed in the browser when trying to access IIS server resources,
"Failed to access IIS metabase"

Type the following commands in the Windows command line on the server where the Asix.Evo application is published:

· %systemroot%\Microsoft.NET\Framework\v2.0.50727\
aspnet_regiis –r

· %systemroot%\system32\iisreset.exe

Error type

“Method not found: 'Boolean System.Threading.WaitHandle.

WaitOne(System.TimeSpan)'”

or other pointing to the incorrect reference to .NetFramework system methods.

AsixEvo requires the Microsoft. Net Framework, Version 3.51 (with Service Pack 1). If only. Net Framework 3.5 is installed in the system, SP1 should be installed additionally.

Error type:
"You cannot access the IIS metabase" error on Windows XP may not be caused by following an IIS installation sequence which is not recommended after installing the .Net Framework packages.

To remove the error execute the command:

· %systemroot%\Microsoft.NET\Framework\v2.0.50727\
aspnet_regiis –r

and if version 4 of the . NET Framework is installed, also the command:

· %systemroot%\Microsoft.NET\Framework\v4.0.30319\
aspnet_regiis.exe.

After running aspnet_regiis it is necessary to reboot IIS, for example with the command:

· iisreset

If the IIS service error is not corrected by the method above, it is necessary to uninstall the IIS package and all versions of the .NET Framework. After completing these actions install IIS and then the required. NET Framework 3.51.
Installing other versions of the .NET Framework is optional.


Welcome

Home > Types of Archival Data Aggregates

>> Help for Asix

www.asix.com.pl

Asix.Evo - Types of Archival Data Aggregates


Types_of_Archival_Data_Aggregates

Home > Types of Archival Data Aggregates > Types of Archival Data Aggregates

Types of Archival Data Aggregates

Whenever the access to the aggregated historical data is required in the Asix.Evo application, it is necessary to specify the aggregate name. This applies to the Chart object, HorizonAggregate function and RangeAggregate, interfaces of scripting model.

Name | Meaning
none | no aggregation
start | The value at the beginning of the interval.
end | The value at the end of the interval.
delta | The difference of a values at the end and beginning of the interval.
min | The minimum value within the interval.
max | The maximum value within the interval.
range | The difference between the maximum and the minimum value within the interval.
total | The time-weighted sum of values within the interval (a time integral).
average | The average of time-weighted values within the interval.
average0 | The average of time-weighted values within the interval. Within the periods in which a value is not available for calculations, the 0 value is used.
sumup | The sum of positive changes from the last known value prior to the start, to the last value before the end of the sampling interval.
sumdown | The sum of the absolute values of the negative changes from the last known value prior to the start, to the last value before the end of the sampling interval.
prevknown | The last known (good or uncertain) value before the start of the sampling interval. Yields the last value, even if it occurred a long time ago.
last | The last known (good or uncertain) value within the sampling interval excluding the end of the interval - to distinguish from the end aggregate, which includes the interval end.
stdev | The time-weighted standard deviation within the sampling interval.
rms | The time-weighted RMS within the sampling interval.
avglk | The time-weighted average within the sampling interval. Last known value is inserted in place of corrupt or missing values.
totallk | The integral over the sampling interval, with the time calculated in seconds. Last known value is inserted in place of corrupt or missing values.

The detailed description of the aggregates and their parameterization can be found in the documentation of the Aspad archiving module.


Data Server

Home > Data Server > 1. Process Data Processing of Data Server > 1.1. Data Server

1.1. Data Server

Evo applications use the Asmen and Aspad modules to read variable values from the drivers and to archive them. These modules are run under the so-called data server.

In practically every application, at least one workstation works in this mode. The Data Server reads data from process controllers and can archive them.

Parameterization of the Data Server requires the XML configuration file name and variant of the work:

Asix.Evo.exe > Application Explorer > Stations Settings > Data Sources > Source of Process Data Settings

The Data Server configuration file can be created while creating a new application using the wizard. The program is designed for Architects. You can use the button to run the Architect program with the appropriate configuration file loaded.


7. Communication Manager ASMEN

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN

 1.2. Communication Manager ASMEN

Information exchange between a SCADA system and a technological process controller may be performed by means of either serial links or LAN (Local Area Network). Selection of the link type depends on both hardware configuration and requirements that are made to the visualization system in regard to the amount of exchanged data and frequency of data transfers.

Information exchange between Asix system computers may be performed by means of a LAN. That type of a link will be referred to as a network channel. It makes values of current and archive variables of Asix available for the computers that are not physically connected to a controller. Of course, at least one computer operating in an ETHERNET network must be physically connected either to the controller or to the network of controllers (e.g. SINECL2), so it would operate as data server for other computers.

The systems that are characterized by a large amount of exchanged information use, as a rule, the Local Area Network, however, for the other systems, serial link interface would meet user’s needs.

The designing process of the Asix system from the point of view of process data availability consists of preparation in text files the following declarations:

transmission channel - is the physical link between the Asix system computer and the controller located at the plant, defined by the name of communication driver (operating according to the determined protocol) with the list of its particular parameters. The link between Asix system computers by means of an ETHERNET network can be considered as the transmission channel as well. This link type is mainly used for data transmission to the computers that operate as so-called network terminals, they do not have links to the controllers and do not create their own archive. Specification of a virtual (simulated) transmission channel, that does not need a link to the plant, is also possible. This option is particularly useful on the stage of application design and testing.

process variables - the process variable is the process information that defines status of a given technological parameter, being created on the base of information received from the plant.

The variable definitions database data can be stored:

- as Jet database,

- as MS SQL database,

- it is possible to use the Excel worksheet directly as the variable base, without the stage of variable generation stage. After the worksheet is loaded, it is no longer used.

The process variables, used exclusively for internal application needs and are not related to the technological plant, can be created too.

Based on the above specifications the repository of process variables, being available for all the components of Asix, is created (i.e. cashe). Values of process variables are stored by the ASMEN module in the operating memory of the computer and are on-line updated by means of their sequential reading from the controlled plant. Information from the object is usually transmitted in raw form, so it need to be initially processed. This processing is performed by means of calculation functions declared by the designer for each process variable separately.

All the operations related to the access to process variables are provided in the Asix system by ASMEN. The ASMEN program supervises process of sequential updating of values of the process variables in the database and interacts in the all operations referred to transmission of the controls to the plant. The direct data exchange between computer and plant controller is performed by drivers, which operate under control of ASMEN. The set of drivers used for the visualization system depend each time on the method of connection of the system to the given plant controller.

Simulation mode is a special mode of ASMEN. This mode is based on the fact, that the values of process variables are not obtained from a physical transmission channel, but they are generated by means of special calculation functions, developed for simulation of plant operation. The simulation mode is particularly useful on the stage of application design, when physical connection to the plant is usually unavailable.

Operating parameters of the ASMEN program are declared in the initialization file. It is a text file that may be modified by means of any text editor that process ASCII files. The initialization files are in general use in Asix system. The format of these files will be further described in details in another part of the manual.

Declarations of ASMEN parameters have to be set up with use of Architect module:

Architect program > Fields and Comuters > Current Data module

See more in: Asix.Evo > Data Server > chapter 2. Data Server Parameterization> Configuration of current data parameters


6.1. Declaration of Transmission Channels

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.1. Declaration of Transmission Channels

1.2.1. Declaration of Transmission Channels

Declarations of transmission channels enable passing to the ASMEN program the list of drivers used by an Asix application as well as the operating parameters of those drivers. Declarations of transmission channels need the following parameters:

logic_name - the logical name of a transmission channel; the maximum length of the logical name can’t exceed 9 characters; space, comma and tabs are not allowed in the name;

driver_name - the name of the driver of physical link used in the transmission channel; the name NONE, standing for the protocol that simulates a physical link, or the name NETWORK that denotes a network channel can be used;

parameters - the list of parameters, specific for each of protocols of a physical link; the protocol that simulates a physical link (NONE) and the network protocol (NETWORK) need no parameters.

Communication channels are defined with use of Architect module:

Architect program > Fields and Computers > Current data module

Each channel has its own definition, which is added to Current data module by clicking the right mouse button on the Current data module and selecting the Add Channel command:

See more information: Asix.Evo > Data Server > chapter 2. Data Server Parameterization > Configuration of current data parameters > Definition of communication channels

The NETWORK protocol used by the NETSRV.EXE program is a special type of protocol. It does not provide a physical link to a controller, but only connection to any other computer that has such a link. The driver of the network channel, that have established the link, sends a query to all servers, defining the logical name of a channel. The query is responded by only those servers, where such a channel has been previously declared. If more that one server responds the query, the one with the less loaded is chosen to establish the link. If the chosen server is turned off during operation, network link will be established with another server.

The network channel can be used for creating the network terminals that use current variables of Asix.

The protocol named NONE, which is internally served by ASMEN, is a special kind of protocol, which does not provide physical link to a controller. It can be used for the following purposes:

  • application testing in simulation mode,

  • enabling exchange of information between programs of Asix; information is exchanged by means of process variables.

Simulation of changing values of process variables that use the NONE protocol can be carried out based on special calculation functions or, on the other hand, by a separated simulation program that modifies values of process variables using the algorithm established by the designer. To use the NONE protocol for application testing, the following are to be done:

  • removing declaration of physical transmission channels;

  • creating new declaration of transmission channels with logic names same as have been used in original declaration of transmission channels; NONE should be declared as the protocol type;

  • after having completed all the tests the original declarations of transmission channels must be restored.

The above procedure may be supported by calculation functions designed for simulation of trends of variable values. These functions provide automatic change of variable values according to a unique algorithm fixed to these function. In the Asix package there are, at present, two types of simulating calculation functions: ON/OFF and SAW.

Data exchange by means of process variables of the NONE type channel consists in the procedure, that variable values are obtained from one of Asix system programs and stored into the repository of process variables used by ASMEN. The other system components (archiving program, visualization objects) can get those data in a normal way (with no respect, that the data are not transmitted from the plant controller). The only component that enables generation of values of variables of NONE‑type channel is the visualization object of the CALCULATOR class. CALCULATOR sets the value of chosen variable on the basis of cycle calculation of any arithmetical expression.

No additional parameters are declared for the item that describes the NONE-type protocol.

Array variables from the NONE channel are treated as one variable.

There is the possibility to declare the method of the access to variables that relies on associating the value for variables in the effect of executing the saving operation. The operation of saving requires giving not only the value but also the time and the status of variables. It is necessary, in this case:

- to declare a channel with the NONE driver assigned to this channel,

- to select the Writing data and status parameter.

Figure. ‘Writing data and status’ parameter declaration.

This solution was created to make import of variables from outside applications (e.g. spreadsheet) and transfer them to the archive of the ASPAD module possible.

NOTICE At the moment, when ASMEN starts running it is required, that drivers of all protocols declared in the initialization file would be stored in the directory, where the asix system starts. The driver that simulates the physical link (NONE) is built in the ASMEN program. The loading procedure of individual drivers is defined with the description of drivers available for Asix.


Disabling_Channels_from_the_Service

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.2. Disabling Channels from the Service

1.2.2. Disabling Channels from the Service

To disable the communication channel from the service:

1. For each channel that you want to disable / enable from the service, create a control variable whose name is based on the rule: 2 underline + channel name + 2 underline, eg for TEST channel the control variable is named __TEST__

2. The control variable must be declared in the NONE channel and use the NOTHING conversion function.

3. Switching off the channel from the service requires setting the value of the control variable to 0

4. To turn on the channel to the service, you need to set the value of the control variable to ! = 0

5. If the channel is disabled, all operations on variables from that channel (refresh, read, write) are terminated with the ASMEN error (without executing the driver).

6. By default, the channel is enabled for the service and the value of the control variable is set by ASMEN to 1

7. Channel switching off / on is acknowledged with an entry in the operator panel.

If the channel is to be disabled from the service already at the application startup, then use the option entered in the Architect, in the Miscellaneous module, on the tab Directly entered options:

Section name: ASMEN

Option name: CHANNEL_NOT_SERVICED

Value of option: ASMEN_channel_name


6.2. Declaration of Process Variables

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.3. Declaration of Process Variables

1.2.3. Declaration of Process Variables

NOTICE It is recommended to declare process variables in the variable definitions database.

It is recommended to store variable definitions in the SQL or Jet (Access) database or directly in Excel spreadsheets - see: Data Server > 2. Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Introduction > Database Type and Format.

The parameters defining variables in VarDef are located in the fields named as follows:

Parameter Field

Name Name

Description Description

Address Address

Channel Channel

Elements count ElementsCount

Sample rate SampleRate

Conversion function ConversionFunction

Parameters of the calculation function:

Conversion function range from ConversionFunctionRangeFrom

Conversion function range to ConversionFunctionRangeTo

Measurement range from MeasurementRangeFrom

Measurement range to MeasurementRangeTo

The whole list of system attributes of the variable definitions database you can find in Data Server > 2. Parameterization of Data Server > Appendix 1.

When declaring the process variables their type are not defined. The type of process variable in a raw form (read or write to the controller) results from the transmission protocol and symbolic address. The type of process variable in a converted form (transferred by ASMEN to application or from application to ASMEN) results from the conversion function being used. The process variables may take one of the following forms:

  • 16-bit unsigned number (WORD),

  • 16-bit signed number (INTEGER),

  • 32-bit unsigned number (DWORD),

  • 32-bit signed number (LONG),

  • floating-point number (FLOAT).

The ASMEN module uses the following parameters of variables:

variable_name - unique symbolic name of process variable identifying the variable for all the components of Asix (name length can’t exceed 15 characters and the name must not include spaces, colons, parentheses of any type and commas);

variable_description - any text containing, e.g. technological description of process variable (commas are not acceptable);

address - symbolic address, the form of which is specific for each of drivers of Asix; it is used by the driver in order to locate the variable in the controller;

channel - logical name of a transmission channel (one of the names given in the declaration of transmission channels);

quantity - number of items included in a process variable (the variable may be an array), e.g. for data blocks DB it is necessary to specify the number of DW data words, the values of which, in the form of array, will be assigned to the process variable (for protocols of SIMATIC controllers); in a default case the number of items is set to 1;

rate - rate of updating the value of process variable (in seconds);

function - name of conversion function that is designed for converting the value received from the controller into the value transferred to components of Asix; while initiating the process variables the compatibility of the type of variable retrieved from the controller (the variable is defined by the driver) with the type of input variable of the conversion function is checked; in the case of disagreement the process variable is not initiated; it is allowed to use INTEGER, WORD, DWORD and LONG types interchangeably;

parameters - the list of conversion function parameters that are assigned to the given variable; in the case the list don’t include all parameters the default values, specific for each of conversion functions, will be assigned to the parameters which have been omitted.

A symbolic address is used for unique definition of variable in the controller, the value of which will be assigned to the process variable in the Asix system. On the basis of the symbolic address the type of the variable and its localization in the controller memory are defined. The way the address is created is specific for the channel type in which the variable is located.


6.3. Running the ASMEN Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.4. Running the ASMEN Module

1.2.4. Running the ASMEN Module

ASMEN is loaded automatically while the Asix start-up and its operating parameters are read the application configuration file. Parameters setting for ASMEN must take into account all the variables used by the system.


6.4. Entries in Configuration File

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.5. Entries in Configuration File

1.2.5. Configuration Parameters of ASMEN Module

Asmena parameters are specified in the XML Data Server configuration file via Architect.

See: Data Server > Parameterization of Data Server > Configuration of current data parameters


6.5. Conversion Functions

1.2.6. Conversion Functions

Calculation functions are used by the ASMEN module when converting values of raw process variables into real form. Each variable is assigned a calculation function declared separately. Some of available calculation functions allow to simulate the variable values according to given algorithm.

The Asix system includes the following conversion functions:

ANALOG, ANALOG_FP - linear conversion

ANALOG12STATUS - special linear conversion

ANALOGWORD_FP - special linear conversion

BIT0_Z_N - concatenation of word from zero bits of n variables

BITN_Z_N - concatenation of word from zero bits of n variables

CAMAC6_1, CAMAC6_2 - special handling of the CAMAC interface

TIME - provides conversion of value of the process variable that have been read from a controller

TIME_SEC - provides conversion of value of the process variable that have been read from a controller

TIME_MSEC - provides conversion of value of the process variable that have been read from a controller

CIRCLE1 - bit-to-number conversion

DATETIME - conversion of number of seconds to a string

DATETIME_MEC - conversion of time of a MEC counter to a string

DW2FP - conversion of variables of DWORD type to variables of FLOAT type

GRADIENT - gradient calculation

QUOTIENT - scaling

COUNTER - conversion from BCD format

AND - logical product of variable values and function parameter

MAXIMUM_OF_N, MINIMUM_OF_N - maximum value of n variables

FACTOR_KG - conversion of floating-point types

FACTOR_FP - conversion of floating-point types

FACTOR_DW - conversion of floating-point types

FACTOR,FACTOR_INT,FACTOR_LONG - linear conversion

NEGBIT_BYTE,NEGBIT,NEGBIT_DW - inversion of selected bits in byte, in word and in double word respectively

NOTHING, NOTHNG_DW, NOTHING_DD, NOTHING_DOUBLE, NOTHING_FP - transmission of value without changing

NOTHING_BYTE, NOTHING_INT, NOTHING_INT64, NOTHING_LONG - transmission of value without change

NOTHING_KG, NOTHNG_TEXT - transmission of value without change

ON/OFF - simulation of binary signals

SAW, SAW_FP, SAW_INT64, SAW_DOUBLE - simulation of sawtooth trends

PERCENT, PERCENT_FP - conversion to percentage value

SHIFT_L - shift left of variable value

SHIFT_R - shift right of variable value

AVERAGE - average of moving-window type

AVERAGE_OF_N - actual value of arithmetic average of variables list

CONSTANT, CONSTANT_FP - assigning constant value to an ASMEN variable

STATUS - current variable status

SUM_OF_N - sum of values of n variables

SLIDER, SLIDER1, SLIDER1_FP - auxiliary function for the visualization objects of the SLIDER class

TABLE - non-linear conversion

GET_TIME_DW - the time marker is created form a value of the variable the name of which is the first parameter of the function

GET_TIME_FP - the time marker is created form a value of the variable the name of which is the first parameter of the function

GET_TIME_LONG - the time marker is created form a value of the variable the name of which is the first parameter of the function

WAVERAGE_OF_N - actual value of weighted average of variable list

DATA_SCOPE - conversion of process variable read from a controller

ZTIME - the value and status are copies of a status and value of the variable, the name of which is the first parameter of the function. The time marker is created from a value of the variable the name of which is the second parameter of the function

ZTIME_DW - the value and status are copies of a status and value of the variable, the name of which is the first parameter of the function. The time marker is created from a value of the variable the name of which is the second parameter of the function

ZSTATUS - the variable value is a status copy of the variable that is a parameter of the function

ZSTATUS_TIME - the value is a value copy of the variable, the name of which is the first parameter of the function. The status is a status copy of the variable that is a second parameter of the function. The time marker is created from a value of the variable the name of which is the third parameter of the function

All conversion functions of Asix are described below. For each conversion function the following properties are assigned:

  • type of read/write variable from/to a controller (type of PLC variable);

  • type of a variable passed from/to the user’s program (type of PC variable);

  • the list of parameters (together with their types and default values) in order of their appearance in a variable declaration line.

  • ANALOG

The function ANALOG enables conversion of the process variable read from a controller according to the formula:

PCVal = MinPCVal + (PLCVal - MinPLCVal) * k

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = MinPLCVal + (PCVal - MinPCVal) / k

The k factor is calculated in the following way:

k = (MaxPCVal - MinPCVal) / (MaxPLCVal - MinPLCVal)

type of PLC variable - INTEGER

type of PC variable - INTEGER

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - INTEGER (default value: 0)

MaxPCVal - INTEGER (default value: 2048)

  • ANALOG_FP

The function ANALOG_FP provides conversion of the process variable value read from a controller according to the formula:

PCVal = MinPCVal + (PLCVal - MinPLCVal) * k

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = MinPLCVal + (PCVal - MinPCVal) * k

The k factor is calculated in the following way:

k = (MaxPCVal - MinPCVal)/(MaxPLCVal - MinPLCVal)

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - FLOAT (default value: 0.0)

MaxPCVal - FLOAT (default value: 2048.0)

NOTICE The ANALOG_FP function operates like NOTHING_FP function when it is used for variables of the NONE channel.

NOTICE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status WASN’T declared.

  • ANALOG12STATUS

The function ANALOG12STATUS enables conversion of the process variable read from a controller according to the formula:

PCVal = MinPCVal + (PLCVal - MinPLCVal) * k

And conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = MinPLCVal + (PCVal - MinPCVal) * k

The k factor is calculated in the following way:

k = (MaxPCVal - MinPCVal)/(MaxPLCVal - MinPLCVal)

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - FLOAT (default value: 0.0)

MaxPCVal - FLOAT (default value: 2048.0)

NOTICE It is not necessary to take into account the fact that the read value of an analog is shifted by 3 bits to the left.

NOTICE The function is used for devices operating 12-bit values of measurements, in which the bits of measurement status are stored in three the least significant bits (data in the SIEMENS format with diagnostic within the status word), e.g. for SIMATIC S5 , BECHOFF, WAGO modules.

NOTICE The function operates like the ANALOG_FP function, but additionally the status adequate to the state of bits read from the module AI is set.

a/ bit1 = 0, bit0 = 1 – overflow of the upper range; the OPC_LIMIT_HIGH status is given back (or AVD_BAD, if ASMEN is not in OPC mode);
b/ bit1 = 1, bit0 = 1 – overflow of the lower range; the OPC_LIMIT_LOW status is given back (or AVD_BAD, if ASMEN is not in OPC mode);
c/ OPC_QUALITY_GOOD status is given back for the other combinations of status bits (or AVD_GOOD, if ASMEN is not in OPC mode).

  • ANALOGWORD_FP

The function ANALOGWORD_FP enables conversion of the process variable value read from a controller according to the formula:

PCVal = MinPCVal + (PLCVal - MinPLCVal) * k + offset

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = MinPLCVal + (PCVal – MinPCVal - offset) * k

The k factor is calculated in the following way:

k = (MaxPCVal - MinPCVal)/(MaxPLCVal - MinPLCVal)

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - FLOAT (default value: 0.0)

MaxPCVal - FLOAT (default value: 2048.0)

offset - FLOAT (default value: 0.0)

NOTICE The ANALOGWORD_FP function operates like NOTHING_FP function when it is used for variables of the NONE channel.

NOTICE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status wasn’t declared.

  • AND

The AND function performs an operation of logical AND on the variable value that has been read from a controller and on the parameter of the AND function that is given in the variable declaration.

When writing to a controller the variable value is not modified.

type of PLC variable - WORD

type of PC variable - WORD

parameter:

number in hexadecimal format (default value: FFFF).

  • AVERAGE

The function AVERAGE calculates an average from samples of process variable values that have been read from a controller according to the formula:

PCVal = MinPCVal + (PLCVal - MinPLCVal) * k

and provides conversion of the process variable that is to be sent to a controller according to the formula:

PLCVal = MinPLCVal + (PCVal - MinPCVal) * k

The k factor is calculated as follows:

k = (MaxPCVal - MinPCVal)/(MaxPLCVal - MinPLCVal)

The average is calculated for Period time period (given in minutes), and the result is regarded as correct if the percentage rate of correctly read samples is equal Rate.

The function parameter may be ONLY a number (expressed in minutes), which meets one of the following conditions:

divides an hour into equal periods

divides 24 hours into equal periods being a multiple of an hour.

Calls of ASPAD must be synchronized with the system clock but not with the moment of the asix start-up.

type of PLC variable - anyone

type of PC variable - FLOAT

parameters:

MinPLCVal - no reference

MaxPLCVal - no reference

MinPCVal - FLOAT (default value: 0.0)

MaxPCVal - FLOAT (default value: 2048.0)

Period - INTEGER (default value: 5)

Rate - INTEGER (default value: 80)

  • AVERAGE_OF_N

The function AVERAGE_OF_N returns an actual value of arithmetic average of the variables specified in the list as parameters and is designed for using with a variable declared in the NONE type channel. The variables specified in the parameters list may be of various types, the function value is converted to FLOAT type. Neither the number of variables nor their order in the variable declaration, to which the AVERAGE_OF_N function is assigned, are not limited. If the declaration does not fit in one line due to long list of variable names, it is necessary to separate it into several lines, which (beside the last one) have to be ended by continuation mark "\".

type of PLC variable - anyone

type of PC variable - FLOAT

parameters:

k, minimal number of variables, that have been read correctly from a controller, for which the result of function evaluation is valid. The value of 0 means that all the variables have to be read correctly. If the number of variables that have been read correctly is lower than declared, the function returns a random value with error status.

Val_1,..Val_n names of ASMEN variables of any type

The function value is calculated as follows:

PCVal=(Val_1+Val_2+..+Val_n)/n

  • BIT0_Z_N

The function BIT0_Z_N creates a 16-bit unsigned number (WORD), where the values of individual bits are equal to the value of least significant bits(bit 0) of actual values of the variables being specified in the list. The bit no. 0 is set from a value of the variable on the first place in the list, bit no. 1 – of the variable on the second place and so on. The number of parameters is limited to 16.

type of PLC variable - BYTE, WORD, DWORD

type of PC variable - WORD

parameters:

k - minimal number of variables have been read correctly from a controller, for which the validity of function evaluation is recognized; the value of 0 means that all the variables must have been read correctly. If the number of variables that have been read correctly is lower than declared, the function returns a random value with an error status.

Val_1 .. Val_n names of ASMEN variables separated by a space, n<=16

NOTE In case of declaring a variable of FLOAT type as one of Val_i variables, before executing a function the variable value is converted to WORD (the function makes sense for binary variables returned by driver as FLOAT).

  • BITN_Z_N

The function BITN_Z_N extends the functionality of the BIT0_Z_N function by the possibility of:

1. choosing an optional bit of a variable value;

2. forcing a bit variable with use of 0 or 1 parameter instead of variable name;

3. negating a variable bit value with use of the NOT suffix.

EXAMPLE

ZM_MASKA, , XX, TEST, 1, 1, BITN_Z_N, 4, ZM_01:3 ZM_02:8:NOT ZM_03:4 0 1 ZM_04:1:NOT 1

Separate bits of the 'ZM_MASKA' variable have the following values:

bit 0 - the bit 3 of the 'ZM_01' variable

bit 1 - negated value of the bit 8 of the 'ZM_02' variable

bit 2 - the bit 4 of the 'ZM_03' variable

bit 3 - 0

bit 4 - 1

bit 5 - negated value of the bit 1 of the 'ZM_04' variable

bit 6 - 1

  • CAMAC6_1

The function CAMAC6_1 enables conversion of the process variable value that have been read from a controller according to the formula:

for PLCVall >= 2048

PLCVal = (PLCVal - 2048)/2048

for PLCVall < 2048

PLCVal = (2048 - PLCVal)/2048

PCVal = PLCVal * (MaxPCVal – MinPCVal) + MinPCVal

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 4096)

MinPCVal - FLOAT (default value: -75.0)

MaxPCVal - FLOAT (default value: 300.0)

  • CAMAC6_2

The function CAMAC6_2 calculates an average from samples of the process variable values read from a controller according to the formula:

for PLCVall >= 2048

PLCVal = (PLCVal - 2048)/2048

for PLCVall < 2048

PLCVal = (2048 - PLCVal)/2048

PCVal = PLCVal * (MaxPCVal – MinPCVal) + MinPCVal

The average is calculated for Period time period (given in minutes) and the result is regarded as correct if the percentage rate of correctly read samples is equal to Rate.

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 4096)

MinPCVal - FLOAT (default value: -75.0)

  • CIRCLE1

The function CIRCLE1 provides conversion of the WORD process variable value read from a controller to one of 16-bit numbers (without the sign) of the array assigned to a given process variable. The contents and size of the array is determined on the basis of the process variable declaration. Conversion consists in searching of the first non-zero bit in the number that has been read from the controller. The first non-zero bit position is then used as an index for reading from the table. Searching the non-zero bit starts from the bit defined in declaration of a variable and is proceeded towards LSB (less significant bit). The number of tested bits is given in declaration of the variable. In the case, when a given word equals zero, the value of the last parameter in declaration of the process variable is returned as function value.

When sending to a controller, the function CIRCLE1 searches the array assigned to the process variable in order to find the pattern identical to the one passed to the function. When the pattern is found, the 16-bit number that has 1 on position referred to the index of found pattern and zeros on the other positions is sent to the controller. The pattern on the last position in the array is an exception - in this case zero is sent to the controller.

In the case, when the pattern is not found, the function returns error.

type of PLC variable - WORD

type of PC variable - WORD

parameters:

number of first bit, from which the search starts - WORD

number of searched bits – WORD

successive entries of pattern array (max. 16+1 - the last one for 0-entries) – WORD

  • CONSTANT

If the function parameter is an INTEGER type number then the function assignes the value of the number to a process variable.

If the function parameter is a process variable name then the function assignes the actual value of the variable-parameter to the process variable. The real type of the variable-parameter must be INTEGER.

The function is used for reading only.

type of PC variable - INTEGER

parameters:

IntegerVal - INTEGER (default value: 0)

or

Name - STRING

  • CONSTANT_FP

If the function parameter is an FLOAT type number then the function assignes the value of the number to a process variable.

If the function parameter is a process variable name then the function assignes the actual value of the variable-parameter to the process variable. The real type of the variable-parameter must be FLOAT.

The function is used for reading only.

type of PC variable - FLOAT

parameters:

FloatVal - FLOAT (default value: 0)

or

Name - STRING

  • COUNTER

The COUNTER function enables conversion of the process variable value that has been read from a controller (considered as a 3-decade BCD counter) to the 16-bit unsigned number.

When a system variable value is sent to a controller, conversion of 16-bit unsigned number to 3-decade BCD counter is made.

type of PLC variable - WORD

type of PC variable - WORD

no parameters

  • DATA_SCOPE

The function DATA_SCOPE provides conversion of process variable read from a controller according to the formula:

PCVal = MinPLCVal + (PLCVal – MinPCVal) * k

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = MinPCVal + (PCVal – MinPLCVal) / k

where:

k = (MaxPLCVal – MinPLCVal)/(MaxPCVal – MinPCVal)

PLCVal - type of PLC variable

PCVal - type of PC variable

type of PLC variable - FLOAT

type of PC variable - FLOAT

parameters:

MinPCVal - FLOAT

MaxPCVal - FLOAT

MinPLCVal - FLOAT

MaxPLCVal - FLOAT

When using the NONE channel the type of variable is set on FLOAT type.

  • DATETIME

The function DATETIME converts number of seconds transferred in the number of DWORD type to an ASCII string of the following format:

DD-MM-YYYY:HH:NN:SS

where:

DD - two digits of day

MM - two digits of month

YYYY - four digits of year

HH - two digits of hour

NN - two digits of minutes

SS - two digits of seconds

b - space

It may be used exclusively for the NONE driver.

The function has no parameters.

  • DATETIME_MEC

The function DATETIME_MEC converts the MEC counter time given as a number of seconds transferred in a string of 17 bytes to an ASCII string of the following form:

YYYY-MM-DD HH:MM

The MEC time is transferred by means of index 0.

The function has no parameters.

  • DW2FP

The function converts variables of DWORD type to variables of FLOAT type.

  • FACTOR

The FACTOR function provides conversion of the process variable value of WORD type (16-bit unsigned number) read from a controller according to the formula:

PCVal = A * PLCVal + B

and conversion of the process variable that is to be sent to a controller according to the formula:

PLCVal = ( PCVal – B ) / A

type of PLC variable - WORD

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

  • FACTOR_DW

The FACTOR_DW function enables conversion of 32-bit unsigned integer value of the process variable read from a controller according to the formula:

PCVal = A * PLCVal + B

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = ( PCVal – B ) / A

type of PLC variable - DWORD

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

  • FACTOR_FP

The function FACTOR_FP provides conversion of floating-point value of the process variable that has been read from a controller according to the formula:

PCVal= A * PLCVal + B

and conversion of value of the process variable that is to be sent to a controller according to the formula:

PLCVal = ( PCVal - B ) / A

type of PLC variable - FLOAT

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

#ABS - user receives an absolute value

NOTE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status wasn’t declared.

  • FACTOR_INT

The function FACTOR_INT provides conversion of the process variable value (16-bit signed number) read form a controller according to the formula:

PCVal = A * PLCVal + B

and conversion of the process variable that is to be sent to a controller according to the formula:

PLCVal = ( PCVal – B ) / A

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

  • FACTOR_KG

The FACTOR_KG function enables conversion of the process variable value that has been read from a controller according to the formula:

PCVal(IEEE 754) = A * PLCVal(KG) + B

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal(KG) = ( PCVal(IEEE 754) - B ) / A

The FACTOR_KG conversion function provides conversion of the variable that has been read from a controller from the KG floating-point format to the floating-point format compatible with IEEE 754. When writing, conversion from the IEEE 754 compatible floating-point format to the KG floating-point format is performed.

type of PLC variable - FLOAT (KG)

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

NOTE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status wasn’t declared.

  • FACTOR_LONG

The function FACTOR_LONG provides conversion of the process variable value (32-bit signed number) read from a controller according to the formula:

PCVal = A * PLCVal + B

and conversion of the process variable that is to be sent to a controller according to the formula:

PLCVal = ( PCVal – B ) / A

type of PLC variable - LONG

type of PC variable - FLOAT

parameters:

A - FLOAT (default value: 1.0)

B - FLOAT (default value: 0.0)

  • GET_TIME_DW

The time marker is created form a value of the variable the name of which is the first parameter of the function. It is assumed that:

- raw value of the variable is of DWORD type,

- value of the variable, the name of which is the first parameter of the function, is of DWORD type and contains the number of seconds since 1.1.1970 or 1.1.1980,

- type of time marker is defined by the second parameter of the function (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 2

Parameter1 = name of the variable the value of which (it has to be of DWORD type) will be converted into time marker of the variable;

Parameter2 = type of the time forwarded in Parameter1 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

  • GET_TIME_FP

The time marker is created form a value of the variable the name of which is the first parameter of the function. It is assumed that:

- raw value of the variable is of FLOAT type,

- value of the variable, the name of which is the first parameter of the function, is of DWORD type and contains the number of seconds since 1.1.1970 or 1.1.1980,

- type of time marker is defined by the second parameter of the function (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 2

Parameter1 = name of the variable the value of which (it has to be of DWORD type) will be converted into time marker of the variable;

Parameter2 = type of the time forwarded in Parameter1 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

  • GET_TIME_LONG

The time marker is created form a value of the variable the name of which is the first parameter of the function. It is assumed that:

- raw value of the variable is of LONG type,

- value of the variable, the name of which is the first parameter of the function, is of DWORD type and contains the number of seconds since 1.1.1970 or 1.1.1980,

- type of time marker is defined by the second parameter of the function (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 2

Parameter1 = name of the variable the value of which (it has to be of DWORD type) will be converted into time marker of the variable;

Parameter2 = type of the time forwarded in Parameter1 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980).

  • GET_STTIME_DW

The variable status is equal a value of the variable the name of which is the first parameter of the function. The time marker is created from a value of the variable the name of which is the second parameter of the function.

It is assumed that raw value of the variable is of DWORD type.

Number of parameters = 3

Parameter1 = name of the variable the value of which will be returned as OPC status; the variable has to be of BYTE type;

Parameter2 = name of the variable the value of which contains the numer of seconds since 1.1.1970 or 1.1.1980 (in UTC format); the variable has to be of DWORD type;

Parameter3 = type of the time forwarded in Parameter2 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980)

  • GET_STTIME_FP

The variable status is equal a value of the variable the name of which is the first parameter of the function. The time marker is created form a value of the variable the name of which is the second parameter of the function.

It is assumed that raw value of the variable is of FLOAT type.

Number of parameters = 3

Parameter1 = name of the variable the value of which will be returned as OPC status; the variable has to be of BYTE type;

Parameter2 = name of the variable the value of which contains the numer of seconds since 1.1.1970 or 1.1.1980 (in UTC format); the variable has to be of FLOAT type;

Parameter3 = type of the time forwarded in Parameter2 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980)

  • GET_STTIME_LONG

The variable status is equal a value of the variable the name of which is the first parameter of the function. The time marker is created form a value of the variable the name of which is the second parameter of the function.

It is assumed that raw value of the variable is of LONG type.

Number of parameters = 3

Parameter1 = name of the variable the value of which will be returned as OPC status; the variable has to be of BYTE type;

Parameter2 = name of the variable the value of which contains the numer of seconds since 1.1.1970 or 1.1.1980 (in UTC format); the variable has to be of LONG type;

Parameter3 = type of the time forwarded in Parameter2 (0 - seconds since 1.1.1970, 1 - seconds since 1.1.1980)

  • GRADIENT

The GRADIENT returns the variable value calculated according to the formula:

y = {(t2 –t1) / T}*m

where:

t2 – current value calculated as weighted average

t1 – value from the moment t0-T calculated as weighted average

T – period, for which the gradient is calculated (in seconds)

weighted average t = t-1*(1-k) + tb*(k)

k – weight factor in range (0 – 1)

t-1 – value of t calculated in the previous cycle

tb – present value

m – multiplier

type of PC variable - FLOAT

parameters:

T - WORD

k - FLOAT

m - FLOAT

A source value for the GRADIENT function can be both the raw variable in the controller and the variable of asix declared in ASMEN.

EXAMPLE

An examplary declaration of variable calculated by means of the GRADIENT function.

VARIABLE1,gradient of the variable in a controller,ED100.0,CHANNEL,1,1,GRADIENT,15,0.1,60

Meaning of parameters:

Variable address - DB 100, DW0

Period T - 15 seconds

Factor k - 0.1

Multiplier m - 60 seconds

VARIABLE1 – it is a calculated trend of change in controller units per minute of a variable of address ED100.0.

NOTICE The variable in a controller must be given in real units.

EXAMPLE

An examplary declaration of the asix system variable, which is calculated with use of the GRADIENT function:

VARIABLE2,gradient of a variable,,NONE,1,1,GRADIENT,15,0.1,60,VARIABLE3

Meaning of parameters:

Period T - 15 seconds

Factor k - 0.1

Multiplier m - 60 seconds

Source variable - VARIABLE3

VARIABLE2 – is a calculated trend of changes of the VARIABLE3 variable in units of VARIABLE3 per minute.

  • MAXIMUM_OF_N

The function MAXIMUM_Z_N returns the maximal value of variables specified in the list as parameters and is designed for using with a variable declared in the NONE type channel. The variables specified in the parameters list may be of various types, the function value is converted to FLOAT type. Neither the number of variables nor their order in the variable declaration, to which the MAXIMUM_OF_N function is assigned, are not limited. If the declaration does not fit in one line due to long list of variable names, it is necessary to separate it into several lines, which (except the last one) should end with continuation mark "\".

type of PLC variable - anyone

type of PC variable - FLOAT

parameters:

k, minimal number of the variables, that have been read correctly from a controller, for which the value returned by function is correct. The value of 0 means that all the variables have to be read correctly. If the number of variables that have been read correctly is lower than declared, the function returns a random value with error status.

Val_1,..Val_n names of ASMEN variables of any type

The function value is calculated as follows:

PCVal=max(Val_1,Val_2,..,Val_n)

  • MINIMUM_OF_N

The function MINIMUM_OF_N returns the minimal value of variables specified in the list as parameters and is designed for using with a variable declared in the NONE type channel. The variables specified in the parameters list may be of various types, the function value is converted to FLOAT type. Neither the number of variables nor their order in the variable declaration, to which the MINIMUM_OF_N function is assigned, are not limited. If the declaration does not fit in one line due to long list of variable names, it is necessary to separate it into several lines, which (except the last one) have to be ended with continuation mark "\".

type of PLC variable - any

type of PC variable - FLOAT

parameters:

k, minimal number of variables, that have been read correctly from a controller , for which the value returned by function is recognized as valid. The value of 0 means that all the variables have to be read correctly. If the number of variables that have been read correctly is lower than declared, the function returns a random value with error status.

Val_1,..Val_n names of ASMEN variables of any type

The function value is calculated as follows:

PCVal=min(Val_1,Val_2,..,Val_n)

  • NEGBIT

The function NEGBIT transfers to the user a 16-bit value of the variable that has been read after inversion the bits corresponding to the mask.

type of PLC variable - WORD

type of PC variable - WORD

parameter:

16-bit mask in hexadecimal format

  • NEGBIT_BYTE

The function NEGBIT_BYTE transfers to the user an 8-bit value of the variable that has been read after inversion the bits corresponding to the mask.

type of PLC variable - BYTE

type of PC variable - BYTE

parameter:

8-bit mask in hexadecimal format

  • NEGBIT_DW

The function NEGBIT_DW transfers to the user a 32-bit value of the variable that has been read after inversion the bits corresponding to the mask.

type of PLC variable - DWORD

type of PC variable - DWORD

parameter:

32-bit in hexadecimal format

  • NOTHING

The NOTHING function transfers to the user a 16-bit value of the process variable in the form that has been read by a driver without performing any additional conversions.

type of PLC variable - WORD

type of PC variable - WORD

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, is used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_BYTE

The function NOTHING_BYTE transfers to the user a value of the process variable in 8-bit number format in the form that has been read by driver without executing any additional conversions.

type of PLC variable - BYTE

type of PC variable - BYTE

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_DD

The function NOTHING_DD transfers to the user a value of the process variable represented in a controller by double word, exchanging places of higher and lower word.

type of PLC variable - DWORD

type of PC variable - DWORD

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_DOUBLE

The function NOTHING_double transfers to the user a value of the process variable represented in a controller by double word, exchanging places of higher and lower word.

type of PLC variable - DOUBLE

type of PC variable - DOUBLE

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_DW

The function NOTHING_DW transfers to the user a 32-bit value of the process variable in the format that has been read by driver without executing any additional conversions.

type of PLC variable - DWORD

type of PC variable - DWORD

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_FP

The function NOTHING_FP transfers to the user a value of the process variable of FLOAT type in the form transferred by a driver without performing any additional conversions.

type of PLC variable - FLOAT

type of PC variable - FLOAT

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_INT

The function NOTHING_INT transfers to the user a value of the process variable in 16-bit signed number format in the form read by a driver without executing any additional conversions.

type of PLC variable - INTEGER

type of PC variable - INTEGER

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_INT64

The function NOTHING_INT64 transfers to the user a value of the process variable in 64-bit signed number format in the form read by a driver without executing any additional conversions.

type of PLC variable - INTEGER 64

type of PC variable - INTEGER 64

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_KG

The function NOTHING_KG transfer to the user a value of the process variable that have been read from a controller in the KG floating-point format (a specific format of SIEMENS controllers) and changed to the floating-point format compatible to IEEE 754. When writing, conversion from the IEEE 754 compatible floating-point format to the KG floating-point format is executed.

type of PLC variable - FLOAT (KG)

type of PC variable - FLOAT

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_LONG

The function NOTHING_LONG transfers to the user a value of the process variable in 32-bit signed number format in the form read by a driver without performing any additional conversions.

type of PLC variable - LONG

type of PC variable - LONG

parameters:

MIN - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable;

MAX - number of the same type as the PC variable, it has no influence on value conversion, it used to define the range of changes of processed variable.

  • NOTHING_TEXT

The function NOTHING_TEXT transfers to the user a value of the process variable in form of an ASCII string ending with zero character.

type of PLC variable - BYTE

type of PC variable - BYTE

it has no parameters

  • ON/OFF

The function ON/OFF has been developed for test purposes, when tests are carried out without controller (using NONE protocol). It enables the user to generate binary values.

type of PLC variable - WORD

type of PC variable - WORD

parameters:

ON value - WORD (1 by default)

OFF value - WORD (0 by default)

initial value - WORD (0 by default)

  • PERCENT

The function PERCENT provides conversion of value of the INTEGER process variable read from a controller to the PC’s FLOAT format value according to the formula:

PCVal = (PLCVal / k) * 100.0

and conversion of value of the process variable that is to be sent to a controller from FLOAT format to INTEGER format according to the formula:

PLCVal = (PCVal / 100.0) * k

where k is the function parameter.

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

Reference value - FLOAT (default value: 2048.0)

  • PERCENT_FP

The function PERCENT_FP provides conversion of value of the process variable read from a controller to the value according to the formula:

PCVal = (PLCVal / k) * 100.0

and conversion of value of the process variable that is to be sent to a controller according to the formula:

PLCVal = (PCVal / 100.0) * k

where k is the function parameter.

type of PLC variable - FLOAT

type of PC variable - FLOAT

parameters:

Reference value - FLOAT (default value: 2048.0)

  • QUOTIENT

The QUOTIENT function enables conversion of the process variable value that has been read from a controller according to the formula:

PCVal = PLCVal / k

and conversion of the process variable value that is to be sent to a controller according to the formula:

PLCVal = PCVal * k

where k (QUOTIENT) is the parameter of this function.

type of PLC variable - INTEGER

type of PC variable - FLOAT

parameters:

Quotient - FLOAT (default value: 10.0)

  • SAW

The function SAW has been developed for test purposes, when tests are carried out without controller (using NONE protocol). It enables saw-shape trends generation with specified limit and step values. The process variable is of the INTEGER type.

type of PLC variable - INTEGER

type of PC variable - INTEGER

parameters:

initial increment /decrement trend (1 - up, 0 - down) - INTEGER (default value: 1)

step - INTEGER (default value: 1)

maximum - INTEGER (default value: 100)

minimum - INTEGER (default value: -100)

initial value - INTEGER (default value: 0)

  • SAW_DOUBLE

The function SAW_DOUBLE has been developed for test purposes, when tests are carried out without controller (using the NONE protocol). It enables saw-shape trends generation with specified limit and step values. The process variable is of DOUBLE type.

type of PLC variable - DOUBLE

type of PC variable - DOUBLE

parameters:

initial increment /decrement trend (1 - up, 0 - down) - DOUBLE (default value: 1)

step - DOUBLE (default value: 1.0)

maximum - DOUBLE (default value: 100.0)

minimum - DOUBLE (default value: -100.0)

initial value - DOUBLE (default value: 0.0)

  • SAW_FP

The function SAW_FP has been developed for test purposes, when tests are carried out without controller (using the NONE protocol). It enables saw-shape trends generation with specified limit and step values. The process variable is of FLOAT type.

type of PLC variable - FLOAT

type of PC variable - FLOAT

parameters:

initial increment /decrement trend (1 - up, 0 - down) - INTEGER (default value: 1)

step - FLOAT (default value: 1.0)

maximum - FLOAT (default value: 100.0)

minimum - FLOAT (default value: -100.0)

initial value - FLOAT (default value: 0.0)

  • SAW_INT64

The function SAW_INT64 has been developed for test purposes, when tests are carried out without controller (using the NONE protocol). It enables saw-shape trends generation with specified limit and step values. The process variable is of INTEGER 64 type.

type of PLC variable - INTEGER 64

type of PC variable - INTEGER 64

parameters:

initial increment /decrement trend (1 - up, 0 - down) - INTEGER 64 (default value - 1)

step - INTEGER 64 (default value: 1.0)

maximum - INTEGER 64 (default value: 100.0)

minimum - INTEGER 64 (default value: -100.0)

initial value - INTEGER 64 (default value: 0.0)

  • SHIFT_L

The function SHIFT_L reads a variable value from a controller, shifts it left by the number of bits given in the first parameter and then performs logical AND of the shifted value and the second parameter.

While value of the system variable is sent to a controller it’s left unchanged.

type of PLC variable - WORD

type of PC variable - WORD

parameter:

number of bits to shift by in the range 0 to 16 (0 by default)

16-bit hexadecimal mask value (FFFF by default)

  • SHIFT_R

The function SHIFT_R reads a variable value from the controller, shifts it right by the number of bits given in the first parameter and then performs logical AND of the shifted value and the second parameter.

While value of the system variable is sent to a controller it’s left unchanged.

type of PLC variable - WORD

type of PC variable - WORD

parameter:

number of bits to shift by in the range 0 to 16 (0 by default)

16-bit hexadecimal mask value (FFFF by default)

  • SLIDER

The function SLIDER resets to zero the MSB when a value of the process variable is read from a controller and sets to 1 in MSB when a value of the variable is written to a controller.

type of PLC variable - WORD

type of PC variable - WORD

It has no parameters.

NOTICE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status wasn’t declared.

  • SLIDER1

The function SLIDER1 works like the function ANALOG with the following differences:

  • when reading from a controller the MSB of process variable value is reset to 0,

  • before writing to a controller the MSB of process variable value is set to 1.

type of PLC variable - WORD

type of PC variable - WORD

parameters (as for ANALOG function):

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - INTEGER (default value: 0)

MaxPCVal - INTEGER (default value: 2048)

NOTICE The function doesn’t execute the operation of saving if it is used for the process variable of the NONE channel, for which the operation of saving with time and status wasn’t declared.

  • SLIDER1_FP

The function SLIDER1_FP works like the function ANALOG_FP with following differences:

  • when reading from a controller the MSB of process variable value is reset to 0,

  • before writing to a controller the MSB of process variable value is set to 1.

type of PLC variable - WORD

type of PC variable - FLOAT

parameters (as for the function ANALOG_FP):

MinPLCVal - INTEGER (default value: 0)

MaxPLCVal - INTEGER (default value: 2048)

MinPCVal - FLOAT (default value: 0.0)

MaxPCVal - FLOAT (default value: 2048.0)

NOTICE The SLIDER1_FP function operates like NOTHING_FP function when it is used for variables of the NONE channel.

  • STATUS

The function returns the current status of the variable that is the function parameter.

The variable that uses the function has to be defined in the NONE or NETSRV channel.

The function allows only a reading operation.

EXAMPLE

VAL, variable from the controller, CHANNEL_PLC,1,1,NIC

STAT, variable showing the VAL1 variable status,CHANNEL_NONE,1,1,STATUS,VAL

  • SUM_OF_N

The function SUM_OF_N returns an actual value of the sum of the variables specified in the list as parameters and is designed for using with a variable declared in the NONE type channel. The variables specified in the parameters list may be of various types, the function value is converted to FLOAT type. Neither the number of variables nor their order in the variable declaration, to which SUM_OF_N function is assigned, are not limited. If a declaration does not fit in one line due to long list of variable names so it is necessary to separate it into several lines, which (beside the last one) have to be ended by continuation mark "\".

type of PLC variable - anyone

type of PC variable - FLOAT

parameters:

k, minimal number of variables, that have been read correctly from a controller, at which the correctness of function evaluation is recognized. The value of 0 means that all the variables must have been read correctly. If the number of variables that have been read correctly is lower than declared, the function returns a random value with error status.

Val_1,..Val_n names of ASMEN variables of any type

The function value is calculated as follows:

PCVal=Val_1+Val_2+..+Val_n

  • TABLE

The function TABLE converts the value of a source variable according to the nonlinear function described in the table transferred in the text file, each line of which consists of the variable value and of the real value assigned to it. The lines beginning from the character # or ; are ignored (they may include a comment). Intermediate values are the subject to linearization, if a source value exceeds the range declared in declaration file, the function returns a measuring error. The variable, to which the function TABLE is assigned, must be placed in the NONE type channel.

It is possible to declare in the ASMEN section a path to the directory where all the tables, used by conversion functions of a given application, will be stored – the following item is used for this purpose:

PATH_TABLE=<path>

The function returns the value

PCVal=f(PCVal_1)

where:

PCVAL_1 - name of previously declared the ASMEN variable;

f(x) - function that is defined in table form in a text file.

type of PC variable - FLOAT

parameters:

PCVAL_1 - FLOAT|LONG|DWORD|WORD|INT16

definition_file - text

EXAMPLE

An examplary variable declaration:

AAA, Description – variable AAA depending on BBB, , NONE, 1, 1, TABLE,BBB,tablica1.txt

An example of tablica1.txt file defining the table:

10 15.7

20 21

30 26.4

40 32

50 37.1

As a separator it is possible to use Space or Tab. For fractional numbers you should use dot ( .) as a decimal separator.

  • TIME

The function TIME provides conversion of the process variable value that has been read from a controller (considered as a time counter in STEP5 format) to the number that represents time in units defined by a parameter of TIME function.

When the value of the system variable is sent to a controller, conversion of the number representing the time in user’s units to the time counter in STEP5 format is performed.

The user time formats are listed below:

type 0 - time in 0.01s units

type 1 - time in 0.1 units

type 2 - time in seconds

type 3 - time in minutes

type 4 - time in hours

type of PLC variable - WORD

type of PC variable - WORD

parameters:

Time format - WORD (default value: 2)

  • TIME_SEC

The function TIME_SEC provides conversion of the WORD process variable value read from a controller (as a number of seconds) to the string of ASCII signs of the following format:

mm:ss

where:

mm - minutes

ss - seconds

The function TIME_SEC converts during the saving process the string of ASCII signs of the following format:

mm:ss

where:

mm - minutes

ss - seconds

to the number of seconds of WORD format.

NOTICE The process variable using the function may not belong to the NONE channel.The function may not be used for array variables.

  • TIME_MSEC

The function TIME_MSEC provides conversion of the DWORD process variable value read from a controller (as a number of milliseconds) to the string of ASCII signs of the following format:

hh:mm:ss

where:

hh - hours

mm - minutes

ss - seconds

The function TIME_MSEC converts during the saving process the string of ASCII signs of the following format:

hh:mm:ss

where:

hh - hours

mm - minutes

ss - seconds

to the number of milliseconds in DWORD format.

NOTICE The process variable using the function may not belong to the NONE channel.The function may not be used for array variables.

  • WAVERAGE_OF_N

The function WAVERAGE_OF_N returns an actual value of weighted average of the variables specified in the list as parameters together with their weights. The parameters are used in pairs: variable_weight/variable_value. An additional parameter, which precedes the list of weights and variables, is a number defining the minimum number of pairs weight/variable, which have to be read correctly in order that the function result is valid. The variables specified in the list may be of various types. The function value is converted to FLOAT type. Neither the number of variables nor their order in the variable declaration, to which the WAVERAGE_OF_N function is assigned, are not limited. The successive variables are separated with space characters. If the declaration does not fit in one line due to long list of variable names, it is necessary to split it into several lines, which (except the last one) has to be ended by continuation mark "\".

type of PLC variable - any

type of PC variable - FLOAT

parameters:

k, minimal number of pairs weight/variable that have been read correctly from a controller, at which the correctness of function evaluation is recognized. The value of 0 means that all the variables must have been read correctly. If the number of variables that have been read correctly is lower than that has been declared, the function returns a random value with error status.

weight_1,Val_1,..weight_n,Val_n names of ASMEN variables of any type

The function value is calculated as follows:

PCVal=(weight_1*Val_1+weight_2*Val_2+..+weight_n*Val_n)/(weight_1+weight_2+…+weight_n)

EXAMPLE

An examplary declaration of the ASMEN variable:

WEIGHTED_AVERAGE, I0.2, CHANNEL1, 1, 1, WAVERAGE_OF_N, 0, WEIGHT_1 VAL_1 WEIGHT_2 VAL_2 WEIGHT_3 VAL_3

  • ZTIME

The value and status are copies of a status and value of the variable, the name of which is the first parameter of the function. The time marker is created from a value of the variable the name of which is the second parameter of the function.

It is assumed that:

- a value of the second variable is of DWORD type and contains the number of seconds dating since 1.1.1970 or 1.1.1980;

- the type of time marker determines the third parameter of the function (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 3

Parameter1 = name of the variable the status and value of which will be returned as a status and value;

Parameter2 = name of the variable (it has to be of DWORD type) the value of which will be converted into the time marker of the variable;

Parameter3 = type of the time forwarded in Parameter2 (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980)

  • ZTIME_DW

The value and status are copies of a status and value of the variable, the name of which is the first parameter of the function. The time marker is created from a value of the variable the name of which is the second parameter of the function.

It is assumed that:

- a value of the variable determined by the first parameter of the function is of DWORD type;

- a value of the second variable is of DWORD type and contains the number of seconds dating since 1.1.1970 or 1.1.1980;

- the type of time marker determines the third parameter of the function (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 3

Parameter1 = name of the variable
 the status and value of which will be returned as a status and value;
 the variable has to be of DWORD type;

Parameter2 = name of the variable (it has to be of DWORD type) the value of which will be converted into the time marker of the variable;

Parameter3 = type of the time forwarded in Parameter2 (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980)

  • ZSTATUS

The variable value is a status copy of the variable that is a parameter of the function.

Number of parameters = 1

Parameter1 = name of the variable the status of which will be returned as the function value;

  • ZSTATUS_TIME

The value is a value copy of the variable, the name of which is the first parameter of the function. The status is a status copy of the variable that is a second parameter of the function. The time marker is created from a value of the variable the name of which is the third parameter of the function.

It is assumed that:

- a value of the third variable is of DWORD type and contains the number of seconds dating since 1.1.1970 or 1.1.1980;

- the type of time marker determines the fourth parameter of the function (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980).

Number of parameters = 4

Parameter1 = name of the variable the value of which will be returned as the variable value;

Parameter2 = name of the variable the status of which will be returned as the variable status;

Parameter3 = name of the variable (it has to be of DWORD type) the value of which will be converted into the time marker of the variable;

Parameter4 = type of the time forwarded in Parameter3 (0 - seconds dating since 1.1.1970, 1 - seconds since 1.1.1980)


6.6. Diagnostics of Correct Format of Numbers Read from Controllers

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.7. Diagnostics of Correct Format of Numbers Read from Controllers

1.2.7. Diagnostics of Correct Format of Numbers Read from Controllers

The ASMEN module checks if FLOAT numbers read from controllers are compatible to the IEEE 754 format.

If a number of value NAN or INF is found, then the value of the variable (assigned to this number) is set to 0 and its error status is set to AVD_BAD. Simultaneously, in the window of ‘Control Panel’ the message containing error type (NAN or INF) and the name of the variable with bad format is displayed. If a log file is declared for a given application, then the message is written there too.


6.7. Drivers and Transmission Protocols

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.8. Drivers and Transmission Protocols

1.2.8. Drivers and Transmission Protocols

Asix system includes a set of drivers that handle the following types of data transfer with controllers of an industrial process.

The set of available protocols is systematically enlarged. ASKOM undertakes, upon client's request, to develop any transmission protocol in accordance with the principles specified in the Asix price list.

A detailed description of communication drivers can be found in the separate manual "Communication drivers".


6.8. Data Exchange in Local Area Network

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.9. Data Exchange in Local Area Network

1.2.9. Data Exchange in Local Area Network

The Asix system can make process data available also on stations which have no direct connections to the process controllers. The local area network (LAN) is used for this purpose. The stations, connected directly to controllers, operate as data servers and make data available for other stations (remote stations) by means of a LAN.

Asix transmission channels used for data exchange via a LAN will be named as network channels.

Data exchange in a LAN between stations of the Asix system is executed by the NETSRV module. This module is loaded automatically while Asix installation.

The network configuration is made in the Data Server configuration file with use of Architect module.Sekcja_NETSRV.

See: Data Server > Parameterization of Data Server > Configuration of network server related current data parameters.


6.8.1. Declaration of Network Channel

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.9. Data Exchange in Local Area Network > 1.2.9.1. Declaration of Network Channel

1.2.9.1. Declaration of Network Channel

Declaration of network channel needs the following parameters to be set up:

Name – logical name of the network channel;

Driver – name of the NETWORK driver;

Network server name – name of the data server computer (optional).

Architect > Fields and Computers > Current data > item of the NETWORK communication driver > Standard tab > Parameters:

Name

Driver: NETWORK

Figure. Declaration of Network Channel – Obligatory Parameters.

Architect > Fields and Computers > Current data > item of the NETWORK communication driver > Network tab > Parameter:

Network server name

Figure. Declaration of Network Channel - Optional Parameter.

If such a declaration is given, then all process variables declared in the name channel will be read from the data server, on which the transmission channel of the same logical name is declared. The name channel of the data server must meet one of the following conditions:

- be directly connected to the controller,

- be a NONE channel,

- work in the GATEWAY mode (see: Data Server > Process Data Processing of Data Server > Data Exchange in Local Area Network > GATEWAY Station Operating-Mode)

If names of data servers are not given in the network channel declaration then the work station may be connected to any data server having at its disposal a required transmission channel. Otherwise the range of servers will be limited to these computers, the names of which were placed in the network channel definition.

The names of network computers do not distinguish between uppercase and lowercase letters.


6.8.2. Process Variable Declarations in Network Protocol

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.9. Data Exchange in Local Area Network > 1.2.9.2. Process Variable Declarations in Network Protocol

1.2.9.2. Process Variable Declarations in Network Protocol

The remote station can access a process variable on data server under the following conditions:

- the same process variable must be declared on the remote station and on the data server,

- the declarations of the process variable must be identical on both sides.

If any of the above conditions is not fulfilled, then the ‘Operator Panel’ message about the wrong variable declaration will be displayed while the connection will be established.


6.8.3. GATEWAY Station Operating-Mode

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.9. Data Exchange in Local Area Network > 1.2.9.3. GATEWAY Station Operating-Mode

1.2.9.3. GATEWAY Station Operating-Mode

In the normal mode the Asix data server makes accessible only the data of physical channels (directly connected to process devices and controllers). However there are situations when the station is to be both a server and a client for a given data. It’s typical when the Asix station works as a gateway between two separate networks. In such a situation the network channels of the station should be treated in the same way as physical channels, taking in consideration the data propagation in the network. Such station work-mode is named GATEWAY.

The gateway operating-mode should be declared by setting up the Gateway mode parameter:

Architect > Fields and Computers > Current data – network server > Standard tab

There are all options for operation of the netsrv.dll program, which realizes the Asix operation in gateway mode.

Figure. GATEWAY Station Operating-Mode Declaration.


6.8.4. Redundancy

Home > Data Server > 1. Process Data Processing of Data Server > 1.2. Communication Manager ASMEN > 1.2.9. Data Exchange in Local Area Network > 1.2.9.4. Redundancy

1.2.9.4. Redundancy

In order to increase the reliability of communication with the controllers in the Asix system, redundant transmission channels have been implemented. They allow access to the data source with a substitute network channel in a situation where the basic transmission channel is not working properly.

Fig. Classic archive - data archiving from the Asmen module.

Fig. Classic archive - redundancy (two or more servers).

Redundancy can be declared only for physical channels (the ones directly connected to the controller or device).

The declaration of redundant channel should be declared with use of the Redundancy option placed in:

Architect > Fields and Computers > Current data – network server > Advanced tab: Redundancy

server_1, server_2, ..., server_n

where:

server_i - the name of the Asix computer which can be used as a redundant data server.

Such declaration means that if the logical_name physical channel is broken, then data will be read from another data server of the same channel.

If in the redundant channel declaration, the names of data servers are not given, then an alternate channel may be accessed by any data server having at its disposal a required transmission channel. Otherwise an alternate channel will be searched only on these data servers, the names of which were placed in the redundant channel declaration.

On the Asix station st1, via which the controls from an other Asix station st2 are executed, a permission to carry out these controls should be declared:

Architect > Fields and Computers > Current data > item of declared communication driver > Advanced tab:

Remote write access option:

station_1, station_2, ..., station_n

where:

station_i - the name of the Asix computer for remote control (optional) in a given channel.


7. ASPAD - Data Archiving Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module

1.3. ASPAD - Data Archiving Module

ASPAD is an Asix module designed for recording and later using of time trends of variables. In Asix system those trends are used for creating charts and reports, and can also be used by scripts and calculator objects of derived variables. They can also be exported with use of the AsixConnect program in DDE or OLE format to other programs, e.g. EXCEL.


7.1.1. Basic features of ASPAD Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.1. Basic features of ASPAD Module

1.3.1.1. Basic features of ASPAD Module

ASPAD program is provided with the following features.

  • Archiving variables of any type allowed in the ASMEN module, under condition that they are scalar variables. They can be either process variables, or obtained in result of calculations or simulations. Current version doesn’t allow array archiving.

  • Besides the value and the time it also stores the value status compatible with the OPC standard.

  • Collects the data either in files with specifically designed structure (D, M, Y archive with separate day, month or year files), or in typical databases (B archive).

  • For B-type it allows obtaining history data from devices provided with memory.

  • For B-type it allows archiving data retrieved asynchronously and non-sequentially, for example from telemetry systems.

  • Allows construction of more or less complex conditions of specific variables archiving.

  • For D, M and Y types saves disk memory, saving only significant changes of archived values and using simple methods of compression.

  • Due to proper internal file structure allows fast access to data from any archiving period.

  • Allows splitting the archive into day, month or year files.

  • Allows declaring D, M and Y-type files storing time, after which the old files would automatically be deleted (and through the period of 10 % of the specified time their backup copies are stored to avoid problems in case of accidental changes of computer time).

  • Uses filenames convention, with resource name attached and readable time encoding untill year 9999.

  • Can actively archive or only restore old data.

  • Enable access to data from the network.

  • Allows splitting archived variables into groups assigned to separate resources archived in separate files, in separate locations, separately configured and managed.

  • Allows defining, from what station in the network the given group of data should be received.

  • Allows automatic creation of backup copies of archive files, separately for each resource and each file type. Number of most recent files, that should be backed-up, can be set.

  • By means of AsixConnect, module it enables access to independent programs working under the Windows system.

  • Allows preparing and later reconstruction of pattern trends.

  • Allows operation in hot mode, completing the data from other stations with identical archive.

  • Allows defining, what stations on the network should be granted access to gathered data.

  • Gives access to software interface for dynamic configuration during Asix system running.

  • Allows setting parameters for graph archiving directly from the Asix system variable database.

There is also a new program AspadTools in the package, which allows:

  • changing the name convention from old (ASPAD 5) to new (ASPAD 6) and vice versa;

  • conversion of the archive to different type (for example M to D);

  • export to the text file;

  • checking and repairing the archive;

  • gathering statistics concerning the size of the data for particular archived variable trends;

  • change of the name or deleting the variable from the archive file.

Description of the AspadTools program can be found in its help file AspadTools.


7.1.2. Configuration parameters of Aspad module

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.2. Configuration parameters of Aspad module

1.3.1.2. Configuration parameters of Aspad module

The parameters of ASPAD are set up with use of Architect module.

See more in: Data Server > Parameterization of Data Server > Configuration of archival data.


7.1.3. Kinds and Types of Aspad Archives

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.3. Kinds and Types of Aspad Archives

1.3.1.3. Kinds and Types of Aspad Archives

The basic archive kind is STANDARD. The archive is saved in binary files on the disk.

The second archive kind is MS SQL. This is an archive saved in database of SQL type.

***

Aspad collects data in files containing the records from one day, month or year period, respectively, to archive types:

Archive of D type (day) - data gathered in daily files;

Archive of M type (month) - data gathered in monthly files;

Archive of Y type (year) - data gathered in annual files;

Archive of H type (horizon) - data gathered in one file;

Archive of B type (database) - data gathered in typical databases;

Archive of X type - data gathered in MS SQL database;

Aspad provides access to data from all periods, the files of which are in the directories indicated in the parameterization.

H-type archives (with horizon) are stored in one file for a specific group of variables. Data older than the given horizon is automatically forgotten, and the place in the file is recovered for further archiving. This type of archive can be used for temporary archiving of additional graphs, e.g. for quick registration of some graphs for diagnostic purposes. In the current version, it is recommended to use the D archive with a given file storage horizon, and the H archive has been preserved only for compatibility with previous versions of the ASPAD program.

Archiving for B-type is collecting values ​​in a database. Currently, these are databases in the MS SQL standard. It is suitable for registering values ​​at low frequency, giving in return a lot of flexibility when using such a database, as well as the ability to supplement data in the archive.

Archiving for X-type is collecting values ​​in a database. This archive, saved in the SQL database, is subjected to data compression and allows storing time with a given precision, up to 100 nanoseconds. The data can be archived according to the refresh rate of the value by the current data module Asmen, i.e. with a minimum period of 100 milliseconds.

***

It is also possible to divde the archives according to the data provisioning method:

Write archive - basic archive allowing to write and read data;

Read archive - archive only allows to read data;

Network archive - archive allows to read data from another computer through the network;

Slave archive - archive allowing to write and read data, used as redundant copy of a basic archive on another machine.

Replicated archive - archive has application on servers where Asmen doesn’t have any physical channels for data archived in the specified archive, and simultaneously there is other archive in the network, from which archived data can be retrieved.

All the information on Aspad kinds and archives you can find in Data Server > Parameterization of Data Server > Configuration of Archival Data > Archive Parameterization.

Slave archive is a writable archive located on the slave server of the given resource. Slave archive should be a redundant copy of a master archive on basic server. The difference between the slave archive and master archive consists in preferences for the master archive during connection of network clients. Client will connect to the slave archive only if no master archive can be found in the network.

Slave archive is use to provide a temporary redundant copy for the time of master server maintenance or failure. It is possible e.g. to declare the master archive with 100-day horizon and the slave archive with 10-day horizon. This will allow to fill the master archive for the downtime of max. 10 days, while during the presence of the master server, the clients will connect to it, thus allowing the use of 100-day horizon data.

Replicated archive is to be used on servers where Asmen does not have physical channels for data archived in a given resource, and at the same time there is another archive available from the network from which historical data can be retrieved. For the replicated archive, Aspad does not download current data from Asmen. In return, it constantly retrieves historical data from another server on which data from physical channels is archived, saving it in its own archive. A typical application are proxy servers.

The method of operation is slightly different for the standard and SQL archives.

Standard archive

For the standard archive, Aspad, after completing the data at system startup, continues to supplement it, cyclically checking new data appearing on the second server. Even longer interruptions in communication are made up on a regular basis after obtaining communication, up to the limitation specified in the declaration: program Architect> Fields and Computers> Historical data> <declared archive>> Merging tab> Minimum merge period option.

Also in the Merging tab, you can specify the names of servers from which you want to retrieve data for replication.

The No merging option on the Merging tab makes no sense and is ignored for such an archive.

SQL archive

If the SQL archive synchronization declaration is not provided for a given resource, the replicated archive works in the same way as the standard one.

If the option Synchronization in Architect> Fields and computers> Historical data> <archive>> Synchronization tab has been declared, then the data is only synchronized at the level of SQL databases, and both current data retrieval from Asmen and Aslink merging are disabled.

Synchronization has the advantage over regular merging, that it includes all changes in the archive, including historical data added or changed with a delay.


7.1.3.1. Replicated Archive

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.3. Kinds and Types of Aspad Archives > 1.3.1.3.1. Replicated Archive

1.3.1.3.1. Replicated Archive

How does the replicated archive work?

The Aspad replicated archive has application on servers where Asmen doesn’t have any physical channels for data archived in the specified archive, and simultaneously there is other archive in the network, from which archived data can be retrieved. Instead of receiving current data from Asmen Aspad continuously receives archived data from other server (where data from physical channels is archived) and saves it into own archive.

The typical destination for replicated archive are proxy servers.

The way of operation differs between replicated archives of standard and SQL type:

STANDARD archive

After data merging at system start-up Aspad continuous data merging periodically checking new data appearing on the other server. Even longer breaks in communication are constantly made up after reestablishing of communication till the time limitation set by the use of option Minimum merge period - one of the parameter of specified archive, declared with use of Architect program (Architect > Fields and Computers > Historical data module > item of declared archive > Merging tab). It is also possible to set the list of network names of servers from which data for replication is to be retrieved (Architect > Fields and Computers > Historical data module > item of declared archive > Merging tab > Merging limitation parameter).

Fig. Classic archive - data archiving from the Asmen module.

Fig. Replicated archive - implementation of the collector-server architecture.

SQL Archive

If there is no synchronization declaration for SQL archive, then replicated archive works in the same way as STANDARD archive.

If synchronization is declared, then data is synchronized only on SQL database level, and both retrieving of current data from Asmen and data merging by Aslink are switched off (Architect > Fields and Computers > Historical data module > item of declared archive > Synchronisation tab).

Fig. Synchronisation on SQL database.

Synchronizing has the advantage over regular data merging – it takes into account all changes in the archives, including historical data being added or changed with a delay.

Declaration

The declaration of replicated archive is similar to the declaration of ‘write archive’:

Architect > Fields and Computers > Historical data > <archive item> > Standard > Replicated archive

What problems does the replicated archive eliminate?

Using the other available archive types, the Aspad module acquires data for archiving in 3 ways:

1. The current or historical data is retrieved from the Asmen module.

2. During the start-up, it completes the missing data from another server for the time of turning off Asix.

3. It synchronizes the SQL archive data with another server if a synchronization declaration has been provided for this archive.

On servers where ASMEN does not have its physical channels, this solution has several disadvantages:

1. Archived data must be provided by Asmen network channels at least once the archiving period. Consequently:

a. if Asmen does not manage to pass data with such a cycle, it has only one additional cycle to catch up; later a hole appears in the archive;

b. if the Asmen refresh period is shorter than Aspad one, then the data is delivered more often than needed.

2. With a temporary lack of communication with the data source, a hole appears in the archive, which is not completed. The exception is the SQL archive with the synchronization declaration.

3. If the Write archive is declared and the synchronization has been declared, the data to the SQL archive is provided twice: first time as current data of Asmen, and the second as data from synchronization with the second archive.

The replicated archive was created to eliminate the above inconveniences.

Where the replicated archive should be used?

The choice of archive type between replicated and regular write archive depends on 2 factors: whether Asmen delivers data from physical or network channels on the given station, and how fast historical data has to be displayed on charts, in CALCULATOR objects, scripts, etc.

Data from physical or network channels

If the replicated archive will be applied, the data to be archived will be always retrieved from other computer archive. It will works even when that other computer is switched off temporarily. That means that our archive includes only the data that was previously archived in another archive and there will be no data available of the time of computer shut-down. We would lost the ability of using redundant channels of Asmen on our computer in this case.

Conclusions:

1. The replicated archive usually is suitable for application on proxy servers (with the note about delay of provided data).

2. The replicated archive should not be used for redundant operator stations.

3. The replicated archive can be used on an operator station on which all the data of this archive is retrieved form similar archive of a computer with physical channels for this data.

Delay of data

The data archived from delivered current data (in other kinds of archives) is available almost immediately, that is can be displayed on charts without delay or used in CALCULATOR object, scripts, etc.

In the case of replicated data the server sends data not more frequently than once every ten seconds, and in the case of SQL archive - not more frequently than it was specified in the declaration of synchronization (if such a declaration is used). The data is available on the station with a replicated archive not before after transmission. The data will be equipped with the proper time stamps and only its appearance in the archive delays.

Conclusions:

1. The replicated archive may be applied where there is a significant delay of historical data in relation to the current data.

2. The replicated archive should not be used for stations on which charts have to follow up the current data with the accuracy of seconds.

3. The replicated archive should not be used for stations on which scripts or CALCULATOR objects are not resistant to the delay of historical data.


7.1.4. Features of archiving in files of dedicated format

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.4. Features of archiving in files of dedicated format

1.3.1.4. Features of archiving in files of dedicated format

Features of archiving in files of dedicated format:

- unlimited number of recorded variables;

- maximum sampling frequency = 1 s;

- data compression - raw sample (10 bytes) is liable to compression that reduces

its capacity several times; two types of compression are used:

1. first, samples with insignificant change of value (so called neutral zone) are omitted;

2. second, recorded sample is compressed to reduce its volume to 1-3 bytes;

- type of archival data: byte, single/double word, floating point;

- automatic management of archive library;

- calculating and archiving series of predefine

- aggregates those radically accelerate the advanced data analyse; the effect of acceleration is especially noticeable in network installations, where many stations use archives from one server simultaneously;

- merging archive gaps “on the fly”, only if another computer with the archive with missing data was identified automatically; this mechanism enables implementation of the system in which the central repository of process data stored in the dedicated asix file format will be automatically completed with the missing information.


7.1.5. Features of Archiving in SQL Archive

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.5. Features of Archiving in SQL Archive

1.3.1.5. Features of Archiving in SQL Archive

Features of archiving in SQL database format:

- unlimited number of recorded variables;

- maximum sampling frequency = 1 s;

- backward merging historical data that is required in:

- dispatch systems with data collection on modem links, in packets for a specified period of time;

- communication with devices enabling buffering of measurement data after a break caused by lack of communication;

- type of archival data: byte, single/double word, floating point.


7.1.6. Data Aggregation in asix System

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.1. General characteristic of Aspad > 1.3.1.6. Data Aggregation in Asix System

1.3.1.6. Data Aggregation in Asix System

Since the varsion 5 of Asix system there is the mechanism of conversion and archiving of pre-defined aggregates accelerating advanced analysis of archival data. The acceleration effect is particularly noticeable in network installations, where many stations use resources of one server at the same time.

See more in: Data Server > Process Data Processing of Data Server > Aspad - Data Archiving Module > General Characteristic of Aspad > Data Aggregation in Asix System.


7.2. ASPAD Modules

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.2. ASPAD Modules

1.3.2. ASPAD Modules

Among ASPAD modules are:

Aspad.dll - basic module of the ASPAD program,

AsSQL.DLL - module for access to database of SQL type,

BBrowserSQL.exe - database browser program,

AspadTools.exe - archive files maintenance tools,

PEdit.exe - pattern trend edition program (for classic Asix),

PSelect.exe - pattern trend interface for scripts in the classic version.


7.3. System Requirements

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.3. System Requirements

1.3.3. System Requirements

ASPAD is designed for cooperation with other modules of Asix system. It is delivered as DLL library file. Loading the library is performed automatically during Asix loading.

To ensure correct operation of ASPAD it is necessary, to configure ASMEN program in order to deliver all archived data.

To ensure correct operation in the network, the ASLINK module provided with network software is also needed.

Additionally, working with B archive and P pattern trends requires also access to SQL server. An SQL Server Express installer is included in the Asix package.

Configuration of the Aspad module in terms of the implementation of B-type archiving is described in chapter:

Data Server > Process Data Processing of Data Server > ASPAD - Data Archiving Module > B-Type Data Collection > Additional Requirements for B-Type Archives.

Requirements for the X archive: Microsoft SQL server from the version 2008 R2.

Methods of estimating the sizes of operating and disk memory, needed for operation of ASPAD archiving module, depending on the number of archived variables and archive types, are given in:

Data Server > Process Data Processing of Data Server > ASPAD - Data Archiving Module > System Requirements > RAM Memory


7.3.1. RAM Memory

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.3. System Requirements > 1.3.3.1. RAM Memory

1.3.3.1. RAM Memory

The quantity of memory required for the ASPAD modules is a sum of code size and the data and allocated operating areas.

The area of dynamic allocated memory depends mainly on the number of archived variables. Each variable, stored in D, M or Y archive requires about 0.8 KB to 1.3 KB, but storing in B archive needs only about 0.3 KB. If the variable is stored in few ways, it must be taken into consideration separately for each archive.

The initial amount of used memory is usually 0.8 KB for D, M and Y archives for one variable, so it cannot be considered as the total demand for memory. In case, when the buffer of 0.5 KB size allocated for each variable is full of data, the disk writing operation is initialized and the new buffer is allocated for new data. As a result, until the disk writing operation is completed, one variable takes 1.3 KB of memory. If the disk writing operation is initialized for more then one variable at the same time, the amount of used memory dramatically increases. The above effect takes place at the end/begin of each day, when the described operation is executed for all the samples of D type.

EXAMPLE

For data structures of 5000 variables in D archive and 5000 variables in M archive a total area of about 13 MB of non-paged RAM memory should be provided.


7.3.2. Disk Memory for the D, M, Y and H Archives

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.3. System Requirements > 1.3.3.2. Disk Memory for the D, M, Y and H Archives

1.3.3.2. Disk Memory for the D, M, Y and H Archives

The amount of the required disk memory depends mainly on the number and size of stored records containing the consecutive items of all the archived samples of variables.

For the archive of H-type the room for data from the time period twice longer than the established time horizon must be ensured.

For the archive of D, M and Y type the reserved disk area must be large enough for data of such number of months that is going to be stored on the disk at the same time.

Moreover, the ASPAD stores information that is necessary for organization of the internal file structure. That additional information for the D, M, Y and H archives requires more then 10 per-cent of the archives file (about dozens KB for one variable in one file). The rate of additional information increases for the less number of data.

Evaluation of amount of disk memory required by data records cannot be precise, because those data are compressed, efficiency of the compression depends on the sampling type and on the parameters of the archive. Every record before compression consists of 1 status byte describing the record (for example distinguishing the hole from the data), 4 bytes of the time stamp, 2 bytes of variable’s quality (OPC standard compliant) and 1 to 4 bytes of variable’s value, depending on its type. Only those records that have significantly changed its value (i.e. more than one unit of the precision of registration established while setting of parameters) are stored to the file. For the slowly changing values (related to the established sampling rate) only a few records are to be stored. Most of time stamps are to be reduced to one byte or omitted at all during the compression, the marker is only left in the status byte. The compression is as better as lower precision of time registration is required. The compression enables also to reduce the most of values of the variable to 1 or 0 bytes. Only for values that are changed sharply and the change is much more than the established precision, the compression may be inefficient. The status byte can be also missed, whether the size of the reduced time marker and value of the variable are the same in the two consecutive records.

In the result, during the archiving of fixed-point or floating-point numbers with defined registration precision, typical size of the record after the compression is 1-2 bytes. The same size of the record is achieved for floating-point numbers without the registration precision set, with some of the ASMEN’s conversion functions, for which the raw value is an integer number. For the other floating-point numbers typical record size is 3-5 bytes.

The gaps in archive are also compressed and are 1-2 bytes sized.


7.3.3. Disk Memory for the B Archives

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.3. System Requirements > 1.3.3.3. Disk Memory for the B Archives

1.3.3.3. Disk Memory for the B Archives

For SQL databases is the similar situation

The database also contains, except data, indexes, fields limiting the records and null area resulting from the way of data spacing. Additionally, a log file is created. Estimated database size averages (without a log file):

  • 142 bytes per sample for a whole record with all additional fields;

  • 113 bytes per sample for a record without additional fields.

Therefore the B-type archive is not suitable for collecting a large amount of data. But the use of standard file format is its advantage. It is also the only archive, where missed data can be completed.


7.4. The Files Created by Programs of the ASPAD Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.4. The Files Created by Programs of the ASPAD Module

1.3.4. The Files Created by Programs of the ASPAD Module

The programs of the ASPAD module create themselves number of files of various purpose and place them in the directory defined in the configuration file. The files contain data, configuration information, archive files verification reports, copies of the original archive files after their possible repairing and diagnostic messages.


7.4.1. Archive Files of D, M, Y and H-Type

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.4. The Files Created by Programs of the ASPAD Module > 1.3.4.1. Archive Files of D, M, Y and H-Type

1.3.4.1. Archive Files of D, M, Y and H-Type

Splitting the Archive into Files According to the Time

Splitting Files into Resources

Filenames Convention

Examples

Splitting the Archive into Files According to the Time

Archives of D, M, Y and H-type are collected in files of four types, distinguished by time of data, collected in specific type of files. Every variable may be archived simultaneously in files of more than one type. For D, M and Y archives the files containing data from specific period are created every: 24 hours (D), month (M) or year (Y).

At the beginning of every period a new file with unique name is created. Files for previous periods are stored till the moment, when the time period, set in archive parameters, passes. Some of the files can be secured by software against automatic erasing, which is defined in Asix system parameters. Such files can be deleted during system maintenance. The oldest files are also deleted automatically in case of disk space shortage. Previously, the warnings are sent periodically, which allows aware reaction, for example copying the archive to the backup disk or tape.

Such approach allows flexible splitting the archive into parts. The 24-hours files are the smallest, which makes their maintenance, storing or selective deleting easier. However usually using the 24-hours files makes sense only for often sampled and changing data. Using those files for example with hourly data is causes disk memory loss, because the variable declaration in a new file takes up to about 40 bytes, and the disk memory for the variable data is allocated in 512 bytes chunks. Saving 24 records, which take up 1-2 bytes per record after compression, would cause the necessity of taking up 552 bytes for saving a few dozens points.

An example of effective disk usage is archiving temporary data in 24-hours files, 5-minutes averages in month files, and hour averages in year files.

The H archive files are not divided into periods, and the place freed by the old data is used again by the new data.

Splitting Files into Resources (archives)

Each resource (archive) is archived in separate files with localization declared separately for each resource. Name of the resource is a part of the filename.

Filenames Convention

Current filenames convention uses long filenames, allows encoding of any date and uses, accordingly to the Windows convention, uniform filename extension. It was introduced in version 6 of the ASPAD program, providing adjustment of the filenames to new ASPAD features and Windows system requirements.

The file name consists of a couple of elements, following this pattern:

Tyyyymmdd-resource.ahf

where:

T - one-letter name of the archive type (D,M,Y,H);

yyyy - 4-digit year, for H archive replaced with xxxx text;

mm - 2-digit month, for H and Y archives replaced with xx text;

dd - 2-digit day of the month, for H, M and Y archive replaced with xx text;

resource - name of the resource declared in the initialization file;

.ahf - constant extension text (ASPAD Historical File).

Examples

M200005xx-BLOCK.ahf means the month file from May 2000 for the BLOCK resource,

D20000416-DIV1.ahf means 24-hours file from April 16th 2000 for the DIV1 resource.


7.4.2. Archive Files of B and P-Type

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.4. The Files Created by Programs of the ASPAD Module > 1.3.4.2. Archive Files of B and P-Type

1.3.4.2. Archive Files of B and P-Type

During the work of B and P archive, databases are made by the ASSQL.DLL module in default direcotry of SQL server. Database contents may be browsed by means of standard tools used for SQL databases.


7.5. Configuring the System During the ASPAD Module Installation

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.5. Configuring the System During the ASPAD Module Installation

1.3.5. Configuring the System During the ASPAD Module Installation

Before running the ASPAD module it is needed to:

  • properly format the hard disk and install the Windows system– because of reliability and efficiency it is recommended to archive on the NTFS partition only,

  • create ASPAD configuration files (configuration files containing condition descriptions for conditional archiving),

  • properly parameterize the ASLINK and ASMEN programs, to enable cooperation with ASPAD, supplying it with data for archiving.

It is not necessary to manually create directories containing the archive, because ASPAD can create them by itself during startup.


7.6. Configuring and Starting the ASPAD Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module

1.3.6. Configuring and Starting the ASPAD Module

The ASPAD is loaded automatically while the Asix system starts running and its work parameters are read from the ASPAD section of the application configuration file. Loading of the ASPAD can be omitted, if the Simulation parameter is set up with use of Architect module:

Architect > Fields and Computers > Historical data module > Standard tab > Simulation option


7.6.1. Specification of Time Periods in Configuration Files

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.1. Specification of Time Periods in Configuration Files

1.3.6.1. Specification of Time Periods in Configuration Files

There is often the need to define in configuration files either the time horizon, frequency or duration of executing defined actions. The uniform way of specification of the above parameters has been applied for setting parameters of the ASPAD. Time description is given in the following manner:

<number><unit> [<number><unit>[…]]

where:

<number> - denotes the number of time units that are defined just after the number, the range of the number is from 1 to 32767,

<unit> - defines the time unit, the following units are allowed:

s - second

m - minute

h - hour

d - day

EXAMPLE

3600s or 1h = 1 hour

1h30m or 1h 30m or 90m = 1 hour 30 minutes

48h or 2d = 2 days


7.6.2. Definition of the Basic Parameters of Data Collecting

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.2. Definition of the Basic Parameters of Data Collecting

1.3.6.2. Definition of the Basic Parameters of Data Collecting

When the data collecting process starts there is the need to define some global parameters. Their specification is provided by the Historical data module in the Architect program.

The detailed descriptions of options are given in:

Data Server > Data Server Parameterization > Configuration of Archival Data.

The ASPAD archive is split into resources defined in declarations:

Read archive,

Write archive,

Slave archive,

Network archive,

Replicated archive.

Run of variables for a given source are written and read into/from archive files placed in directories declared in above archives.

The archive is defined by the following parameters:

resource - logical name of the archive,

type - type of resource parameterized:

STANDARD - archiving in files

MS SQL - archiving in database

additional parameters - parameters dependant on the type of resource.

See more in:

Data Server > Data Server Parameterization > Configuration of Archival Data > Archive Parameterization.


7.6.3. Automatic Backup

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.3. Automatic Backup

1.3.6.3. Automatic Backup

ASPAD can periodically create backup copies of the archive D, M and Y-type files on an additional disk. For this purpose the declaration BACKUP is used, which specifies, which files should be copied and when.

See: Data Server > Data Server Parameterization > Configuration of Archival Data > Archive Parameterization > Parameters Defining the Archive Backup Execution


7.6.4. Automatic Deleting of the Oldest Files

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.4. Automatic Deleting of the Oldest Files

1.3.6.4. Automatic Deleting of the Oldest Files for STANDARD Archive

It is possible to set in the ARCHIVE declaration the time, after which specified files of given resource should be automatically deleted. It gives the possibility of storing data, that should be deleted after specified time, expressed in days. It is recommended way of operation for storing data with the time horizon set. In previous versions of ASPAD program the H archive was used for that purpose. Current version accepts this type of archive only for keeping compatibility with previous versions.

Accidental, even momentary, serious change of computer time could lead to automatic erasing important files. To avoid such situation, after expiration of file validity, its name *.ahf is changed to *.ahr, and this file is still stored for another 10% of file validity period.

See: Data Server > Data Server Parameterization > Configuration of Archival Data > Archive Parameterization > Standard Parameters


7.6.5. Access to ASPAD Data via Network

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.5. Access to ASPAD Data via Network

1.3.6.5. Access to ASPAD Data via Network

ASPAD, in the presence of ASLINK program, makes the data collected in its archive files accessible on the network (the condition is also having an Asix key with server privileges). ASPAD acts then as the network server for those resources. Accessible data can be read from other computers in the network by means of ASPAD programs, for which the same resources has been specified in network archive parameters. Further they will be called network clients of these resources.

For the client, Find server repeat period defines how often to repeat the try of searching the server, if the resource currently is not available on the network:

Architect program > Fields and Computers > Historical data module > Standard tab

Parameter Time for Server Profile says how often, during the search for resources in the network, one should wait for server answer:

Architect program > Fields and Computers > Historical data module > Servers search tab


7.6.6. Variable Archiving Parameters

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.6. Variable Archiving Parameters

1.3.6.6. Variable Archiving Parameters

Archiving parameters are obtained from the variable definitions database (VarDef).

Archiving parameters in variables database are contained in fields with following names:

Parameter Field

Name Name

Archive Archive

Archiving parameters ArchivingParameters

Described parameters characterize the way of archiving the variable and they are supplement of the rest of parameters set in variable definitions database.

Special attention should be paid to type of the variable, defined by the conversion function of the ASMEN module. Way of packaging the variable in the archive depends on its type. That’s why ASPAD can’t archive data of another type than already collected in the archive, with the same variable name. Let’s suppose, that there was NOTHING (WORD type) conversion function declared for the variable. An archive of the WORD type variable has been created. Next, the conversion function was changed to NOTHING _INT (INTEGER type). ASPAD is not capable anymore of archiving this variable properly, and during startup produces warnings about differences between the type of data declared in ASMEN module and the type of archived data.

Variable declarations has the following form:

VName, ArcT, Period, Hor, Dt, Dx, Attr, Cond, BeforeCond, AfterCond

where:

VName - name of the variable, compliant with the declaration in configuration of the ASMEN module;

ArcT - one-letter definition of the archiving type;

Period - variable’s value sampling period; it should meet real needs, because too short period would cause increased disk space and bigger system’s time consumption, and too long period could cause the value trend to be presented incompletely;

Hor - minimal time horizon of storing data for H and B variable type; 0 value means infinite time, which is the default value; it is recommended to set finite horizon, because leaving 0 value can lead to exceeding the limit of 2GB for H and B archive files;

Dt - time registration details level, for example 30s means, that either data received at 14:27:45 and at 14:28:14 will be registered with time 14:28:00; setting the biggest possible value for dt allows better packaging data in archive files; minimal dt is 1;

Dx - data registration details level, which defines what changes of the variable value should cause saving the new value; with minor changes following changes will not be registered as unimportant, and during reading the previous value written in the archive will be valid in this place, for example 5 means, that new values should be registered only when the change regarding previously registered value is greater or equal to 5. 0 means registering with any change, omitting registering of the constant value; setting the biggest possible value for dx allows better compression of data in archive files;

Attr - Archiving attributes; several attributes delimited with pipe (‘|’) can be specified; see: Data Server > Process Data Processing of Data Server > Aspad - Data Archiving Module > Configuring and Starting the Aspad Module > Attributes of Archiving;

Cond - name of the optional archiving condition; see: Data Server > Process Data Processing of Data Server > Aspad - Data Archiving Module > Conditional Archiving;

definitions of archiving conditions can be found in files or can be declared directly in the parameter War

BeforeCond - the period before occurrence of Cond condition, the data from which should be saved to the archive; this parameter shouldn’t be too big, because it requires creating appropriate buffers in RAM, including the number of data samples for the specified period;

AfterCond - period after expiration of the Cond condition, the data from which should be saved to the archive.

Individual fields of declaration are separated with commas. Two commas, not separated with the parameter’s value mean accepting the default value. Omitting a few of the last parameters will assign them default values.

REMARK: Except primary archiving there is the possibility to declare an optional archiving for a specified variable. The parameters of additional archiving are entered into Archiving Parameters field of the variable definition database, near the basic archiving declaration (the declarations should be separated by a semicolon). The syntax of additional archiving declaration is the same as for the basic archiving. See: Data Server > Process Data Processing of Data Server > Aspad - Data Archiving Module > Configuring and Starting the Aspad Module > Primary and Optional Archiving

EXAMPLE

Figure. An Exemplary Declaration of Variables in VarDef (Variable Definition Base) in the Form of XLS File.

Is equivalent to below declarations.

# Save the KW_A000 variable in M-type archive,

# M-type archive (1-month files),

# receive data every 30 second,

# register the time with an accuracy of 10 second,

# register every change of variable value,

# don’t initiate the ASMEN variable value.

KW_A000, M, 30s, , 10s,

……………

# Save the KW_A048 variable in M-type archive,

# M-type archive (1-month files),

# receive data every 1 second,

# register the time with an accuracy of 1 second,

# register every change of variable value,

# don’t initiate the ASMEN variable value.

KW_A048, M, 1s, , 1s,


7.6.6.1. Primary and Optional archiving

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.7. Primary and Optional Archiving

1.3.6.7. Primary and Optional Archiving

Under one archive name (Archive field in a variable definition base) the variable can be optionally archived in an SQL database, simultaneously with achiving in files (D, M, Y and H-type). In other case it might be the need to analyse data archived with shorten sampling period than it is set in a primary archiving – then an optional archiving is recommended.

Declaring an optional archiving for a specified variable needs the following steps to be done:

1. For the name of archive in which the variable is to be optionally archived declare an appropriate archive kind (STANDARD, MS SQL), adequately to the way of additional archiving you need (D, M, Y, H, B or P):

Architect program > Historical data > <archive_name> > Standard tab

In a situation where, in addition to archives stored in files, eg daily files (as part of basic archiving), archiving of data in the SQL database is required (as additional archiving) - two types of archive should be set: STANDARD and MS SQL.

2. Enter the parameters of optional archiving in the definition of archived variable (in the variable definition database, in the Archiving parameters field). The declaration of optional archiving is placed after the declaration of primary archiving (the declarations should be separated by semicolon). The syntax of optional archiving is the same as the one for a primary archiving ( [image] see: Data Server > Process Data Processing of Data Server > Configuring and Starting the ASPAD Module > Variable Archiving Parameters).

In the case of using the editor for archiving parameters select the type of archiving parameterization: Primary and Additional archiving and define parameters of optional archiving on a separate tab of the editor (see:

see: Data Server > Process Data Processing of Data Server > Configuring and Starting the ASPAD Module > VVariable Archiving Parameters

Data Server > Process Data Processing of Data Server > Configuring and Starting the ASPAD Module > Editor of Archiving Parameters).


7.6.7. Atributes of Archiving

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.8. Atributes of Archiving

1.3.6.8. Atributes of Archiving

RESTORE

During startup ASPAD writes to the ASMEN module database the last value registered in the archive. It allows storing and retrieving of the values set by Asix system operator also when the computer is turned off. Attribute is generally intended for variables belonging to NONE type ASMEN’s transmission channel (no variable refreshing by reading from the controller). From the moment of ASPAD module start the values set before turning off will be accessible for all ASMEN module users in given system.

DONT_RESTORE cancels the RESTORE declaration.

NO_PACK

NO_PACK attribute changes two archiving features.

In the archive, in every archiving cycle, writing the value will be done, on the condition, the correct value will be obtained. So writing of the constant value will not be omitted in the following cycles.

During the read ASPAD will be set up for reading the points, not the segments. In normal mode ASPAD makes segments accessible, which means, that if value was written with time 1:00 and is valid for one hour (sampling cycle is 1h), then during startup at 2:00 a new value will appear, and if it doesn’t exists (a gap in the archive), a value from 1:00 will be repeated there. It allows drawing a segment from 1:00 h till 2:00 h and showing the hole in the archive yet from 2:00. NO_PACK attribute will cause reading only the value from 1:00.

PACK cancels NO_PACK declaration.

ALL

ALL attribute can be used only with B-type archive. Additionally, the variable must be obtained from the channel, whose driver provides additional services allowing to receive every incoming value. Currently the SINAUT driver has such capabilities.

ALL attribute will cause writing to the B-type archive all values received by driver, apart from the sampling cycle and the order of giving access to them. The sampling cycle then only means the time of validity of received data.

NOT_ ALL cancels ALL declaration.


Declaration of variable archiving - parameter editor

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.6. Configuring and Starting the ASPAD Module > 1.3.6.9. Declaration of Variable Archiving - Parameter Editor

1.3.6.9. Declaration of Variable Archiving - Parameter Editor

When creating a variable definiction database with the use of Architect one can declare archiving parameters using the editor of archiving parameters.

Architect > Databases > Variable definition editor (while variable definition database type is set to 'Edito mode' and the database is opened)

Fig.: The window of Archiving Parameter Editor.

You choose the type of archiving parameterization in Type field – the following types are available:

- No archiving;

- Primary archiving;

- Primary and Additional archiving.

The field Archive type determines archive type:

D – standard daily - data gathered in daily files;

M – standard monthly - data gathered in monthly files;

Y – standard yearly - data gathered in annual files;

H – standard In one file - data gathered in one file;

B - database - data gathered in MS SQL databases;

P - pattern – pattern data;

X - data gathered in MS SQL databases

Archives of the following types: D, M, Y, H need to be STANDARD archive kind. That means that the variable that has one of those archive types (netioned above) declared in archiving parameters – the STANDARD archive kind has to be declared in the archive parameters:

Architect >Fields and Computers > Historical data > <archive name> > Standard tab

The B, X and P archive type are declared for MS SQL archive kind.

The rest of editor fields enable declaring the following archiving parameters:

Primary parameters:

- Sampling period;

- Time registration precision;

Optional parameters:

- Value registration precision;

- Minimum time horizon of data storage;

- Restore the last value recorded In the archive;

- Do not compress data;

Optional parameters – conditional archiving:

- Archiving condition name or conditional expression;

- Archiving time before condition occurence;

- Archiving time after condition termination;


7.7. Conditional Archiving

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.7. Conditional Archiving

1.3.7. Conditional Archiving

Conditional archiving allows archiving only when specified conditions are met. It can be set, data from what period before occurrence of the condition and after its expiration should be saved in the archive.

Conditions can be defined directly in the definition of a variable in the variable definition database in the Archiving parameters field or in a separate condition file.


7.7.1. Declaration of Conditions

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.7. Conditional Archiving > 1.3.7.1. Declaration of Conditions

1.3.7.1. Declaration of Conditions

Declaration in files

Archiving conditions are defined with expressions in files. Every expression must be defined in a separate line. The name of the condition given in the file is then placed in the variable definition in the field Archiving parameters. The file name with archiving conditions should be declared in: Architect program > Fields and computers > Historical data > Standard tab > Conditions option

Values and arguments of expressions are constant or variable floating-point values, 32-bit masks, or logical values. Expression arguments can be other expressions, which means that complex expressions can be defined. Names of expressions can’t be repeated. If the expression value is not a logical value, and is used directly as a condition, a conversion is performed:

  • 32-bit masks, where all bits are zeroed, are converted to false, other to truth,

  • numbers for range(-0.5;0.5) are converted to false, other to truth.

Expression line has following structure:

Expression_name, Operator, Arg1, Arg2, ...

where:

Expression_name - expression identifier containing up to 15 characters; name of the expression cannot be repeated; expression names are a separate group, and thanks to it conflicts for example with identical variable name can be avoided;

Operator - name of one of the acceptable operators;

Arg1, Arg2, ... - expression arguments.

Arguments have following form:

[u][$]source

where:

u and $ - are optional and mean:

u - is one of one-argument operators:

– - means change of the sign with previous conversion to the floating-point number,

~ - means negation of mask bits with previous conversion to the 32-bit mask,

! - means negation with previous conversion to the logical value;

$ - means taking the value calculated during previous valuating of the condition for the specific variable and keeping current value for future calculations.

The source of data has one of the following forms:

decimal_number - numeric floating-point value (e.g. 9999);

0x hexadecimal_number - 32-bit mask encoded hexadecimally (e.g. 0xFFFF);

>> - plus infinity;

<< - minus infinity;

@variable_name - value of the process variable;

@ - value of the process variable, the condition is currently being specified for. Such condition has different values depending on the variable it is specified for;

?expression_name - value of another, previously defined expression. Complex expressions can be defined in this way.

Declaration in-line of Archiving condition

The variable declaration may include a condition for archiving this variable. The condition is placed in the field Archiving parameters, in the Cond parameter.

So far the variable declaration included the name of condition that was defined in a separate file. Aspad 7.12 available since the version 6.0.2 of Asix enables defining the condition directly in the variable declaration (in-line declaration). As the most conditions have a simple single-line form, it will allow to avoid creating the condition file.

Such the conditions are declared in the variable definition database with the use of Architect. This way of condition declaration can not be used with previous Asix package versions, because Architect of those versions does not interpret commas in a variable definition database correctly.

The in-line declaration can be defined in 2 ways:

Condition as an expression included in a variable declaration

Instead of condition name it is possible to enter a condition expression directly into the Archiving parameters field of the variable definition database.

The syntax of that condition expression is compatible with the one used for separate condition files. It has to be put in parentheses (). In such the expression the first parameter defining the condition name is omitted.

Examples

Archive when the bit 4 of the variable AAA equals 1:

(BAND, @AAA, 0x10)

Archive when the bit 4 or 8 of the variable AAA changed the state:

(BNE, @AAA, $@AAA, 0x110)

Archive when the bit 0 of archived variable changes the state from 0 to 1:

(BGT, @, $@, 0x1)

Archive when the value of archived variable is out of the interval (20,80):

(IN, @, <<, 20, 80, >>)

Condition as an argument in a variable declaration

Instead of condition name it is possible to enter a condition expression directly into the Archiving parameters field of the variable definition database, in accordance with the syntax of condition argument defined in condition files. Such the expression has to start from !, -, ~, $, @ or ?.

Examples

Archive when the variable AAA is out of the interval (-0.5; 0.5):

@AAA

Archive when the variable AAA is in the interval (-0.5; 0.5):

!@AAA

Archive when a previous value of the variable AAA was out of the interval (-0.5; 0.5):

$@AAA

Archive when the condition QQQ is not performed:

!?QQQ


7.7.2. Archiving Condition Operators

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.7. Conditional Archiving > 1.3.7.2. Archiving Condition Operators

1.3.7.2. Archiving Condition Operators

Logical Operators

Relational Operators

Logical Bitwise Operators

Relational Bitwise Operators

Arithmetic Operators

Range Test Operator

Condition operators can have various types of results and various number and type of arguments, depending on the type of operator. In case of incompatibility of argument type with the type accepted by the operator, a conversion is made automatically. Below currently defined operators has been described.

Logical Operators

OR logical sum

AND logical product

XOR exclusive logical sum

Arguments type: logical value

Result type: logical value

Number of arguments: any

Relational Operators

LT less

LE less or equal

EQ equal

NE different

GE greater or equal

GT greater

Arguments type: numeric value

Result type: logical value

Number of arguments: 2

Logical Bitwise Operators

BAND logical product of all bits of arguments

BOR logical sum of all bits of arguments

BXOR logical exclusive sum of all bits of arguments

Arguments type: 32-bit mask

Result type: 32-bit mask

Number of arguments: any

Relational Bitwise Operators

BLT sets bits given in Arg3, which in Arg1 are < than bits in Arg2

BLE sets bits given in Arg3, which in Arg1 are < or = to bits in Arg2

BEQ sets bits given in Arg3, which in Arg1 are = to bits in Arg2

BNE sets bits given in Arg3, which in Arg1 are not = to bits in Arg2

BGE sets bits given in Arg3, which in Arg1 are > or = to bits in Arg2

BGT sets bits given in Arg3, which in Arg1 are > than bits in Arg2

Arguments type: 32-bit mask

Result type: 32-bit mask

Number of arguments: 2 or 3. If only 2 arguments are given, it is assumed, that Arg3=0xFFFFFFFF.

Arithmetic Operators

ADD arithmetic sum

MUL arithmetic product

DIV arithmetic quotient Arg1 / Arg2.

Arguments type: numeric value

Result type: numeric value

Number of arguments: ADD and MUL - any, DIV - 2.

Range Test Operator on the value within the given ranges

IN fulfilled, when value of Arg1 is within the range [Arg2, Arg3], or in the range [Arg4, Arg5] etc.

Arguments type: numeric value

Result type: logical value

Number of arguments: odd number not less than 3.


7.7.3. Condition Examples

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.7. Conditional Archiving > 1.3.7.3. Condition Examples

1.3.7.3. Condition Examples

Archive, when 4. or 8. bits of AAA variable has changed their status:

CONDITION, BNE, @AAA, $@AAA, 0x1100

Archive, when bit 0. of archived variable changes its status from 0 to 1:

CONDITION, BGT, @, $@, 0x1

Archive, when value of the archived variable is out of range (20,80) and one of the bits 0-3 of WWW variable is set:

W1, IN, @, <<, 20, 80, >>

W2, BAND, @WWW, 0xF

CONDITION, AND, ?W1, ?W2

Archive in the moment, when the value of archived variable exceeds the limit of 100:

W3, GT, @, 100

CONDITION, AND, ?W3, !$?W3

Fig. Example of Condition Declared in a File (Condition Name Declared in Variable Database in Archiving Paramaters).


7.7.4. Declaration of Archiving Condition In-Line

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.7. Conditional Archiving > 1.3.7.4. Declaration of Archiving Condition In-Line

1.3.7.4. In-Line Declaration of Archiving Condition

The variable declaration may include a condition for archiving this variable. So far the variable declaration included the name of condition that was defined in a separate file. Aspad 7.12 available since the version 6.0. 2 of Asix enables defining the condition directly in the variable declaration (in-line declaration). As the most conditions have a simple single-line form, it will allow to avoid creating the condition file.

Such the conditions are declared in the variable definition database with the use of Architect. This way of condition declaration can not be used with previous Asix package versions, because Architect of those versions does not interpret commas in a variable definition database correctly.

The in-line declaration can be defined in 2 ways:

Condition as an expression included in a variable declaration

Instead of condition name it is possible to enter a condition expression directly into the Archiving parameters field of the variable definition database.

The syntax of that condition expression is compatible with the one used for separate condition files. It has to be put in parentheses (). In such the expression the first parameter defining the condition name is omitted.

Examples

Archive when the bit 4 of the variable AAA equals 1:

(BAND, @AAA, 0x10)

Archive when the bit 4 or 8 of the variable AAA changed the state:

(BNE, @AAA, $@AAA, 0x110)

Archive when the bit 0 of archived variable changes the state from 0 to 1:

(BGT, @, $@, 0x1)

Archive when the value of archived variable is out of the interval (20,80):

(IN, @, <<, 20, 80, >>)

Condition as an argument in a variable declaration

Instead of condition name it is possible to enter a condition expression directly into the Archiving parameters field of the variable definition database, in accordance with the syntax of condition argument defined in condition files. Such the expression has to start from !, -, ~, $, @ or ?.

Examples

Archive when the variable AAA is out of the interval (-0.5; 0.5):

@AAA

Archive when the variable AAA is in the interval (-0.5; 0.5):

!@AAA

Archive when a previous value of the variable AAA was out of the interval (-0.5; 0.5):

$@AAA

Archive when the condition QQQ is not performed:

!?QQQ


7.8.1. Special Features of B-Type Data Collection

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.1. Special Features of B-Type Data Collection

1.3.8.1. Special Features of B-Type Data Collection

The B-type archive enables to make use of typical databases for storage of the ASPAD archive. On the one hand it makes possible to take advantages of that archive in more flexible manner and preserves opportunity to use it also by programs that are not included in the Asix package. It is the only collecting method that enables filling gaps that have appeared in the archive. On the other hand no form of data compression or omitting unimportant changes of values is possible and each record takes over 100 bytes (having considered index files).

Asix enables archive storage in databases of SQL environment.

Because reading and writing to B-type archive is slower, and files are of bigger size than in D or M archives, sensible solution is to use for example D-type archive for registering data for the charts, and B-type archive for storing aggregated data (e.g. hour averages for reports).

B-type archive also enables:

  • archiving of additional information about archived points,

  • archiving of particular variable groups in multiple databases,

  • insequential archiving (values can come in any order),

  • automatic archive indexing and database name in SQL environment,

  • browsing the contents of B-type archive databases with BBrowserSQL or tools used to browsing of SQL databases.


7.8.2. Additional Requirements for B-Type Archives

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.2. Additional Requirements for B-Type Archives

1.3.8.2. Additional Requirements for B-Type Archives

Data Archiving with SQL Database

System software:

Connecting with SQL databases demands:

  • MDAC in 2.8 version (or newer) for database client (a station with the Asix system);

  • Microsoft SQL Server 2008 or newer for database server;

  • database user have to possesses an account, on the SQL server station, ensuring writing to database;

  • disc with a database can not have an active compression.

Asix software:

Access to database is realized by ASPSD.DLL (from 6.25 version) with ASSQL.DLL (from 6.00 version).

To enable B-type archiving, it is necessary to load an additional AsSQL.DLL library by declaration of MS SQL archive with the use of Architect program:

Architect program > Fields and Computers > Historical data > add new definition with the following parameters:

- archive name;

- kind of Archive: MS SQL,

- additional parameters.

User authorizations:

User authorizations are verified on Windows level. So authorizations of database access on SQL server computer should be assigned to the current user.

During first asix startup the database is created – but only when the user has authorizations for database/user creation.

These notes refer to all databases declared for ASPAD in data server configuration file, also to be used only in the synchronization declaration ( [image] See: Data Server > Parameterization of Data Server > Configuration of Archival Data > Archive Parameterization > Declaration of Synchronization of B-type Archive Contents with MS SQL Database).

Declaration of share on the server:

In versions Asix 9.0.1 or newer with MS SQL Server 2008 or later, the ASSQL share is unnecessary.

Writes to the archive as well as synchronization need the temporary direction to be created on the server computer (to which the write is performed) as the share named ASSQL. It is necessary to make an access to temporary direction, where the writes will be performed, for all users. This direction is used to exchange of files that allow multiple increase of write rate to database.

It is also necessary to create ASSQL share when database is placed on the same computer from which the write operation is performed.


7.8.3. Replenishment of Data in the B-Type Archives

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.3. Replenishment of Data in the B-Type Archive from PLC

1.3.8.3. Replenishment of Data in the B-Type Archive from PLC

The B-type archives allow merging data in gaps that have appeared as result of missed links to a data source or turning the computer off. For making possible execution of such replenishment of data it is necessary, that the device, that is a data source, would make available not only the current data, but historical data too. The ASMEN together with drivers of that device must make available access to these data. Historical data is provided by the following drivers: BASE, DMS285, DMS500, Talas, Macmat, DataPAF, Mevas.

The parameters Time of first acquisition and Acquisition period let to define, when such replenishment should be executed:

Architect > Fields and Computers > Historical Data > Acquisition of historical data


7.8.4. Synchronization with a Dual Database

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.4. Synchronization with a Dual Database

1.3.8.4. Synchronization with a Dual Database

Function of synchronizing the archive with dual database allows on-line data replenishment, that ensures replenishment of historical data and manual data edition.

The synchronization causes incremental copying. Only the data that have been escribed or changed in source archive from the last copying. In case of conflict with existing data, the data with better quality are stored in the destination file. In case of data with the same quality, manual entry data are preferred.

Many SYNCHRONIZE declarations may be set, also for one source. It allows e.g. replenishing data from several dual servers.

Details referring to synchronization are in:

Data Server > Parameterization of Data Server > Configuration of Archival Data > Archive Parameterization > Declaration of Synchronization of B-type Archive Contents with MS SQL Database.

Advices on Using Synchronization Declaration

Synchronization declaration can be used for many reasons:

    • mutual replenishment of operator station data;

    • creating a follow-up archive on mediating server;

    • making the archive copies.

Mutual Replenishment of Server Data

Synchronization declaration allows mutual replenishing data between serwers. It has a few advantages in comparison with a typical solutions in ASPAD module:

    • it allows on-line data replenishment, not only during startup;

    • it replenishes all changes in archive, including on-line replenishment of both historical and manually written data.

Creation of Follow-Up Archive on Mediating Server

The source only for read may be declared on mediating server, and then its synchronization from operator stations can by set. Such a server will not take the current data form the ASMEN module. The data will be received from operator stations with database synchronization in cycles. The synchronization will includes all escribed data, also historical.

Making the Copies of Archive

SYNCHRO declaration can be used for making the reserve archive. The copy should be placed on other than main station. The copy will be fully functional database.

Any Asix need not operate on SQL server where the copy is created. The only purpose of synchronization operation is to receive a reserve database.

Such a kind of copy can be used only on a limited scale, because in comparison with reserve copy created by SQL system, it has a few faults:

    • it has a large size, because contains transaction log files, index files and null area that arises from the way of data arrangement on SQL server;

    • it may not be created on the disc with compression.

Requirements

Declaration of participation on the server computer:

Writing to the archive and synchronization require creating a temporary directory, made available as a share named ASSQL, on the computer of the server to which the record is being executed. It must be made available for writing to all users on whose account the entries will be made. This catalog is used to exchange files that allow you to increase the speed of writing to the database many times.

The ASSQL share must also be created if the database is on the same computer from which the writing operation is performed.


7.8.5. Database Declaration

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.5. Database Declaration

1.3.8.5. Database Declaration

It is necessary to declare the proper archive source, database and server name when archiving in the database of is applied.

During the first Asix system startup the database is automatically created and the user need to have proper authorizations for database creation.

Details concerning the database declaration are in:

Data Server > Parameterization of Data Server > Configuration of Archival Data > Archive Parameterization.


7.8.6. Declaring the Variables for Archiving in Database

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.6. Declaring the Variables for Archiving in Database

1.3.8.6. Declaring the Variables for Archiving in Database

The declaration of variables for archiving in database is made by means of the proper parameters of variable archiving (See: Variable Archiving Parameters).


7.8.7. Additional Information about Archived Points

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.7. Additional Information about Archived Points

1.3.8.7. Additional Information about Archived Points

Typically, value and time of the point are archived, and the archive can be parameterized in the manner allowing enhancing the record with additional fields. B-type archive allows saving the following set of fields (labels used in ARCHIVE declaration are given in the brackets):

Data Archiving in SQL Database

SQL database of B-type archive may contain the following fields:

  1. Obligatory fields:

  • basic time (T),

  • datum quality;

  • value (X).

  2. Optional fields:

  • time of the data (XT),

  • write time (WT),

  • validity period of sample (VT).

X value

Number specifying variable value.

T basic time

In archiving with the sampling cycle set it’s the time of beginning the following cycle. It is defined in following way:

time of the data is rounded to the closest multiple of registration details level set, for example with registration details level set to 5 minutes 1:17:30 will be rounded to 1:20:00, 1:22:00 to 1:20:00, and 1:22:30 to 1:25:00;

time rounded in this way is rounded down again to the multiple of sampling cycle, for example with 15-minutes cycle time 1:20:00 and 1:25:00 will be rounded to 1:15:00.

In archives without the cycle assigned (ALL attribute) it is the time of the data rounded only to the set registration details level.

XT time of the data – optional field

Exact time assigned to the variable, rounded with accuracy set during parameterization. If the archive was given the ALL attribute, then it is equal to the basic time.

WT write time – optional field

The time of data write to database. This filed is important in systems with delayed data obtaining

VT validity period of sample - determines whether validity time of period will be archived in database (+VT), or it will be omitted and the default validity time will be the archiving period (-VT); if the archiving period will be shortened in the future for –VT, then historical data will be separated by gaps; by default the validity time is archived.

Switching on the option causes adding 4-byte field to each data record.

SV 2-byte identifiers of variables - an optional field. When the option is used, identifiers of variables will be 2-bytes instead of 4-bytes. The option is valid only in applications in which 32 767 variables will be declared in a singular database, including the variables that were added and after that deleted.

SD 4-bytes identifiers of archived data records - an optional field. When the option is used, identifiers of archived data records will be 4-bytes instead of 8-bytes. The option is valid only in applications in which 2 147 483 647 samples will be recorded in a singular database, including the samples that were recorded and after that deleted as well as the samples that were corrected, e.g. in synchronization with another archive (the sample with the worse quality is replaced by the sample with the better quality, and counter of samples increases by 1).

Details concerning the parameterization of additional information of archived points are in:

Data Server > Parameterization of Data Server > Configuration of Archival Data > Archive Parameterization > Standard Parameters


7.8.8. Archiving in Multiple Databases

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.8. Archiving in Multiple Databases

1.3.8.8. Archiving in Multiple Databases

It is possible to declare multiple archives / databases for one application in which archiving of process variables will be carried out. This means creating multiple archives, each of which is assigned to a different MS SQL database.


7.8.9. Insequential Archiving

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.9. Insequential Archiving

1.3.8.9. Insequential Archiving

After setting the ALL attribute, all the data received by ASMEN’s driver will be saved to the B-type archive, apart from the order of receiving them.

See: Data Server > Process Data Processing of Data Server > ASPAD - Data Archiving Module > Configuring and Starting the ASPAD Module > Atributes of Archiving


7.8.10. Browsing the Contents of B-type Archive Database with the BBrowse Browser

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.8. B-Type Data Collection > 1.3.8.10. Browsing the Contents of B-type Archive Database with the BBrowse Browser

1.3.8.10. Browsing the Contents of B-Type Archive Database with the BBrowse Browser

In the case of SQL type databases - you can view their contents using standard tools designed for this purpose.


Pattern Trends of P-Type

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.9. Pattern Trends of P-Type

1.3.9. Pattern Trends of P-Type

Warning:
Patterns of this type were used in the Classical Asix. In Asix.Evo, other solutions are recommended.

Declaration of such a graph can not be placed in the archive for writing - it must be declaration of read or network archive.

For the Read archive containing P-type graphs, a database declaration (Read archive declared as MS SQL) is required, in the same way as for B type graphs.

The pattern graph declaration requires:

1. creating the archive;

2. declaring in the definition of the variable to be archived, the names of the graph in the Name field, P archive type in the archiving parameters (Archive parameters field) and the name of the created archive (Archive field).

The name of the waveform should not be the name of any Asix variable.

The validity time of the data is always set to 1 day for the P graph, and the other parameters are not significant.

***

The PEdit program is used to generate pattern graphs.

 A detailed description of the use of the PEdit program can be found in the "Asix Classic Pattern Trends" manual.


Aggregation of Archival Data

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.10. Aggregation of Archival Data

1.3.10. Aggregation of Archival Data

Since the version 5, the Asix system has the function of aggregating archived data. This function is performed by the Aggregator module. The calculated aggregates are made available to programs downloading data via AsixConnect servers (programs: AsTrend, AsAlarm and script module).

Aggregator reads raw data and on the basis of it calculates the given aggregates. It can also store them in the aggregated data archive.

Aggregator also allows you to aggregate when reading data. Based on raw data and saved aggregated data Aggregator calculates aggregates also in periods other than those archived.

The archive of aggregated values is stored in binary files of internal format.


7.10.1. Aggregation Condition

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.10. Aggregation of Archival Data > 1.3.10.1. Aggregation Condition

1.3.10.1. Aggregation Condition

Aggregator uses the basic type of data archive (STANDARD), which requires defining the basic type of archiving for each variable.


7.10.2. Parametryzacja

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.10. Aggregation of Archival Data > 1.3.10.2. Parameterization

1.3.10.2. Parameterization

Parameters of aggregation and archiving of aggregates are stored in the XML configuration file of the Data Server of the Asix system.

Architect > Fields and Computers > Historical Data > <archive_name> > Aggregates tab

Parameters:

Periods list – aggregation period list in Aspad convention, separated by horizontal lines, i.e. 5m|1h, means calculation 5 minutes and 1 hour aggregates;

Aggregates list – aggregates short names list, separated by horizontal lines, i.e. QGood|QBad|Avg

Aggregation horizon – aggregation limit for oldest data, in Aspad convention, i.e. 366d means that aggregates oldest than one year will not be archived. Aggregation horizon is not required, empty value means all data aggregation.

Warning: Periods list and Aggregates list are obligatory parameters.


7.10.3. The List of Aggregates

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.10. Aggregation of Archival Data > 1.3.10.3. The List of Aggregates

1.3.10.3. The List of Aggregates

The list of aggregates:

- Start - value at the beginning of interval

- End - value at the end of interval

- Delta - difference between the value at the end and beginning of interval

- Min - minimal value in interval

- Max - maximal value in interval

- Range - difference between maximal and minimal value in interval

- Total - sum of time weighted values in interval (time integral)

- Total0 - sum of time weighted values (time integral); for periods when the sample quality is bad, the value of 0 is being used.

- Average - average form time weighted values in interval

- Average0 - average from time weighted values in interval; for periods when value of variables is not accessible; 0 value is used;

- Quality_Good - percentage of samples with good quality in interval

- Quality_Uncertain - percentage of samples with uncertain quality in interval

- Quality_Bad - percentage of samples with bad quality in interval

- Quality_Good_Duration - the duration (in seconds) of time in the interval during which the data is of good quality

- Quality_Uncertain_Duration - the duration (in seconds) of time in the interval during which the data is of uncertain quality

- Quality_Bad_Duration - the duration (in seconds) of time in the interval duing which the data is of bad quality

- Sum_Up - the sum of positive value of changes from the last known value before the beginning up to the last value before the end of the resample interval.

For the types FLOAT, DOUBLE and INT64 result is stored as FLOAT, for other types as LONG.

Sum_up can be used to calculate the number of starts. All you need in this case is to aggregate a variable that takes the value of 0 when device is turned off, and the value of 1 when turned on.

- Sum_Down - the sum of negative value of changes from the last known value before the beginning up to the last value before the end of the resample interval.

For the types FLOAT, DOUBLE and INT64 result is stored as FLOAT, for other types as LONG.

Sum_up can be used to calculate the number of stops. All you need in this case is to aggregate a variable that takes the value of 0 when device is turned off, and the value of 1 when turned on.

- Previous_Known - the last known value before the beginning of the resample interval.

For the types FLOAT, DOUBLE and INT64 result is stored as FLOAT, for other types as LONG.

- Last - the last known value in the resample interval, not including the end of the interval.

For the types FLOAT, DOUBLE and INT64 result is stored as FLOAT, for other types as LONG.

- Standard_Deviation - time weighted standard deviation of the data over the resample interval. The result is always FLOAT.

Standard_Deviation is calculated according to the formula:

- Root_Mean_Square - time weighted rms of data over the resample interval. The result is always FLOAT.

Root_Mean_Square is calculated according to the formula:

- Average_Last_Known - time weighted average data over the resample interval; treat bad values as continuation of last known value. The result is always FLOAT.

Average_Last_Known is a better solution for variables which have constant value in long periods, e.g. device operation signal, than Average is.

- Total_Last_Known - totalized value (time integral) of the data over the resample interval; treat bad value as continuation of last known value

One of the way of using Total_Last_Known is calculation of the time of device operation. All you need is to aggregate a variable that takes the value of 0 when device is turned off, and the value of 1 when turned on. The result will be the operation time in seconds.


Archiwum X

Home > Data Server > 1. Process Data Processing of Data Server > 1.3. ASPAD - Data Archiving Module > 1.3.11. Archive X

1.3.11. Archive X - Support for Data with Time Stamps with an Accuracy of Less than a Second

Current Data

In earlier versions of the package, the current data module Asmen was able to acquire current and historical data with the frequency and precision of data up to one second (excluding events and alarms).

There is a new version available from the Asix 9.0.5 package. It can refresh current data up to 10 times per second. Of course, the condition is that the data source (e.g. a driver) provides data sufficiently fast and there is a sufficiently high speed connection.

Historical data

The historical data module Aspad so far has been able to archive data no more frequently than every second, with the accuracy of up to one second.

Aspad 9, in the Asix version 9.1, has been changed so that it can process all data of the current data module with full accuracy of time, even up to 100 nanoseconds. It can also record data with such resolution - theoretically every 100 nanoseconds. In practice, the limit is the allowable refresh rate of the data source, the bandwidth of the link and the capabilities of the current data module, i.e. a maximum of 10 samples per second.

Not every archive type can register data with such frequency. In the standard archives, there is a limitation to one sample per second. Archive B now allows recording with an accuracy of 1/300 of a second, but due to the large size of records, it is not recommended to use frequent sampling for this type of archive for variables stored for longer periods of time.

Due to the above restrictions, a completely new type of archiving has been developed - Archive X. This archive, stored in the SQL database, is subjected to data compression and allows storing time with specified precision, up to 100 nanoseconds. The data can be archived according to the refresh rate of the value by the current data module Asmen, i.e. with a minimum period of 100 milliseconds.

Parameterization of archiving changes slightly, but:

- Architect also gives the possibility to declare Archive X and enables the creation of a database on the SQL server immediately if we use an account with sufficient privileges;
- in the variable database you can now declare the type of X archiving;
- in the archiving parameters, you can set the frequency and the registration precision below one second, giving the fractional part of seconds after the dot
- it is not allowed to parameterize variables in Archive X, without specifying the precision (greater than zero) of registering the variable value;
- the default value of the timestamp precision, when this variable parameter is omitted, for the archive D, M, Y, H and B is 1 second, and for the archive X is equal to the variable registration period;
- the value of the timestamp precision, when zero is specified in the parameters of the variable, for the archive D, M, Y and H is 1 second, for B - 100 milliseconds, and for the archive X - 100 nanoseconds.

There are some limitations in the use of Archive X:

- data are not available in the classic version of Asix.

Requirements:

Microsoft SQL server from the version 2008 R2.


8. ASLINK - Network Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module

1.4. ASLINK - Network Module

The ASLINK is the module that enables communication between various components of the Asix system by means of the local network (LAN). The ASLINK defines a set of network services used by other programs of the Asix system, which are configured to use the network.

The ASLINK uses services provided by the NETBIOS emulator, i.e. the program that implements one of the most common and widespread used network standards on the transport layer. Specification of the NETBIOS was developed by the IBM Company, the ASLINK is based on the specification of the NETBIOS v. 3.0 included in the Local Area Technical Reference of IBM (IBM Part Number SC30-3587-00). The backgrounds of the operation of the ASLINK are NETBIOS services of so called link-oriented (session-oriented) data transmission.

Aslink version for WINDOWS NT, WINDOWS 2000, WINDOWS XP systems uses the standard NETBIOS interface provided by the mentioned operating systems.

Installation of network services is not necessary for such configurations of the Asix system, where access to the computer network is not required.


8.1.1. Services of Reliable Data Transmission

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.1. General Characteristics of the ASLINK Module > 1.4.1.1. Services of Reliable Data Transmission

1.4.1.1. Services of Reliable Data Transmission

The basic service provided for such components of the Asix package as, among others, ASMEN and ASPAD and sub-system of alarm handling, is reliable data transmission between every pair of processes operating on any stations connected to the computer network and handling the common user's protocol. For this area, the services of the ASLINK module aim to support communication based on existence of the "server" process as well as the "client" one that uses server services. In details, the ASLINK provides:

  • searching for the processes in the network that can perform server function related to the resources needed for the client processes,

  • establishing the link (so called channel) between the client and the server of the resource pointed by the first one,

  • reliable duplex data transmission in every channel,

  • information for the processes that communication channel has been closed because of the network failure or for direct order of one of partners.


8.1.2. Time Synchronization Service

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.1. General Characteristics of the ASLINK Module > 1.4.1.2. Time Synchronization Service

1.4.1.2. Time Synchronization Service

In case of the Asix network installation the time synchronization of every station over the network is very important. For this purpose at least one workstation should be provided with high quality source of current time and act as a timeserver for other network workstations. This is why the function of time synchronization has been implemented within the ASLINK network module. Depending on parameters having been set for the ASLINK, it can perform function of a timeserver or it can synchronize only its own time with active timeserver. A priority is assigned to every time. At the moment only the timeserver of the highest priority is active. Logging to the network a new server of higher priority causes the current timeserver to change its mode to the ordinary synchronization mode, i.e. it will receive time from the new server. Turning the current server off (or its failure) causes activation of one of the other servers. The other parameter that characterizes operating of the new server is frequency that the server broadcasts its time in all over the network. All the workstations, that receive the current time broadcaster by the active server, execute synchronization of its time if the discrepancy between their own time and the server broadcasting exceed the maximum value defined by the appropriate parameter.


8.1.3. Remote File Access Services

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.1. General Characteristics of the ASLINK Module > 1.4.1.3. Remote File Access Services

1.4.1.3. Remote File Access Services

The ASLINK module provides services related to file transfer between network workstations. Based on these services remote file browsing, copying a file onto a local disk, file writing onto the remote disk and file deleting are possible in the network of the Asix stations. The options related to file writing/deleting might be granted separately for individual stations. For this purpose the parameters of the ASLINK module can be set in the appropriate manner.


8.1.4. Multi-Board (PCB) Configurations

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.1. General Characteristics of the ASLINK Module > 1.4.1.4. Multi-Board (PCB) Configurations

1.4.1.4. Multi-Board (PCB) Configurations

The ASLINK is able to operate with a number of network boards simultaneously. It does not enable direct link of computers of two different networks. Data transmission between networks needs additionally to run on the gateway computer specifically configured ASMEN and ASPAD.


8.2.1. Types of Supported Local Area Networks (LANs)

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.2. Types of Supported Local Area Networks (LANs)

1.4.2. Types of Supported Local Area Networks (LANs)

Aslink can work in any network accepted by operating systems on which the Asix system operates.

There are 2 types of operation:

1. based on NETBIOS - in the configuration of the network card it requires the inclusion of NetBT protocol support;

  • it works in all versions of the Asix system;

  • it works in two variants:

- only in one local network - normal mode; active search for servers;

- if used in several segments - session connections (use the Session connections option); it requires defining all servers with which connections will be made;

2. use of own protocol based on TCPIP;

  • operates in a wide area network and many segments of the local network;

  • it requires defining all servers with which connections will be made;

  • operates on the Asix system from version 6.0

It is recommended to use your own protocol based on TCPIP.

Communication between Asix system modules on one computer takes place through the internal protocol.

If the Architect program is started without launching the Asix system application, and the Asix6 server uses only the TCP / IP protocol or is located on a different subnet, configure the TCP / IP connection with this server using the command: Architect > Tools menu > Network module - options for server.


8.3. Configuration of Aslink Module

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module

1.4.3. Configuration of Aslink Module

Parameterization of Aslinik module is realized with use of Architect module.

See: Data Server > Parameterization of Data Server > Configuration of Network Module.


8.3.1. Station Identification

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.1. Station Identification

1.4.3.1. Station Identification

Stations are identified by names. Every station should be given a unique name in the network. Except for the individual name, every station belongs to the group of stations, having common group name. Between stations belonging to different groups data exchange is not possible. The same goes for time synchronization – the time of one station is synchronized inside of one group only. Exception to the above rule are stations working under control of the networking module version lower than 5.00.000. Network module version 5.00.000 or higher, configured to work with stations with lower versions will be able to make connections and synchronize time with them. Stations working under control of older versions of the network module belong to all groups.

The Name parameter is used to give the station its unique network name:

Architect > Fields and Computers > Network Module > Computer Name > Automatic setting of network names of computers / Network name of computer

The Group Name parameter assigns group name to the station:

Architect > Fields and Computers > Network Module > NetBIOS Communication > Advanced > Group Name


8.3.2. Access to the Network

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.2. Access to the Network

1.4.3.2. Access to the Network

The ASLINK network module enables access to network via logical adapters. Logical adapter is a physical network adapter and a set of network protocols. Logical adapters are identified by their numbers or names. In Windows NT system, the logical number binding with protocols and physical network adapters can be determined with network settings of the operating system. These bindings can be also read with AslView program. In Windows 2000 and XP system the information about bindings can be only obtained with AslView program.

The set of logical adapters is given with the Used network cards and protocols parameter (Architect > Fields and Computers > Network Module > NetBIOS Communication > Network Protocols). The values of this parameter are logical adapter numbers or names separated with commas. If the „*” character is given as the value, all the logical LAN adapters, available in the operating system, will be used (for WAN – Internet and RAS – adapters specify “*,WAN”). General form of the Adapters parameter is described at the end of this chapter.

In some applications it is necessary to reduce the set of stations, which can be interconnected. This is performed with use of Network cards and protocols used by network module to search for servers parameter (Architect > Fields and Computers > Network Module > NetBIOS Communication > Network Protocols). The adapters, on which the servers will be searched, are given as the value. The parameter affects only clients on local station. It doesn’t limit connections, initiated by remote clients. Lack of this parameter or passing the ‘*’ character as its value will result in using all adapters to do the search.

Another way of limiting the set of stations, that can be connected, is using Network name of computers filtering parameter (Architect > Fields and Computers > Network Module > Advanced tab). The value of this parameter is a comma-separated list of names of stations, which can be connected to. The parameter affects only for making connections to remote servers. Clients on remote stations can connect to servers on local station without restrictions. If the filter name contains ‘?’ character, remote station name will not be compared with filter in this characters’ position. For example, if there are stations named “A1X”, “A2X”, and “B1X” on the network, and the filter name is “A?X”, connections to servers on stations “A1X” and “A2X” will be possible, but not to “B1X” station. The filter name may contain the ‘*’ character. In such a case, names of the filter and station are compared only in the part of the name preceding the ‘*’ character.

EXAMPLES

The adapters defined in the system:

Table. Logical Adapters of Aslink.

Selected protocols = NBF

all logical adapters with Nbf protocol, but without WAN – type links

Selected protocols = Realtek&#2

all logical adapters bound with "Realtek RTL8029(AS) PCI Ethernet Adapter Board #2"

Selected protocols = Nbf&Realtek, IPX

all logical adapters bound with Nbf protocol and Realtek boards and all logical adapters bound with IPX protocol (NwlnkNb)

Selected protocols = tcpip

all logical adapters bound with TCP/IP protocol, but without WAN – type links

Selected protocols = tcpip&3Com

logical adapter 2 (TCP/IP protocol on 3Com board)

Selected protocols = NETBEUI&In

logical adapter 8 (incoming WAN connection)

Selected protocols = - TCPIP&3Com

all adapters except for logical adapter 2 (TCP/IP protocol and 3Com board ) and WAN – type links

Selected protocols = - IPX

all logical adapters except for adapters bound with IPX protocol and WAN – type links

Selected protocols = - /2

all logical adapters except for adapters bound with board No. 2 (slot number) and WAN – type links

Selected protocols = 1,3,5

logical adapters 1, 3 and 5

Selected protocols = *, wan

all logical adapters

Default value of adapters specification has form:

Selected protocols = *

which means all adapters except for those bound with WAN – type links


8.3.3. Time Synchronization

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.3. Time Synchronization

1.4.3.3. Time Synchronization

ASLINK network module can synchronize its time with other stations (Architect > Fields and Computers > Network Module > NetBIOS communication > Time Synchronization).

Time synchronization with other stations can be turned off by setting the value of Disable Time Synchronization parameter. If the difference of time between the station and a remote server exceeds value set by Maximal Time Difference parameter, in at least as many following received packets, as defined by Time Packets Count parameter, the time of the local station will be set. Maximum time difference is given in seconds. The Time synchronization limitation parameter is used for limiting the set of timeservers that the time may be synchronized with. Its value is the list of timeservers. Like in case of filters, server names can contain ‘?’ and ‘*’ characters. In order to the station to change its time it must receive from one time server at least the number of following time packets, equal to this defined with Time Packets Count parameter.

In order to the station to act as a timeserver in the network it is necessary to set Time Server Priority and Time Server Interval parameters. If one of these values is less than zero, the station will not function as the timeserver. If the value of parameter equals to zero, value 5 for priority and 10 for interval is accepted. The server priority is the number that specifies timeserver importance. In the specific moment, there is only active one server with highest priority. Active timeserver is broadcasting network packets containing current time of the timeserver at interval set with Time Server Interval parameter. The interval is given in seconds.

If the server stops being active, its function may be taken over by another server, until this time inactive due to low priority. The station may begin functioning as the timeserver, if current timeserver doesn’t send any packet during the period of time equal to the product of Condition for Time Server Activation parameter value (defined on local station) and prevailing timeserver interval value (defined on remote timeserver). To avoid situation, when incorrect parameterization of remote timeserver (i.e. interval of 1 hour) is causing long interruptions in network synchronization, the Time Server Interval parameter has been introduced. If the interval of timeserver, from which the new server is not getting time packets, is greater than the value defined by this parameter, value defined by the parameter is accepted to compute period of time, after which the new server starts to work.

If the difference between server time and local time is greater than value defined by Long Time Difference parameter, change of the station time will yet occur after receiving at least as many packets, as it is defined by Long Time Difference - Counter parameter. Those parameters give the time to correct an incorrect time setting done by remote station operator.

Server sends time packets to all logical adapters used. If the timeserver’s client supports a few logical adapters, it can send time packets received from one adapter to the rest of adapters. This function may be used for time synchronization in subnets different than subnet the timeserver works in. To enable broadcasting time to other networks the Time packets replication / Enable Replication parameter should be set up on a station connected to multiple subnets. Time packets can be subject to further replication on following stations until the number of replications exceeds the value of Time Packets Replication / Default number of allowed replications of time packet parameter (set up for server). The parameter is defined on timeserver. To change the maximum number of replications on replicating stations the Time Packets Replication / Number of allowed replications of time packet parameter should be set up for client.


8.3.4. Protection with Password

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.4. Protection with Password

1.4.3.4. Protection with Password

With help of AslView program it is possible to perform functions, which may have significant influence on operation of the network module. To avoid accidental or unauthorized access to these functions, possibility of protecting the network module with password has been added. The password can be set with Changes lock parameter (Architect > Fields and Computers > Network Module > NetBIOS Communication > Diagnostics - AslView). Its value can takes value of Yes, No or the password text. If it’s set to Yes, access to the protected functions will not be possible. If the parameter’s value is No the access to network module is unlimited. Other values are interpreted as password that has to be entered by user before access to password-protected function. Entered password remains valid for 10 minutes. Any execution of password-protected function causes starting the countdown from the beginning.


8.3.5. Connection to Previous ASLINK Version Workstations

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.5. Connection to Previous ASLINK Version Workstations

1.4.3.5. Connection to Previous ASLINK Version Workstations

Station operating under control of network module version 5.00.000 or higher can be connected to older versions of the network module only when the value of Aslink 4 parameter is set to Yes (Architect > Fields and Computers > Network Module > NetBIOS Communication > Advanced). This possibility is enforces higher network load in phase of making connections. The default value of Aslink4 parameter is Yes, but in future versions of the network module the default value can change.

REMARK After starting the network module of version lower than 5.00.000 on the workstation, previously running a newer version of the module, all remote stations with higher versions of the network module should be restarted (it is necessary to restart applications using ASLINK network module). The necessity of restart doesn’t concern stations running older version of the module.


8.3.6. Diagnostics

Home > Data Server > 1. Process Data Processing of Data Server > 1.4. ASLINK - Network Module > 1.4.3. Configuration of Aslink Module > 1.4.3.6. Diagnostics

1.4.3.6. Diagnostics

Parameters control the diagnostic information output by ASLINK network module. This document doesn’t contain data that would allow full interpretation of diagnostic information. The purpose of diagnostics is to help in determining reasons of improper operation of the network links of Asix system and it should be run by ASKOM employees or with their support.

Diagnostic information generated by network module can be written to the log file and/or transmitted to AslView programs connected to the network module.

The Log file parameter (Architect > Fields and Computers > Network Module > Diagmostics) defines the name and location of file the diagnostic information will be logged to. In the Maximal Size [MB] field, you can specify the maximum size of the log file in megabytes.


Alarm Handling for AsTrend, AsAlarm and AsRaport Modules

Home > Data Server > 1. Process Data Processing of Data Server > 1.5. Alarm Handling for AsTrend, AsAlarm and AsRaport Modules

1.5. Alarm Handling for AsTrend, AsAlarm and AsRaport Modules

The use of alarm data by the AsTrend, AsAlarm and AsRaport programs requires the storage of alarm event archives in the SQL database and the inclusion of alarm definitions in the variable definition database.

Generating a database of SQL alarm definitions (ie, those whose event archive is stored in the SQL database) attached to the database of SQL variable definitions is described in detail in the Data Server > Data Server Parameterization > Adding SQL Alarm Definitions to the Variable Definition Database.


1.1. Introduction

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.1. Introduction

2.1.1. Introduction

Architect enables fully visual design, configuration and current edition of the Data Server parameters. In particular, it applies to editing channel definitions and variable address definitions.

Parameterizing the application using the Architect program, the user uses for this purpose windows equipped with a system of convenient to use tabs, which in an ordered way group options responsible for individual functional areas of the designed application. The Architect module is a powerful tool that integrates the configuration of all key modules responsible for the way the Asix system works.

The Architect program contains the VarDef module, which is responsible for managing the variable definition database. It enables fully interactive and visual support of the definition database, creation of the database structure and its editing as well as editing the database content. Architect provides support for Microsoft SQL Server 2008R2, 2012, 2014, 2016 databases, MDB (Jet / Microsoft Access) databases, and variable definition databases downloaded directly from Excel workbooks. To ensure compatibility with earlier versions of the Asix package, variable definitions can also be retrieved from the Paradox format database and text files.


1.3.1. Starting the Architect module

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.1. Starting the Architect Module

2.1.2.1. Starting the Architect Module

To open the Architect module, select the following options from the Start menu of the operating system:

Programs > Asix > Asix Architect


1.3.2. Closing the Architect module

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.2. Closing the Architect Module

2.1.2.2. Closing the Architect Module

To close the Architect module, select Exit in the File menu of the Architect program.


1.3.3. Main window of the Architect module

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.3. Main Window of the Architect Module

2.1.2.3. Main Window of the Architect Module

Architect offers a friendly graphical user interface. The designer’s environment is the application window divided into two major parts:

- left block for the parameter categories for databases and application data;

- right block for the configuration parameters.

Parameters configuring the application operation and declaring the database being the basis for the application operation are saved in one shared XML file (Extensible Markup Language), located in the root directory of the designed application.

The contents of the left block of Architect window can be switched with Databases and Fields and computers buttons (located in the lower part of the block).

Databases [image] button displays the parameter tree for configuration of the variable definitions database and alert database for the given application.

Figure: Architect Window – View of the Parameter Groups for Configuration of the Variable Definitions and Alarm Databases.

Fields and Computers [image] button activates a block containing the list of machines, for which the Asix application is being configured and a parameter group tree for configuration of the application operation.

Figure: Architect Window – View of the Machine List and the Parameter Group tree for Application Configuration.

The configuration parameters available in the right block of the Architect window are located in topical tabs.

In this block, the designer assigns the necessary values for specific parameters of the application and the database being the basis for application operation.

Figure: Architect Window – Example of Tab for Parameterization of Archival Data.

User utilizing the Architect configuration environment does not interfere with the operation of the application running in background. Some changes of the parameter settings are updated automatically while saved, although in most cases it is necessary to restart the application.


1.3.3.1 Module tree

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.3. Main Window of the Architect Module > 2.1.2.3.1. Module Tree

2.1.2.3.1. Module Tree

The main navigation tool for locating the specific functional areas of the Architect program is the module tree. It is located in the left block of the main application window. The tree is activated by the button Fields and Computers.

Figure: Architect Window – Application Module Tree View.

As the real application operating in the object often works in various manner on different stations, it is necessary to define several parameter sets for specific stations in one XML file. To view the set of parameters for the selected station, click the selected Computer from the list of declared machines in the Fields and Computers field.

The application operation area, shared by several or all machines, is described here through Field element – when the element is clicked, it is possible to set the application parameter values, which are identical for all stations.

Configuration on the Field level produces global settings for all machines in this field, and the configuration on the Computer level allows to customize settings depending on the machine (other settings for the operator station and other for the dedicated data server in the corporate network). The Computer level settings take precedence before the Field level settings.

The parameters configuring the application operation are divided into the following modules:

- Start parameters,

- Current data,

- Current data - network server,

- Historical data,

- Network module,

- Miscellaneous.

The database module tree view (button Databases), depending on the variable definition database type, includes the items described below.

Figure: Architect Window – View of Module Tree for Databases.

- Variable Definitions Base – parameters determining the Variable Definition Base type, Variable Definition Base format, Variable Definition source and Options:

- Variable Definition Editor (available for the variable definitions base type – Standard variable definitions base, after opening the database);

- Scheme editor (available for the variable definitions base type – Standard variable definitions base, after opening the database);

- SQL alarm definitions base – generator of the SQL alarm definition database;

- Options – allowing to set the following settings individually for each application:

- main window view during Architect start-up (tab Options > Start),

- XLS file read engine (tab Options > Data sources - read engine),

- parameters for variable definitions database viewing (tab Options > Variable definitions base).

( [image] for details see: Data Server > Parameterization of Data Server > Operational Environment of Architect Module > Individual Options of Architect Operationtion)


1.3.3.2 Configuration parameters block

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.3. Main Window of the Architect Module > 2.1.2.3.2. Configuration Parameters Block

2.1.2.3.2. Configuration Parameters Block

The configuration parameters block enables changing the parameters.

Fig. Architect Window – Example of Configuration Parameter Block View

This block changes into items definition editor window, if the variable definitions database in format SQL or Jet is opened (the option Standard Variable Definitions Base in parameter group Databases > Variable Definitions Base > Type is selected).

Fig. Variable Definition Database Editor Window.


1.3.4. Individual options of Architect operation

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.4. Individual Options of Architect Operation

2.1.2.4. Individual Options of Architect Operation

It is possible to determine some default options of Architect operation, valid during the work on the given application file.

Application menu > Application options offers the following settings:

Start tab:

  • Active Editor After Program Start-up – allows to determine which editor will be launched on program start-up:

  • Application Editor (with indication of active field/computer),

  • Database Editor;

  • Active Module After Field/Computer Change – activates a mechanism, which remembers the module and tab last opened for the given field or computer during the current session:

  • The Same for All Computers/Fields – last opened module and tab will be by default activated after changing to any field/computer;

  • Individual for Each Computer/Field – the last opened module and tab will be saved individually for each field/computer.

  • Channels Grouping

  • Don't use channels grouping in the modules tree,

  • Group channels by the name of the driver,

  • Group chennales by the given group name.

Fig. Application Options – ‘Start’ Tab.

Data Sources - Read Engine tab allows to declare XLS file read engine and XLS file editor.

Engine for XLS/XLSX Files Read:

Determine columns type by analyzing first 8 rows (default value)

Determine columns type by analyzing all rows (causes slower read of large tables, requires Administrator rights)

XLS/XLSX Files Editor:

Default editor installed in system

Internal Architect editor

External editor

Fig. Application Options – ‘Data Sources - Read Engine' Tab.

Data Sources - Column Types

Fig. Application Options – ‘Data Sources - Column Types' Tab.

Variable definitions base tab allows to define parameters useful for checking the variable selection window operation; the language selection results are visible in Variable preview window activated with use of button [image]:

Variable definition base preview window:

Visible Variables – allowing to limit the set of displayed variable definitions to active or archived variables;

Application Languages – enabling the selection of language used for displaying the variable attributes headers and values (attribute headers for required languages are declared in the variable definitions base scheme, and the translations of attribute values (e.g. Description attribute) in the variable definitions base).

Fig. Architect Operation Options Module – ‘Variable Definitions Base Tab.


1.3.5. Main menu and available commands

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.2. Operational Environment of Architect Module > 2.1.2.5. Main Menu and Available Commands

2.1.2.5. Main Menu and Available Commands

Commands executed by Architect module are grouped into categories:

1. File,

2. Application,

3. Variable Definitions Base,

4. Variable Definition Editor

5. Alarm Definition Base,

6. Fields and Computers,

7. View,

8. Tools,

9. Help,

User may decide, which commands will be displayed in the Architect window. This is performed with use of Customize… window, launched after right-clicking on any toolbar or main menu. The ‘Customize’ window will be displayed allowing to configure toolbars and available commands according to the user’s preferences.

Fig. Window for configuration of contents of the toolbars.

The following command categories are available in Architect module window:

File

- [image] New Application (Ctrl + N);

- [image] New Application – Wizard...;

- [image] New Application – OPC Wizard... - it runs the new application wizard with data import from OPC server;

- [image] New Application – OPC UA Wizard... - it runs the new application wizard with data import from OPC UA server;

- [image] New Application – Importer...;

- [image] Open... (Ctrl + O); opens XML file;

- [image] Save (Ctrl + S);

- [image] Save As…

- [image] Exit; end of Architect module operation;

Application

- Asix Evo Application - displays only the options of EVO version of Asix application;

- Asix Application;

- [image] Configure Reporting System AsRaport...;

- [image] Configure Internet Applications...;

- [image] Configure Appearance of AsPortal Application...;

- [image] Application Options;

Variable Definitions Base - the range of accessible commands is depended on Variable Definition Database type !!!

- [image] Show... (F7) - it opens the window for viewing Variable Definition Database;

- [image] Generate (Ctrl + G) - it generates Variable Definition Database;

- [image] Open (Ctrl + B) - it opens the window for editing Variable Definition Database;

- [image] Save - it saves changes in Variable Definition Database;

- [image] Close - it closes edition mode of Variable Definition Database;

- [image] Reopen - it closes and opening the window for editing Variable Definition Database;

- [image] Online Update - when it is impossible to stop the Asix application running, the user can modify Variable Definition Database on-line (modifications are loaded by Asix at once);

- [image] Show Modifications... - it allows to trace all the changes done in Variable Definition Database in the demanded time interval;

- [image] Import Modifications... - it allows to import changes done into Variable Definition Database (all the changes have to be prepared in XLS spreadsheet);

- [image] Export...- it allows to export varible definitions into XLS spreadsheet;

- [image] Create New - it creates a new Variable Definition Database;

- [image] Delete - it deletes an existing Variable Definition Database;

- [image] Backup... - it creates backup of Variable Definition Database;

- [image] Restore... - it restores Variable Definition Database from a backup;

- [image] Add Attribute... - it adds a new attribute to Variable Definition Database;

- [image] Delete Attribute... - it deletes an attribute from Variable Definition Database;

- [image] Change Attribute Size...;

- Variable Definition Editor:

- [image] Insert Variable Definition - it adds a new variable definition record;

- [image] Insert Copy of Variable Definition - it adds a new record of a copied variable definition;

- [image] Insert System Variable Definition - it adds a new record of a system variable;

- [image] Insert Variable Definition from OPC Channel;

- [image] Change Values - it allows the user to change all selected variable definition attribute values to a new value;

- [image] Replace Selected - it allows the user to change the one variable definition attribute value in the range of selected values of a given attribute;

- [image] Replace in Column - it allows the user to change the determined item definition attribute value appearing in the given column to a new one;

- [image] Clear Selected;

- [image] Immediate Edit - when active, it allows to immediate editoin of a current field after entering any character in it;

- [image] Filtering - it opens a window with information on mirroring and contains the command to copy 'user_asix_internal' from the principal server to the mirror server;

- [image] Copy Row to Clipboard;

- [image] Add Variable Names to Clipboard;

- [image] Help;

- Mirror -

- Configuration

- [image] Copy of user_asix_internal

- [image] Show Attributes - All;

- [image] Show Attributes - Current;

- [image] Show Attributes - System;

- [image] Show Attributes;

- Import Items to Worksheet

- [image] Import from OPC Server... - it opens the window for importing Variable Definition Database from OPC server into XLS file;

- [image] Import from OPC UA Server... - it opens the window for importing Variable Definition Database from OPC UA server into XLS file;

- [image] Import form S7 XDB File... - it opens the window for importing Variable Definition Database from S7 XDB file;

- [image] Import from Wise Advantech...;

- [image] Import from Beckhoff Controller...;

Alarm Definition Base

- [image] Show SQL... - it runs the SQL alarm change window;

- [image] Generate SQL (Ctrl + J) - it generates SQL alarm definition base;

Fields and Computers

- [image] Add Field...;

- [image] Remove Field;

- [image] Rename Field...;

- [image] Make Copy of Field...

- [image] Convert Field into Computer;

- [image] Add Computer in Current Field...;

- [image] Add Computer...;

- [image] Remove Computer;

- [image] Rename Computer...;

- [image] Make Copy of Computer... - creates a copy of the computer selected in Fields and Computers at the time of executing the command;

- [image] Make Copy of Computer - Terminal... - creates a copy of the terminal selected in Fields and Computers at the time of executing the command;

- [image] Convert Computer into Field;

- [image] Import Computer/Field from File... - It imports the computer or field from the XML file (to which the indicated computer / field was previously exported, eg from an XML file that parameterizes another Asix system application.

- [image] Export Computer/Field to File... - It exports the computer or field to the XML file.

- [image] Add Channel...;

- [image] Make Copy of Channel...;

- [image] Change Channel Definition... - allows you to change the name of the channel and the type of driver;

- [image] Delete Channel;

- [image] Manage Channels... - it opens the window to delete, change the type, copy and sort selected channels;

- [image] Change Channels Group Name...

- [image] Add Archive...;

- [image] Make Copy of Archive...;

- [image] Change Archive Name...;

- [image] Delete Archive;

- [image] Manage Archives... - it opens the window to delete, change the type, copy and sort selected archives;

- [image] Manage Options... - it runs the option manager, which allows viewing all parameters set for individual functional areas of the application;

- [image] Import Options... - it runs the option manager that allows you to import selected option values from external * .xml files;

- [image] Show Info... - displays dependencies between computers and fields;

View

- [image] Toolbars - it includes the list of Architect toolbars and the 'Customize...' window;

- Computers/Fields;

- Modules of Application Options;

- Modules of Databases Options;

- [image] Show Advanced Options - it activates the hidden options located on the Architect tabs;

Tools

- [image] Shortcut Creator... - it creates a shortcut for an Asix system application opening;

- [image] Spreadsheet... - it runs the built-in spreadsheet;

- [image] Select Language - it changes the Asix system language;

- [image] AsTrend - it runs the program for graphic presentation of archival data;

- [image] Trends V1 Converter - it runs trend converter to convert DAT files (with trend definition) into file compatible with the new version of AsTrend program;

- [image] AsBase - it runs AsBase program;

- [image] AsRaport - it runs the program for edition of SQL querys used for creating reports in the MS Reporting Services environment;

- [image] AsAlarm - runs the AsAlarm program with the VarDef database loaded in the current application;

- [image] AsixConnect Configuration - it runs the program for AsixConnect package configuration;

- [image] Network Module - Options - it runs the program for configuration of network settings;

- [image] Alerts Configuration - it runs the program for alerts configuration;

- [image] AsAudit Configuration - it runs the program for AsAudit configuration;

- [image] Log and Configuration Directories - it runs the program for declaration of directories for log files and Asix application XML files;

- [image] Asix Package Manager - it runs the program for configuration of Windows operating system to enable running the needed Asix package (it is possible to have several versions oof Asix package installed on one operating system);

- [image] Version of the Asix System;

Help

- [image] Help - it runs the help file for Architect program;

- [image] Asix - it runs the file for the main Asix system user's manual;

- [image] Communication Drivers - it runs the help file for the Asix communication drivers;

- [image] Conversion Functions - it runs the help with descrption of conversion functions;

- [image] AsixConnect - it runs the help file for the AsixConnect package;

- [image] Defect Report - it runs the e-mail program to send the message "I submit a bug in the program ASIX Architect";

- [image] Modification Proposal Report - it runs the e-mail program to send the message with proposals how to develope the Architect program;

- [image] About... - it runs the window with the information on the Architect program version;


3.1.1. Recommendations for handling of default options in configuration modules

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.3. Recommendations for Handling of Default Options in Configuration Modules

2.1.3. Recommendations for handling of default options in configuration modules

Each option parameterizing the application operation has an external checkbox, located on the left side of the options, which – contrary to the parameter value declaration fields – is used only to enable or disable the set parameter values.

Parameters with declared default value, e.g. time, filename or in case of logical values, the checked checkbox, should be activated by an external checkbox.

Fig. View of enabled default option.

The following rules should be observed during application parameterization:

- the disabled options are not editable; to change the parameter value, the external checkbox must be checked;

- when the option for Field is disabled, the default parameter value is automatically restored;

- when the option for Computer is disabled, the parameter automatically takes the value declared for Field or (if there is no such declaration on Field), the default parameter value is restored.


3.1.2 Options manager

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.4. Options Manager

2.1.4. Managing Options Using the Window with the List of All Declared Options

The 'Options Manager' window is opened by the Manage Options... command from the Fields and Computers menu. It allows to manage all the parameters set in XML configuration file.

Using the window 'Options Manager', the designer can easily access all parameters that have been set in the XML configuration file in the configuration of individual 'fields' and 'computers'.

The mentioned window gives an insight into the values ​​of defined options with the simultaneous possibility of performing simple editing operations on selected options - there are operations for deleting and copying options from / to selected fields / computers (including drag-and-drop techniques).

Further editing of the selected option is possible after pressing the Go to Option Editor button. The window is then closed and the Architect opens the tab of the parameter configuration module, which allows you to change the selected option.

All options used to parameterize the application are displayed in the 'Options Manager' window in the form of a tabular table in one of three possible views to choose from: Table, Tree and Option Tree.

Fig. 'Options Manager' Window.


3.1.3. Importing selected parameters form the external XML file

Home > Data Server > 2. Parameterization of Data Server > 2.1. Operation of Architect > 2.1.5. Importing Selected Parameters form the External XML File

2.1.5. Importing Selected Parameters form the External XML File

When preparing the application, the designer has the option of importing settings of selected parameters from * .xml files of the Data Server of other applications. The Import Options ... command from the Fields and Computers menu opens the window for selecting the Data Server XML file of another application, and then the 'Options import' window, which looks like the XML configuration file options management tool of Data Server, with the difference that the parameters viewed are from a file * .xml, from which parameters will be imported. To import the value of any parameter into your application, select this parameter, press the Import button, and then select the target field / computer.

Fig. 'Options Import' Window.


2.1 Introduction

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction

2.2.1. Introduction

The variable definition database - VarDef is the basic repository of entire information on all variables of the designed visualization system. This is the foundation supporting the construction of Asix application, including its configuration with use of Architect module.

Each variable identified by a unique Name is associated with one record in the variable definitions base. The fields of such record contain the values of so-called variable attributes. List of attributes includes mandatory, optional and user-defined items. The mandatory attributes are: variable description, unit, name of channel of communication with object, declaration of the manner of conversion of data acquired from controller, archiving parameters. Optional attributes are e.g. limit values, format, ranges. Furthermore, user may also create their own text attributes individual for each project, e.g. KKSes or assembly data.

Except for the variable definitions, the variable definitions base VarDef also stores information on: grouping attributes, attribute sets, conversion functions, attribute headers, national languages of variable attributes used in the designed application, information on the substitute attributes (for multi-language application) or average names for AsTrend. Those additional data are available from the level of Variable definitions base > Scheme editor.

It is possible to use the Excel worksheet directly as the variable base, without the stage of variable generation stage. After the worksheet is loaded, it is no longer used.

Configuration data related to the variable definition base are configured in Architect module with use of Varbase (opened witw [image] button located in the left block of Architect window) and saved in XML configuration file of Data Server.

Fig. Variable Definition Base Configuration Module Window.


2.1.1. Database creation mode

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction > 2.2.1.1. Database Creation Mode

2.2.1.1. Database Creation Mode

Architect enables (since the version 5) creation of databases in the following modes:

1. the base is created and edited manually – Editor mode;

2. the database is generated on the basis of data supplied from external sources (e.g. through Excel work sheets) – Generator mode;

3. variable definitions are acquired directly from Excel worksheet, without the stage of variable base generation – Data source mode.


2.1.2. Database format

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction > 2.2.1.2. Database Type and Format

2.2.1.2. Database type and format

In Asix visualization system, the variable definition database data can be stored:

- in MSSQL database,

- in Jet database,

- directly in Excel files,

- in the format of text files used in older versions of Asix [*] (Text database for variable definitions for Asix 1-4),

- in an external database (MSQL or Jet) created by the Architect program, but parameterized by an XML file different than the one of designed application. It is possible to simultaneously read the definition of variables from several external databases of variable definitions ( [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Introduction > Database Type and Format > Combined Variable Definition Databases).

[*] In the Asix system, the variable definitions can be downloaded from text files due to compatibility with earlier versions of the system. However, the use of these variable definitions storage formats is not currently recommended. Databases in Paradox format - MDB files should be converted to the current Asix system databases format.

MS SQL database

MS SQL database is recommended for large applications operating on approx. 20,000 and more variables.

MS SQL database should be also applied, if the designed application is multilingual.

Jet database

The recommended format of the variable definition database is Microsoft Jet base. It does not require the deployment of database server, and the base itself is contained in single .mdb file, which can be easily transferred between the machines.

Variable definitions stored in external sources - XLS files

Storing variable definitions in spreadsheet is a comfortable choice in the stage of application design, as the stored information are legible and the user can easily make changes in the data structure and values.

***

The Type and format of Variable Definition Base are defined on Type and Format tabs (Architect > Databases > Variable definitions base).

The Type tab enables you to choose whether the database will be created: in standard format (MDB, MS SQL; with the indication of creation mode: Editor, Generator or Data source mode), as external variable definition database or as text variable definition base.

If you select the database type in the standard format, the Format tab will be displayed with the database format selection: Microsoft SQL Server database or Mdb format file (Jet / Microsoft Access).

***

For Microsoft SQL Server database you should know the folowing rules:

SQL server has to have switched on the both of authentication modes: SQL Server and Windows.

When using a local SQL server, the account under which the server works has to have the access to TEMP directory. It can be realised by configuration the SQL server process to the work under the accound named 'LocalSystem'.

When using a remote SQL server with a barrier switched on, the following rules connected with the SQL server computer should be done:

- the tcp/1433 port should be open for the main instance;

- the port used by a named instance should be open for this instance;

- the port udp/1434 should be open for all the SQL servers in the network.


Combined Variable Definition Databases

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction > 2.2.1.2. Database Type and Format > 2.2.1.2.1. Combined Variable Definition Databases

2.2.1.2.1. Combined Variable Definition Databases

The permissible type of the variable definition database is the variable definitions database combined, parameterized by separate XML files.

It requires:

1. declaring in the Architect the appropriate type of variable definition database:

Architect > Databases > Type tab > option External variable definitions database / databases

2. and indication of external databases of variable definitions:

Architect > Fields and Computers > Start parameters module > Variable definitions base tab

The declaration of the database includes: (for MDB database) name and path to the MDB file, and (for the MS SQL database) the name of the Microsoft SQL server and database.

Fig. Declaration of Combined Variable Definition Databases.


2.1.3. Variable attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction > 2.2.1.3. Variable Attributes

2.2.1.3. Variable Attributes

The variable attributes can be classified into three types:

1. mandatory attributes,

2. optional attributes,

3. user attributes.

The mandatory attributes are all attributes used by Asix system for launching applications, e.g. Name, Address, Conversion function.

Full list of mandatory attributes is presented in Appendix 1.

The names and types of mandatory and optional attributes are determined and unchangeable.

The value of Name attribute must be unique for the entire variable definition database.

The set of optional attributes includes an ItemNotActive attribute. If the value of ItemNotActive attribute is 1, the variable is not visible in Asix system for Asmen and Aspad modules.

All remaining attributes are user attributes. The users set their names by themselves (those can be only text attributes).

Furthermore, the database includes internal attributes created for the internal needs of the variable definitions base system, which are not made visible for the user. These attributes are: CreationDate and DeletionDate.


2.1.4. Names of attributes and tables

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.1 Introduction > 2.2.1.4. Names of Attributes and Tables

2.2.1.4. Names of Attributes and Tables

The attribute name can include all Latin characters, digits, spaces, etc. (It is possible to use national characters – but only for monolingual applications). The name is used both in the database and the user interface.

All system attribute names and variable definitions base tables names are saved internally in English. However, in the user interface, those names appear in the item definition window / item preview window / item description window in Polish or in English, depending on Architect language version.

During the data import, the names can be given both in Polish and English.

To display the local header names in any language declared by the designer, the users shall define those names by themselves –

see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Creating Database in the Editor mode > Creating the Variable Definition Base Scheme – Scheme Editor > Translating the Variable Attribute Names.

Fig. Variable Definition View Window.

Fig. Selected Variable Description Window – View of Attributes from the Declared Attribute Set.


2.2 Creating database in the Editor mode

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode

2.2.2. Creating Database in the Editor Mode

To create the variable definitions database in the Editor mode, the following steps must be performed:

1. Determine the variable definitions base type:

Architect > Databases > Variable Definitions Base > Type tab > Base creation mode set to Editor mode

Fig. Variable Definitions Base/Type tab – Editor Mode.

2. Select the variable definition base format:

Variable definitions base > Format tab > Database format set to: Microsoft SQL Server database or Mdb format file (Jet/Microsoft Access)

Fig. Variable Definitions Base > ‘Format’ Tab.

3. Give the name of the created base.

In case of MS SQL database, the following parameters must be determined:

- Server Name;

- Base Name;

- Base Directory;

- Authorization Mode:

- Windows,

- MSQL Server – requires to set User name and Password,

- Mirror Server Name - in the case of mirroring service, the field requires declaring the name of the mirror server ( [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Mirroring).

4. Select Create New [image];

5. Open the database using the [image] Open command and enter the variable attribute data with use of variable definitions editor

( [image] see: Data Server > Parameterization of Data Serwer > Handling of the Asix Application Variable Definition Databases > Creating database in the Editor mode > Editing the Variable Definition Database - Variable Definition Editor > Editing the Variable Definitions Database – Variable Definition Editor);

6. Define the variable definitions base scheme with use of Schem editor

( [image] see: Data Server > Parameterization of Data Serwer > Handling of the Asix Application Variable Definition Databases > Creating Database in the Editor Mode > Creating the Variable Definition Base Scheme – Scheme Editor).


Editing the Variable Definitions Database – Variable Definition Editor

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor

2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor

Subject described in the following subsections:

2.2.2.1.1. Adding, Deleting and Modifying Variables

2.2.2.1.2. Adding, Deleting and Instant Edition of Variables

2.2.2.1.3. Adding and Deleting Variable Attributes

2.2.2.1.4. Simultaneous Editing Attribute Value for Several Variables

2.2.2.1.5. Selecting Visible Variable Attributes

2.2.2.1.6. Attribute Editors


2.2.1.1 Adding, deleting and modifying variables

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.1. Adding, Deleting and Modifying Variables

2.2.2.1.1 Adding, Deleting and Modifying Variables

Commands:

- add record of a new variable above the selected record (button [image]);

- add new variable record as the last in sequence (button [image]),

- delete the selected record (button [image]);

- edit the selected field (button [image] or pressing F2 key switches to field editing mode);

are available from the toolbar of Definitions of variables window in the variable definitions editor.

Fig. Command Bar for Editing the Variable Definitions Base Record.

Deleting the variable does not effect in physical deletion of the variable from the database, but only marks it as deleted – therefore, the developed change report will also include information on the deleted variables ( [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Exporting database to Excel ).


2.2.1.2. Adding, deleting and edition by local menu

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.2. Adding, Deleting and Instant Edition of Variables

2.2.2.1.2. Adding, Deleting and Instant Edition of Variables

By clicking on the record (on any attribute) of the selected variable in the variable definition editor, the local menu is displayed to:

- add a new variable as a result of copying the record of the selected variable - the command Insert copy of variable definition (Shift + Ctr + Ins) - the new variable record is added above the selected variable; the attribute values of the new variable are identical to the attribute values of the indicated variable, with the exception of the Name attribute, which should be given an individual name;

- remove the variable - the command Clear selected (Del) - the record of the indicated variable is removed;

- immediate edit the current cell after entering any character - the option Immediate edit (Shift + Ctrl + E);

Fig. Local Menu in Variable Definition Editor.

The following command are available in local menu of variable definition editor:

- [image] Insert Variable Definition - it adds a new variable definition record;

- [image] Insert Copy of Variable Definition - it adds a new record of a copied variable definition;

- [image] Insert Variable Definition from OPC Channel;

- [image] Change Values - it allows the user to change all selected variable definition attribute values to a new value;

- [image] Replace Selected - it allows the user to change the one variable definition attribute value in the range of selected values of a given attribute;

- [image] Replace in Column - it allows the user to change the determined item definition attribute value appearing in the given column to a new one;

- [image] Clear Selected;

Immediate Edit - when active, it allows to immediate editoin of a current field after entering any character in it;

Filtering;

- [image] Copy Cell to Clipboard;

- [image] Add Variable Names to Clipboard;

- [image] Show Attributes - All;

- [image] Show Attributes - Current;

- [image] Show Attributes - System;

- [image] Show Attributes - <name of attribute set> - allows to display attributes of selected attribute set defined in scheme editor, on Attribute sets tab;

- [image] Help;


2.2.1.3 Adding and deleting variable attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.3. Adding and Deleting Variable Attributes

2.2.2.1.3. Adding and Deleting Variable Attributes

It is impossible to delete mandatory attributes.

Add Attribute [image] and Delete Attribute [image] buttons are located in the Variable Definition Base menu.

Fig. ‘Add New Attribute’ Window.


2.2.1.4 Simultaneous editing attribute value for several variables

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.4. Simultaneous Editing Attribute Value for Several Variables

2.2.2.1.4. Simultaneous Editing Attribute Value for Several Variables

Change values [image] button in the Variable Definitions Base > Editor command category allows to change all selected values of the given attribute – see figure below:

Fig. Changing All Selected Values of the Given Attribute.

Replace selected [image] command in the Variable Definitions Base > Editor command category allows to replace determined attribute value in the scope of selected fields to a new value – see figure below:

Fig. Changing the Selected Attribute Value in Scope of Selected Fields.

Replace in column [image] command in the Variable Definitions Base > Editor command category allows the user to change the attribute value in scope of the entire column, where at least one field is selected - see figure below.

Fig. Changing the Determined Attribute Value in Scope of the Selected Column.


2.2.1.6 Selecting visible variable attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.5. Selecting Visible Variable Attributes

2.2.2.1.5. Selecting Visible Variable Attributes

The list of attributes of all variables displayed in the variable attribute editor window and variable preview window can be determined by the user by means of [image] button (first item of the variable list headers line). Press the button to open the list of all attributes of the given variable definition database.

Fig. Button for Selecting Visible Variable Attributes.

It is also possible to view values (all / current or declared in the set) of the attributes of selected variable by right-clicking in the item definitions editor or items preview window on the selected variable record.

Fig. Local Menu Available for the Variable Records.

Right-click on any header line field to display local menu enabling:

- sorting according to increasing value of the given attribute – command [image],

- sorting according to decreasing value of the given attribute – command [image],

- clearing sorting effect;

- removing the column;

- removing all columns (except the Name column),

- opening field chooser - open the column header selection window of all attributes declared in the database, which can be drag-and-droped to the grouping field or to the displayed variable attributes row;

- selection of a set of columns - it opens a window with attribute sets that are used to parameterize specific Asix system modules and individual objects placed on the visualization masks of the application; indication of a given set of attributes (Set Columns Set) causes that the column editor will display columns of parameters that parameterize the work of a specific module / object;

- adjusting the width of the column to the values of the attributes - the Best fit command (applies to the selected column) or Best Fit (all columns) which applies to all columns at the same time;

- displaying a window with the description of the attribute of the currently selected column.

Fig. Local Menu for Attribute Headers Line.


2.2.1.7.

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.1. Editing the Variable Definitions Database – Variable Definition Editor > 2.2.2.1.6. Attribute Editors

2.2.2.1.6. Attribute Editors

The editing of selected variable attributes is facilitated by the editors activated by the button [image] in the attribute field. The following editors are currently available:

1. Variable addresses

2. Archiving parameters

3. Variable mask

4. Archive

5. Variable format

6. Conversion function

7. Control variable

8. Channel selection editor

9. Limit editor

***

The variable address editor (run from the Address field) contains a set of fields that allow to define the address of the variable. The set of fields depends on the driver declared for the channel to which the given variable has been assigned.

The variable address editor is available for selected drivers. In other cases, the variable address should be entered manually based on the addressing method of the variables for the given driver.

Figure: Sample Window of the Variable Address Editor for the Channel with the S7-TCPIP Driver.

***

The variable archiving parameters editor (run from the Archiving parameters field) allows you to declare primary archiving parameters and additional archiving.

Within a given archive (Archive field in the variable definition database), the variable may be subject to additional archiving in the situation when, in addition to archives stored in files such as daily files, the data archiving in the SQL database is required. Moreover, it may be necessary to analyze data for a given period of time archived at a higher frequency than the basic archiving provides - then also additional archiving should be used.

The type of archiving is selected via the Type field - available options are:

- No archiving;

- Primary archiving;

- Primary and additional archiving.

The Archive
 type field specifies the archive type:

D - standard daily - data collected in daily files;
M - standard monthly - data collected in monthly files;
Y - standard ywearly - data collected in annual files;
H - standard in one file - data collected in one file;
B - database - data collected in typical databases;
P - pattern;

X - compressed database.

Note: Archives of type D, M, Y, H require the STANDARD archive. Therefore, a variable that has one of the listed types in the archiving parameters must be declared in the archive parameters as an archive type: STANDARD (Architect > Historical data > <archive name>> Standard tab).

The other types of archive B and P are declared for the MS SQL archive.

The other fields of the editor enable declaring other archiving parameters:

- Sampling period;
- Time registration precision;
- Value registration precision;

- Time of data validity;
- Minimum time horizon of data storage (only for H, B and X archives);

- registration attributes: Restore the last values recorded in the archive, Do not compress data.

Figure: Archive Archiving Editor Window (Primary Archiving).

***

The variable mask editor (run from the field Control variable mask):

Figure: Window of the Variable Bit Mask Editor.

***

The archive selection editor (run from the Archive field):

Fig. Archive Selection Window.

***

The format editor (run from the Format field) makes it easier to define the variable format. Available formats:

  • Integer determined by:

Type;

Width;

Input size modifier;

  • Float determined by:

Type;

Width;

Precision;

  • Date - the input data is treated as the number of seconds since 1970-01-01 00:00, 32 bits determined by:

Date format - the content of the format is a string of characters that specifies the separators and components of the date in any order. The components are:

y - year

m - month

d - day

h - hour

n - minute

s - second

No date format specified means formatting according to the default pattern: y / m / d h: n: s

  • Time determined by options:

The input data is treated as number of milliseconds, 32 bits,

The input data is treated as number of seconds, 32 bits,

Time format - the content of the format is a sequence of characters defining separators and time components in any order. The components are:

d - number of days

h - number of hours

n - number of minutes

s - number of seconds

z - number of milliseconds

No time format specified means formatting according to the default pattern: h: n: s

Figure: Format Attribute Editor.

***

The editor of conversion functions (run from the field Conversion function), which tells the designer the syntax for each of the conversion functions built into the Asix system.

Full set of conversion functions - see: Data server > Process Data Processing of Data Server > Communication Manager ASMEN > Conversion functions.

Conversion functions are used by the ASMEN module when converting the process variable values from the raw form to the real form. Each variable has an individually declared conversion function.

Fig. The Window of the Conversion Function Editor.

***

The control variable editor (run from the Control Variable field) launches the selection window of the control variable:

Fig. Variable Selection Window.

***

The channel selection editor (run from the Channel field):

Figure: Channel Selection Editor.

***

The limit editor (run from the fields: Limit Hi, Limit HiHi, Limit Lo, Limit LoLo). Allows you to declare the limit in one of the following three forms:

  • Limit as a constant value

  • Limit as a variable value

  • Exceeding the limit signaled by a combination of variable bits (Variable name, Bitwise operator, Bit mask (hexadecimal))

Fig. Limit Editor Window.


2.2.2. Creating the variable definitions base scheme – Scheme editor

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor

2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor

Variable definitions base scheme includes information related to grouping attributes, attribute set definitions, conversion function parameters, attribute headers, variable attribute languages, substitute attribute declarations (for multi-lingual applications) and AsTrend average names.

Editing of such information is possible with use of Scheme editor available in Variable Definition Base module after the database opening.

Fig. Scheme Editor View.


2.2.2.1 Variable grouping

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.1. Variable Grouping

2.2.2.2.1 Variable Grouping

Grouping of variables is based on assigning variables to custom number of groups identified by the grouping attribute added to Scheme editor on Grouping attributes tab.

Fig. Grouping Attributes Definition Window.

To declare grouping attribute in Grouping attributes tab, such an attribute must be first added to the variable definitions base in Variable definition editor.

By default, one grouping attribute named Group1 is created in the variable definitions base. Designer may add more grouping attributes – their number is unlimited.

The names of grouping attributes are custom.

It is recommended that a database should have at least one grouping attribute.

The variable, where grouping attribute field value was skipped, will be visible in the system in group named (Empty name) visible among the user groups.

Fig. Variable Group Tree.

For example, the variable can have grouping attributes of: Department (values e.g. Blocks, Auxiliary), Unit (Block1, Block2, Demineralization, Dedusting, etc.), Device (Camac, S7_1, GeFanuc11, etc.) and Value Area (Analog, Twostatus, Averagea_5m, etc.).

When the items definition editor window/items preview window is opened, the tree displaying the base structure is automatically generated on the basis of grouping parameters.

The number of tree levels is identical as the number of grouping attributes. The first level displays all unique attribute values, which was declared as the first one in Scheme editor in Grouping attributes tab. Then, several nodes are created for each value of the first attribute. The number of nodes is identical to the number of values of the attribute declared as second. The procedure is repeated for the remaining levels.

To change the attribute value sequence, drag the grouping attribute header and drop it to other item in Groups block of the items definitions editor window or items preview window.

Fig. Changing the Sequence of Variable Grouping According to Attributes.


2.2.2.2 Attributes sets

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.2. Attributes Sets

2.2.2.2.2. Attributes Sets

Attributes sets are defined for purposes of Asix system applications. They are used in VARIABLE_DESCRIPTION action and in item selection window (items definition editor window/items preview window) to limit the number of displayed attributes according to the designer's requirements.

Users may create their own attribute sets in Attributes sets tab in scheme editor.

At the moment, the set contains only the attribute name list. The width of attribute window must be always given during calling the VARIABLE_DESCRIPTION action.

Fig. Attribute Set Definition Window.


2.2.2.3 Conversion function parameters

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.3. Conversion Function Parameters

2.2.2.2.3. Conversion Function Parameters

Conversion function parameters are defined for purposes of Asix system applications.

ConversionFunction attribute existing in the variable definitions base contains by default the names of functions converting variables and all function parameters. However, there exists a mechanism, which allows to include in ConversionFunction attribute only the conversion function name, and to locate each of its parameters in separate attribute. ConversionFunction table defines the attribute names containing the function parameters independently for each function.

Fig. Conversion Function Parameter Definition Windows.


2.2.2.4 Translating the variable attribute names

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.4. Translating the Variable Attribute Names

2.2.2.2.4. Translating the Variable Attribute Names

The base allows to define local names of system attributes and user attributes to any language declared by the user.

Local attribute names appear as column titles in the variable description window.

Fig. Variable Description Window – English Attribute Names.

Each language (except for Polish and English) requires the users to declare the variables attributes names in Scheme editor of the variable definitions base:

Databases > Variable Definitions Base > Scheme Editor > Attribute Captions

Fig. Window for Declaring the Local Variable Attribute Names.


2.2.2.5 Substitute attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.5. Substitute Aattributes

2.2.2.2.5. Substitute Attributes

Substitute attributes are used in multilingual applications. A substitute attribute – so-called alias – can be defined for each user attribute and for Description attribute.

The given attribute (basic attribute) can have only one alias for each language supported by the application. When the attribute alias is defined, for the selected language the alias will be used instead of the basic attribute.

Fig. Substitute Attribute Definition Window.

While declaring the substitute attribute, remember to define the language both for basic attribute and the substitute attribute. This is performed in Attributes languages tabs in Scheme editor. See: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Creating Database in the Editor Mode > Creating the Variable Definition Base Scheme – Scheme Editor > Declaring the Attribute Languages.


2.2.2.6 Declaring the attribute languages

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.2. Creating the Variable Definition Base Scheme – Scheme Editor > 2.2.2.2.6. Declaring the Attribute Languages

2.2.2.2.6. Declaring the Attribute Languages

The attribute language table is located in:

Databases > Variable Definitions Editor > Scheme editor > Attributes languages tab

Fig. Attribute Language Definition Window.

Language table allows to define, in which language the values for the given attribute were defined. The information is usually required only for multilingual applications to declare the language for text attributes. The language should be declared both for the basic attribute and the substitute attribute.


2.2.3. Importing modifications from Excel worksheet

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.3. Importing Modifications from Excel Worksheet

2.2.2.3. Importing Modifications from Excel Worksheet

The changes in variable definition consisting in adding, deleting or modification of record(s) can be comfortably imported to the variable definitions base from Excel worksheet. For user's comfort, the Varbase module > Modification import template tab includes a function allowing to create a worksheet (with default name of VarDefModificationImportTemplate.xls) containing all necessary columns and examples of data necessary for modification import.

Modification import template tab is available for Variable definition base type: Standard variable definitions base/Editor mode. List of columns in the created import template is identical to the current variable definition base (declared in Format tab).

Fig. VarDef Modification Import Template.

How to import the variable definitions changes to the existing MS SQL or Jet variable definitions database using the Excel worksheet as a source?:

1. First of all, generate the modification import template:

(after ensuring that the current base creation mode is Editor mode, and the Variable definitions base > Format tab includes the correct declared base)

The modification import template generation function is located in:

Variable Definition Base > Modifications import template tab > Create... button

2. In the generated worksheet open the Variable modification tab and enter the appropriate records, bearing in mind that:

- if new variable record is added, enter plus (+) character in the OperationKind column;

- if an existing database variable record is deleted, enter minus (-) character in the OperationKind column;

- if an existing database variable record is modified, enter asterisk (*) character in the OperationKind column

3. Open the existing variable definitions base (button Open [image]).

4. Select Import modifications [image] command and indicate the appropriate *.XLS file with modified variable records.

5. In ‘Select worksheet’ window select the Variable modifications option and confirm the selection with OK button.


Declaring the length of the variable name

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.2. Creating Database in the Editor Mode > 2.2.2.4. Declaring the Length of the Variable Name

2.2.2.4. Declaring the Llength of the Variable Name

The checking of the maximum size of the variable in the variable definition database editor is done in relation to the current size of the Name column. If you want to change the restriction on the length of the variable, use the Change Attribute Size [image] option for the Name field. The option is available in the variable definition database editor menu.

Fig. 'Attribute Width Modification' Window.


2.3. Creating database in the Generator mode

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode

2.2.3. Creating Database in the Generator Mode

When creating variable definition base in Generator mode, the variable defitions are acquired from external sources (e.g. from XLS spreadsheets). The base is generated by use of Architect. After each modification of data sources it is needed to generate base manually once again (or update) and re-run the Asix system application.

The special case is creatig a cumulative base from several existing variable bases. See: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Creating Database in the Generator Mode > Cumulative Variable Definition Base.

To create the variable definitions base in Generator mode, perform the following steps:

1. Define the variable definitions base type as Generator mode

Fig. Variable Definitions Base > Type Tab – Generator Mode.

2. Determine the format and the variable definitions base name to be generated:

Variable definitions base > Format tab > database format set to Microsoft SQL Serwer database or Mdb format file (Jet/Microsoft Access)

In case of MS SQL database, the following parameters must be determined:

- Server name;

- Database name;

- Mirror server name;

- Database directory;

- Authorization mode:

- Windows,

- MSQL server –requires to set User name and Password.

3. Define the data sources:

Variable Definition Base > Data sources tab > data source files (Excel files, OLE DB object, ZEZ/DB files for older Asix versions or text files of older Asix versions or * .XML format configuration files of aaaaaaaqqqpplication).

Fig. Variable Definition Base > Data Sources Tab.

4. Select Generate [image] command.

5. If necessary, open the database to verify the correct generation with use of Variable definition editor;


2.3.1. Generating the variable definitions base from several sources

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.1. Generating the Variable Definitions Base from Several Data Sources

2.2.3.1. Generating the Variable Definitions Base from Several Data Sources

The Database block > The Variable definitions base has been equipped with the Options / Options 2 tabs that allow you to set parameters for generating a variable definition database from multiple sources - including cases when different sources contain definitions of repeating variables.

The Options tab includes the following parameters:

  • The maximum size of the variable name;

  • Generating information about variable definition locations:

- Add attribute 'Data source' - attribute will store the name of the worksheet that contains variable definition;

- Add attribute 'Data table' - attribute will store the name of the tabsheet that cotains variable definition;

  • Chcecking differences during generation of variable definitions base:

- Enable checking differences during generation of variable definition base - when the option is used, during base generation the new generated base is compared with the already existing one; in case of differences between them, question about continuation appears; the definitions of variables and scheme tables are compared.

- Enable storing only changes in variable definitions base;

- Enable tracking changes in the variable definictions base;

  • Creation of backup generation of variable definitions base:

- Enable creation of backup during generation of variable definition base;

The Options 2 tab includes the following parameters:

  • Dividing item definition between sources:

- Allow dividing variable definition between sources - when the optio is used, attributes of the variable definition may be given in different sources, but every attribute can only be given in one source;

  • Multiple variable definition - active variable preference:

- In case of recurring variable definition, use first definition of an active item;

  • Multiple variable definition - physical channel preference - this option is only for data sources in the form of INI or XML files;

- Item definitions may not recur;

- Item definitions may conditionally recur - in case of recurring variable definition, only one (first) definition of a variable in a physical channel will be accepted and the definitions in NETWORK channels will be ignored; for the rest of definitions from physical channels the warning information will appear in the pannel log of variable definition base generator;

- Item definition may recur - in case of recurring variable definition, the first definition of a variable in a physical channel will be accepted, for the second definition from a physical channel the warning information will appear in the pannel log of variable definition base generator and the rest of definitions from physical channels will be ignored.

- Definitions of variables can only occur in the physical channel;


2.3.2. Generating the variable definitions base from ZEZ/DB files

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.2. Generating the Variable Definitions Base from ZEZ/DB Files

2.2.3.2. Generating the Variable Definitions Base from ZEZ/DB Files

In the case of variable definition databases in the Paradox format used in older Asix versions (version 4 and earlier), they should be converted to the standard Asix system database format. See the section: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Converting Variable Definitions Base from Paradox Format to Jet or MS SQL Format .


2.3.3. Generating the variable definitions base from Excel worksheet

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.3. Generating the Variable Definitions Base from Excel Worksheet

2.2.3.3. Generating the Variable Definitions Base from Excel Worksheet

In the case of generating a variable definitions database on the basis of Excel spreadsheets, these sheets should be prepared in detail described in the chapter [image] Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparation of an External Data Source - Excel Sheet.

The Architect allows to prepare a template Excel file of variable definitions ( [image] Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparation of an Eexternal Data Source - Excel Sheet > Template of Variable Definitions ).


2.3.4. Generating the variable definitions base on the basis of OLE DB base

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.4. Generating the Variable Definitions Base on the Basis of OLE DB Base

2.2.3.4. Generating the Variable Definitions Base on the Basis of OLE DB Base

It is possible to generate the variable definitions base from OLE DB base, after the appropriate configuration of data connection properties (provider, connection properties and advanced options).

The structure of source OLE DB base should be prepared in a manner analogous to Excel worksheets used as the source of variable definitions generation. Therefore, the following data types shall be defined:

- variable attributes,

- grouping,

- attributes sets,

- conversion functions,

- captions,

- attribute languages,

- substitute names.

The above data should be prepared according to the indications contained in chapter: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparation of an External Data Source - Excel Sheet.


2.3.5. Generating the variable definition base on the basis of XML files

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.5. Generating the Variable Definition Base on the Basis of XML Files

2.2.3.5. Generating the Variable Definition Base on the Basis of XML Files

When generating the cumulative variable definition base from several bases of different asix system applications (different XML files) - it is recommended to declare the data sources with the use of Asix - xml files... command.

Fig. Variable Definitions Base > 'Data source' Tab > 'Asix - xml file...' Command.


2.3.6. Importing variable definitions from OPC server

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.6. Importing Variable Definitions from OPC / OPC UA Server / S7 XDB File / Wise Module of Advantech / Beckhoff Controller

2.2.3.6. Importing Variable Definitions from OPC / OPC UA Server / S7 XDB File / Wise Module of Advantech / Beckhoff Controller

Definitions of variables from the OPC / OPC UA server are imported into the Excel worksheet by the Import from OPC Server... , Import from OPC UA Server..., Import from S7 XDB File..., Import from Wise Module of Advantech, Import from Beckhoff Controller... command from the Variable Definitions Base > Import Items to Worksheet menu. This command starts a wizard that allows you to define a connection and how to import variable definitions. The wizard will automatically add the created sheet to the list of data sources of the designed application (Architect > Databases > Variable definitions Base > Data sources), when the Generator mode is the active type of variable definition database creation.

If the database is generated for the first time - in the Database module> Variable Definitions Base, on the Type tab, declare as the type of base creation - Generator mode.

If the variable definitions from the external sources have already been imported into the Ecxel worksheet and then the variable definitions database generated - it is possible to make changes to the worksheet containing definitions of variables coming from the OPC / OPC UA / S7 XDB / Advantech Wise / Beckhoff controller and importing these changes into the database using the Import Modifications ... command from the Variable Definitions Database menu. This option is available after setting the Editor mode in the Database module> Variable Definitions Base on the tab Type and opening the database.


2.3.7. Cumulative variable definition base

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.7. Cumulative Variable Definition Base

2.2.3.7. Cumulative Variable Definition Base

A cumulative database of variable definitions is a database of definitions of variables generated from several existing variable definition databases. There are two types of problems encountered when generating such a database.

Information of the same type may be in the input databases in attributes with different names. In this case, you have to use the attribute name transformation to unify the names of the attributes.

The second problem is the different names and number of grouping attributes. In this case, you have also to use attribute name transformation to unify attribute names or add missing grouping attributes. You have also to use attribute value transformation to provide values ​​for grouping attributes and, optionally, match the values ​​of grouping attributes for the naming used in the cumulative variable definition database.

 Note: it is also possible to read the definition of variables from linked variable definitions databases, parameterized by external XML files. See: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Creating Database in the Generator Mode > Generating the Variable Definition Base on the Basis of XML Files.


2.3.8. Data source update

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.8. Data Source Update

2.2.3.8. Data Source Update

When you have the variable definition base generated, it is possible to update the data sources without generating this base once again. Use the Update command from: Architect > Databases > Variable definitions base > Data sources tab).

The update command is banned when source files contain transformation tables or tables with used variables.


2.3.9. Transformation of names and values of attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.9. Transformation of Names and Values of Attributes

2.2.3.9. Transformation of Names and Values of Attributes

When generating the variable definition base on the basis of definitions located in XLS files, the mechanism for transformation of names and values of variable attributes is available. This mechanism requires preparing the special spreadsheet (table) with input/output attribute name or input/output attribute values. The name and structure of this spreadsheet is as follows:

- for attribute name transformation:

- spreadsheet name: AttrNameTrensformations;

- spreadsheet columns: DataSourceName, InputAttribute, OutputAttribute

( [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the external data source – Excel worksheet > Transformation parameters of attribute names and attribute values)

When InputAttribute field is empty, the new column is added to data source.

When OutputAttribute field is empty, the new column is deleted from data source.

- for attribute value transformation:

- spreadsheet name: AttrValueTransformations;

- spreadsheet columns: DataSourceName, Attribute, AttributeInputValue, AttributeOutputValue

( [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the external data source – Excel worksheet > Transformation parameters of attribute names and attribute values)

When AttributeInputValue field is empty, the new attribute value is added to data source.

When AttributeOutputValue field is empty, the new attribute value is deleted from data source.


2.3.10. Overwriting attributes by selected data source table

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.10. Overwriting Attributes by Selected Data Source Table

2.2.3.10. Overwriting Attributes by Selected Data Source Table

Overwriting the attribute values by the selected data source table requires inserting an additional column named ForceUpdateAttributes to the table (worksheet) with target attribute values that we want to overwrite.

Overwriting the attribute values is performed for specific variables - the table with destination attribute values should therefore contain a column with variable names, attribute columns with target values and a ForceUpdateAttributes column (this column may be empty, values in it are not taken into account).

Fig. Overwriting Attributes - the Table with Target Atrribute Values.


Declaring the maximum length of the variable name

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.3. Creating Database in the Generator Mode > 2.2.3.11. Declaring the Maximum Length of the Variable Name

2.2.3.11. Declaring the Maximum Length of the Variable Name

For variable definition databases created in generator mode, it is possible to use the option defining the maximum length of variable names: 50 characters for classic applications and 255 for applications in the Evo version. The option Maximum size of the variable name is available when creating the variable definition database using the generator, on the Options tab:

Architect > Databases > Variable Definitions Base > Options

Fig. Variable Definition Database > Options > Maximum Size of the Variable Name.


2.4. Variable view

Apart from access to the definition of variables provided by the editor of the variable definition database, the variable definitions can be viewed using the 'Items View' window, run with the [image] Show button.

Fig. 'Items View' Window.

In addition, the window gives the opportunity to view the values of current variables and modify these values.

To display the values of the current variables, use the Show Current Values button, at which the Variable Value and Variable Quality columns are displayed.

The function is available only in the variable selection window called directly from the Architect program. In the displaying current values mode, the row of filters is hidden, since refreshing the current values and practically prevents using it.

To change the value of a variable, select the Modify Current Value command from the drop-down menu in the selected variable row.

Figure: 'Items View' Window - Modification of the Current Variable Value.

The 'Items View' window also allows you to search for variables by name.

Fig. 'Items View' Window - Variable Search.


Searching for the attribute value and filtering records by the attribute value

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.4. Variable view > 2.2.4.1. Searching for the attribute value and filtering records by the attribute value

2.2.4.1. Searching for the Attribute Value and Filtering Records by the Attribute Value

Searching and filtering records according to the required attribute value enables the Filter Builder called by the Filtering and Grouping > Customize... command from the command bar of the 'Browse variables' window:

Figure: Filter Wizard Window for Variable Definitions Database Records.

The variable definition editor has a mechanism for searching for the incremental value of any attribute. After entering the initial letters of the searched value in any column cell of this attribute, the mechanism automatically moves to the first record with the given initial value of the attribute. The mechanism works for columns of all attributes.


2.5. Use of Excel worksheet as the source of variable attribute data without generating the

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.5. Use of Excel Worksheet as the Source of Variable Attribute Data without Generating Database

2.2.5. Use of Excel Worksheet as the Source of Variable Attribute Data without Generating the Variable Definition Database

The user working with the latest version of the Asix package has the option of configuring the application so that it uses variable definitions downloaded directly from Excel spreadsheets [*]. These sheets should be prepared in a manner described in detail in the chapter: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet.

How to declare the spreadsheet as the source of variable definitions?:

1. Define the variable definitions base type as Data source type

3. Load the data sources:

Variable definitions base > Data sources tab > select *.XLS file by pressing Excel button.

In ‘Select tables’ window select all items and confirm with OK button.

Repeat this step to declare all necessary source files.

4. To preview the data in ‘Variable preview’ window, select Show [image] button.

This type of variable definitions database can be applied only, if Asix system is running on the machine and it is ALWAYS launched as the first one. This excludes situation, when a Web server AsPortal or AsWWW is running on the machine or AsixConnect module is used for generation of reports.

[*] The variable definition base in temporarily generated once at Asix system application start-up; when you change definitions, the application restart is needed.


2.6. Preparing the external data source – Excel worksheet

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet

2.2.6. Preparing the External Data Source – Excel Worksheet

If the data source necessary for generation of variable definitions base (and in the Data source base creation mode, when the variable definitions are acquired directly from Excel worksheet) is Excel worksheet, the data must be contained in sheets in format XLS or XLSX. The sheets can be created in Microsoft Excel (version 97, 2000, XP, 2003 or 2007) or Open Office (version 1.1.2 or newer).

Architect has a simple, but fully functional spreadsheet allowing to edit the XLS format sheets – useful if Microsoft Excel suite is not installed on the machine.

Several types of data, located in separate sheets in form of tables[*] , should be distinguished. Those types will be discussed in the following subchapters:

  • variable attributes

  • grouping,

  • attributes sets,

  • conversion functions,

  • captions,

  • attribute languages,

  • substitute name,

  • transformation parameters of attribute names and attribute values.

The tabs the names of which start at the '#' character are only informative tabs; they are not visible by Architect during variable definition base generation.

[*] Tables means the same as spreadsheet.


2.6.1. Variable attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.1. Variable Attributes

2.2.6.1. Variable Attributes

Variable attributes can be locate in one or several worksheets of any name, in one of several tabs. All attributes of single variable must be located in single worksheet.

The given worksheet does not have to include all attributes defined in the base. All numerical attributes, which are undefined for the variable, will have NULL value assigned. Empty text attributes will have a value of text of zero length.

Fig. Definitions of Variables in Excel Sheet in Division to Several Tabs.

All system attribute names are internally declared in English.

While importing data, the system attribute names may be given both in Polish and English - according to the agreed attribute name template - [image] see: Appendix 1.


2.6.2. Grouping

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.2. Grouping

2.2.6.2. Grouping

Grouping attributes must be located in table of determined name (in Polish: AtrybutyGrupujące, in English: GroupingAttributes).

The table consists of one column (in Polish: Nazwa, in English: Name). Each line contains a name of one grouping attribute. For example.

The names of grouping attributes are custom.

Fig. Excel Worksheet – Grouping Attributes.


2.6.3. Attribute sets

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.3. Attribute Sets

2.2.6.3. Attribute Sets

Table of attribute sets (of defined name – in Polish: ZestawyAtrybutów, in English: AttributeSets) contains two columns. One column (of defined name – in Polish: Nazwa, in English: Name) the name of the set is included. In the second column (in Polish: Atrybut, in English: Attribute) – the attribute name is shown.

In case of system attributes, use the attribute names defined for Polish or English (internal names or names declared as those designed to appear in column headers of item definition editor window, item definitions preview window or attribute selection window – [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Captions).

Fig. Excel Worksheet – Attribute Sets.


2.6.4. Conversion function parameters

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.4. Conversion Function Parameters

2.2.6.4. Conversion Function Parameters

Table of function parameters (of defined name – in Polish: FunkcjePrzeliczające, in English: ConversionFunctions) contains two columns. The first column (in Polish: Nazwa, in English: Name) the contains the function name, the second column (in Polish: Atrybut, in English: Attribute) – contains the attribute name.

In case of system attributes, use the attribute names defined for Polish or English (internal names or names declared as those designed to appear in column headers of item definition editor window, item definitions preview window or attribute selection window – [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Captions).

Fig. Excel Worksheet – Conversion Function Parameters.


2.6.5. Captions

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.5. Captions

2.2.6.5. Captions

Caption table (defined Polish name is: NagłówkiAtrybutów, in English: AttributeCaptions) allows to define the column headers in item selection/attribute editing windows. All variable header texts must be unique. Name of any attribute can not be the header name of any other attribute.

In the first caption table column (in Polish: Nazwa, in English: Name), place the attribute names – for system attributes, use the attribute system names in Polish or English; for user attributes, give them in such form, as they were defined in the worksheets with variable definitions.

In the second column (in Polish: Język, in English: Language) the language codes should be placed – according to ISO marking of supported languages. The list of all language codes supported by Architect is contained in Appendix 2.

The third column (in Polish: Nagłówek, in English: Caption) is designed for defining the displayed header names.

Fig. Excel Worksheet – Captions.


2.6.6. Attribute languages

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.6. Attribute Languages

2.2.6.6. Attribute Languages

Table of defined name (in Polish: JęzykiAtrybutów, in English: AttributeLanguages) allowing to determine, in which language the given attribute values were defined. The information is usually necessary only for multilingual applications to determine the language of alias/attribute and text attributes for proper editing and displaying.

The first column (in Polish: Nazwa, in English: Name) should contain the names of attributes (original names or names declared as those designed to appear in column headers of item definition editor window, variable definition preview window or attribute selection window – [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Captions).

The second column (in Polish: Język, in English: Language) contains the language codes – according to ISO marking of the supported languages.

In the following screen, English is declared for Opis_EN attribute, which contains English variable description. When Opis_EN attribute is declared as substitute name for Opis zmiennej attribute (see: see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Substitute Attributes), the variable descriptions will appear, according to the attached application language, either in Polish or in English.

Fig. Excel Worksheet – Attribute Languages.


2.6.7. Substitute attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.7. Substitute Attributes

2.2.6.7. Substitute Attributes

Defining aliases is used for multilingual applications, where it is often necessary that in one language some attribute, referred to as the basic one, should be replaced with substitute attribute (alias). To achieve this, define both attributes in the database and declare in the alias table, which is the basic attribute and which is the substitute one.

The language for the basic and substitute attribute must be defined in the language table - [image] see: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Attribute Languges.

Attribute aliases must be declared in the table of defined name – in Polish: AtrybutyZastępcze, in English: SubstituteAttributes.

The first column (in Polish: Nazwa, in English: Name) should contain the basic attributes, and the second column (in Polish: NazwaZastępcza, in English: SubstituteName) – the respective aliases.

Fig. Excel Sheet – Substitute Attributes.


2.6.9. Transformation parameters of attribute names and attribute values

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.8. Transformatio Parameters of Attribute Names and Attribute Values

2.2.6.8. Transformation Parameters of Attribute Names and Attribute Values

When generating the variable definition base on the basis of definitions located in XLS files, the mechanism for transformation of names and values of variable attributes is available. This mechanism requires preparing the special spreadsheet (table) with input/output attribute name or input/output attribute values. The structure of this spreadsheet is as follows:

- for attribute name transformation:

- spreadsheet name: AttrNameTrensformations;

- spreadsheet columns: DataSourceName, InputAttribute, OutputAttribute

When InputAttribute field is empty, the new column is added to data source.

When OutputAttribute field is empty, the new column is deleted from data source.

As DataSourceName, enter the name of the data source as it appears in the Architect in the table in Database > Variable Definitions Base > Data Sources > Data Source Name column. This name can be, for example, the name of an Excel spreadsheet. You have to enter the name of an existing column as the InputAttribute attribute. The new name of the column must be specified as the OutputAttribute - a column with this name can no longer exist.

- for attribute value transformation:

- spreadsheet name: AttrValueTransformations;

- spreadsheet columns: DataSourceName, Attribute, AttributeInputValue, AttributeOutputValue

When AttributeInputValue field is empty, the new attribute value is added to data source.

When AttributeOutputValue field is empty, the new attribute value is deleted from data source.

As DataSourceName, the value as above should be given. The name of the attribute the values of which are to be transformed should be given as Attribute. As the AttributeInputValue specify the value of the attribute to be modified. As the AttributeOutputValue attribute, you have to provide a new value for the attribute.

You can use the spreadsheets template to generate the proper spreadsheet for transformation of names and values of variable attributes (Architect > Databases > Variable definition base > Template tab).

Fig. Excel Sheet – Attribute Name Transformation.


2.6.10. Used variables

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.9. Used Variables

2.2.6.9. Used Variables

The spreadsheet with a set of used variables allows to narrow down the number of variables whose definitions are to be taken from sources during the generation of the variable definition database.

This mechanism is mainly used when generating collective definitions databases.

The variables used must be in a table (sheet) with the specified name UsedItems. The table should contain one colum: Name.

Declaring a worksheet (table) UsedItems as a data source, from which the variable definitions database will be generated (next to sources from which variable definitions will be downloaded) - it allows to control the number of variables to be included in the database.


2.6.11. Template of variable definitions

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.10. Template of Variable Definitions

2.2.6.10. Template of Variable Definition Database

The architect makes it easier to prepare an Excel file with definitions of variables, giving the possibility to generate a template workbook containing selected sheets used to generate the variable definitions database.

Generating a variable definition template in an Excel file:

1. Go to:

Variable Definition Database > Template tab (with the type of Asix System Variable Definition Database created in Generator mode or Data Source mode)

2. Select the sheets that you want to appear in the template

3. Click the Create ... button


2.6.12. Templates for attribute variables

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.11. Templates for Attribute Values

2.2.6.11. Templates for Attribute Values

When generating a database for a single variable definition database, you can use the transformation of attribute values to collect frequently repeating attribute values in one place. For example, you can specify for each variable archiving parameters 'PLCArchiving' or 'ArchivingScript' identifiers. Then, in the attribute value transformation table, specify that 'PLCArchiving' should be changed eg to D, 1s ,, 1s and 'ArchivingScript' to D, 10s, 10s. See: Data Server > Parameterization of Data Server > Handling of the Asix Application Variable Definition Databases > Preparing the External Data Source – Excel Worksheet > Transformation Parameters of Attribute Names and Attribute Values.


Asix Architect Excel Plugin - edition of variable definition database attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.6. Preparing the External Data Source – Excel Worksheet > 2.2.6.12. Asix Architect Excel Plugin - Edition of Variable Definition Database Attributes

2.2.6.12. Asix Architect Excel Plugin - Edition of Variable Definition Database Attributes

The Asix VarDef Excel add-in dedicated to the spreadsheet from the version of MS Excel 2007 gives the possibility to edit attributes of variable definitions using the same editors that are available when editing variable definitions in a database created in the Editor mode - ie directly in the Architect program (Variable Definitions Base Type > Standard variable definitions base > Editor mode).

The list of attributes that can be defined in the MS Excel spreadsheet by means of the mentioned editors includes: Address, Channel, Conversion Function, Format, Format_Evo, Archive, Archiving Parameters, limits, Control Variable Mask, MeterId, MeterCycle, MeterInterval.

The Asix Application option allows you to load the application xml file with the station indication; It is recommended to first open the Excel file with the replacement definitions, and then load the application XML file.
The Edit option allows you to call the editor after selecting the cell to be edited.

The Fixup Sheet option removes from the spreadsheet the formatting of cells outside the data area.

The Asix VarDef Excel add-in is available from the version 9.1.0 of the Asix package. Its installation can take place during the installation of the Asix package. After installing the Asix package, the installation of the Asix VarDef Excel addon can be performed (eg after updating the Office package) using the Asix Package Service Configurator (asix extensions installer.exe).

Fig. MS Excel Spreadsheet - View of the Bookmark of the Installed Asix Architect Excel Plugin - Channel Editor.


2.7. Storing description of variable states in VarDef

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.7. Storing Description of Variable States in Variable Definition Database

2.2.7. Storing Description of Variable States in Variable Definition Database

In the AsTrend program from the version 5 it is possible to display state descriptions as value axis labels for physical charts.

The mechanism of displaying state values ​​requires declaring variables that will correspond to the status of monitored variables. For this purpose, the database of variable definitions should be prepared in the first place - so that there are attributes that support state definitions. These are the following attributes:

State names - the name of a set of states or directly a set of descriptions of variable states by format:

<value_of_state_0> = <description_of_state_0>; <value_of_state_1> = <description_of_state_1>; .. etc.

State set - the name of the set of states to which the current row belongs; attribute used only for rows containing an element of a set of state descriptions;

State value - a value expressed in a decimal system for a state whose description contains the current row; attribute used only for rows containing the element of variable state description set.

It is necessary to define as many variables as there are states of a given monitored variable. Each such variable must have the declared text, which will be displayed for the given state, status value and the name of the set of states. These variables should have the Item not active attribute enabled.

All variables with state texts should be associated with the variable monitored by a common name of the set of states - which should be declared for the monitored variable as the value of the State names attribute, and for variables with state texts as the value of the State set attribute. The texts to be displayed on the value axis of the graph should be saved as values ​​of the Description attribute for individual variables corresponding to the values ​​of the monitored variable states.

Fig. Definitions of Attributes Used to Display State Descriptions.

In addition, the description of statuses for monitored variables is displayed on the labels and in the field that appears after clicking the selected point of the chart line.

While variables are added to the AsTrend trend from variable definition database as well as from external source, it is checked whether variable has defined states – if it does, stairs interpolation is turned on automatically for the given variable.


Storing Descriptions of Bit States in the Variable Definition Database

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.8. Storing Descriptions of Bit States in the Variable Definition Database

2.2.8. Storing Descriptions of Bit States in the Variable Definition Database

I CASE - THE DESCRIPTIONS OF BIT STATES COME FROM ONE VARIABLE

The mechanism of displaying the values ​​of bit states requires declaring variables that will correspond to particular bits of the monitored variable. For this purpose, the database of variable definitions should be prepared in the first place so that there are attributes supporting definitions of bit states. These are the following attributes:

State names - the name of the set of states (for the variable definition row the bits of which will be displayed) or descriptions of the bit states of the variable (for rows of individual bits);

State set - the name of the bit set to which the current row belongs; attribute used only for rows of individual bits;
State value - the bit number the description of which contains the current row; attribute used only for rows of individual bits.

Define as many variables as there are bits of a given monitored variable. Each such variable must have the declared text, which will be displayed for the given state, state value and the name of the set of states. These variables should have the Item not active attribute enabled.

All bits with state texts should be associated with a variable monitored by a common name of a set of states - which name should be declared as the value of the State names attribute for the monitored variable, and for the variables with bit state texts as the value of the State set attribute. The texts to be displayed on the value axis of the graph should be written as values ​​of the attribute State names for variables corresponding to particular bits of the monitored variable, acc. format:

0 = <description of state>; 1 = <description of state>

However, the State value attribute specifies the bit number of the monitored variable.

Figure: Definitions of Attributes Used to Display Bit State Descriptions.

II CASE - DESCRIPTIONS OF BIT STATUTES COME FROM DIFFERENT BINARY VARIABLES

The mechanism of displaying values of bit states of binary variables does not require declaring additional variables. The attribute supporting definitions of bit states is in this case the attribute:

State names - containing descriptions of variable states acc. format:

0 = <description of state>; 1 = <description of state>

Figure: Definitions of Attributes Used to Display Descriptions of Bit States of Binary Variables.


2.8. Converting the variable definitions base from text files to Jet or SQL format

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.9. Converting Variable Definitions Base from Paradox Format to Jet or MS SQL Format

2.2.9. Converting Variable Definitions Base from Paradox Format to Jet or MS SQL Format

Architect enables conversion of all data from BDE variable definitions base created in older version of Asix system (base in Paradox format) to Jet or SQL database.

In case of older versions of Asix system, the variable definitions base in Paradox format consists of:

- variable attributes base – physical Paradox database files;

- variable definitions base scheme – *.TXT file describing all attributes, which can be assigned to a variable;

- variable set – text file *.ZEZ containing the definition of arrangement of variable groups (one variable definitions base can include a custom number of variable sets).

Basically, in case of such databases it is recommended to prepare the variable definitions in Excel worksheet, which would serve as basis for generation of the variable definitions database withuse of Variable Base Manager program. In case of minor applications, the variable definitions bases were created and edited directly by means of Variable Base Editor.

How to convert the Paradox variable definitions base created in older Asix versions to Jet or MS SQL database?:

First case, when the variable definitions base was created directly with use of Variable Base Editor (without *.XLS file)

1. Define the variable definitions base type as Generator mode

2. Determine the format and name of variable definitions base, which will be generated:

Variable Definitions Base > Format tab > database format set to: Microsoft SQL Server database or Mdb format file (Jet/Microsoft Access)

In case of MS SQL database, the following parameters must be determined:

- Server name;

- Database name;

- Database directory;

- Authorization mode:

- Windows,

- MSQL server –requires to set User name and Password.

3. Define the data source:

Varbase > Data sources tab > indicate ZEZ/DB files (button [image])

4. Select all items in ‘Select table’ window and confirm it with OK button.

Fig. Table Selection Window for Database Conversion to Jet or MS SQL Format.

5. Select Generate [image] command.

6. Open the database and, if necessary, change the variable attributes with use of Item definition editor or modify the variables definitions base scheme with use of Scheme editor.

It is possible to edit the database after switching to Editor mode:

Variable definition base > Type tab > Editor mode

Second case, when the variable definitions base was generated with use of Variable Base Manager basing on the variable definitions prepared in Excel spreadsheet

Assumption: after the database conversion, it must be possible to update the variable definitions and database schemes from Excel worksheet compliant with template valid for Asix 5-6.

1. Define the variable definitions base type as Generator mode

2. Determine the format and name of variable definitions base, which will be generated:

Variable definition mode > Format tab > database format set to: Microsoft SQL Server database or Mdb format file (Jet/Microsoft Access)

In case of MS SQL database, the following parameters must be determined:

- Server name;

- Database name;

- Database directory;

- Authorization mode:

- Windows,

- MSQL server –requires to set User name and Password.

3. Define the data source:

Variable definition base > Data sources tab > indicate ZEZ/DB files (button [image])

4. Select all items in ‘Select table’ window and confirm it with OK button.

5. Select Generate [image] command, open the database and check, whether the database was correctly generated. If necessary, change the variable attributes with use of Item definition editor or modify the variables definitions base scheme with use of Scheme editor.

It is possible to edit the database after switching to Editor mode:

Variable definition base > Type tab > Editor mode (during mode switching, the base must be closed)

7. Close the base and switch to editor mode:

Variable definition base > Type tab > Editor mode

8. Reopen the generated variable definitions base and export it to Excel worksheet with use of Export [image] command. In ‘Export of base to Excel sheet’ window select all available data types and change the output file name to Scheme.xls (custom name); confirm the changes with OK button.

Fig. ‘Export of Base to Excel Sheet' Window.

9. Close the base.

10. Open Scheme.xls sheet;

The GroupingAttributes sheet include the grouping attributes, which should be ‘manually’ added to the definition of variables stored in Excel worksheet used as source for generation and updating of the Paradox variable definition base.

In older asix version, the variable definitions base allowed to declare only one grouping attribute of defined name Group for each variable. However, it was possible to arrange the groups declared in Group attribute into a tree-type hierarchical structure displayed in the variable selection window – which allowed to ‘see’ the given variable as an element belonging to the defined group or subgroup.

Figure Window of Variable List in Asix4 Package.

The definition of variable group arrangement was contained in *.ZEZ file.

At the moment, during conversion of Paradox variable definitions base to Jet or MS SQL format, the number of generated grouping attributes depends on the hierarchical structure defined in *.ZEZ file.

Fig. Variable Definition Editor – Variable Grouping Window.

11. Open the worksheet, which served as the source file for generating/updating the Paradox variables definitions base and add the columns of grouping attributes generated in Scheme.xls worksheet to all sheets with variable definitions.

For each variable definition, add the grouping attribute values taken from Variables tab of Scheme.xls worksheet. Remember to delete the old Group parameter.

Such modified variable definitions worksheets can be the source for generating/updating Jet or MS SQL variable definitions database.

13. Delete Variables tab from Scheme.xls worksheet.

The remaining tabs contain the variable attribute names translated into national language, substitute attribute declarations (for multilingual applications) AsTrend averages names, attribute sets definitions, grouping attributes – i.e. all the data which were earlier stored in Scheme.txt text file.

From now on, Scheme.xls file can be the source for updating the data available in Architect from the level of Scheme editor of Varbase module.

14. Switch to generator mode:

Variable definition base > Type tab > Generator mode

15. In Data sources tab select and delete all data sources.

16. Press Excel button and indicate the *.xls file containing the variables definition.

17. In ‘Select table’ window select all variable definitions sheets and confirm with OK button.

18. In Data sources tab press Excel button again and indicate *.xls file with variable definitions base scheme data, i.e. Scheme.xls file.

19. In ‘Select table’ window select all sheets and confirm with OK button.

20. Select Generate [image] command, then open the database and check whether it was correctly generated. All data for database updating can be entered to *.xls files, which were created in previous steps – each change of those files requires a re-generation of the database.


2.9. Converting the variable definitions base from text files to Jet or SQL format

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.10. Converting the Variable Definitions Base from Text Files to Jet or SQL Format

2.2.10. Converting the Variable Definitions Base from Text Files to Jet or SQL Format

In order to maintain compatibility with older versions of Asix system, Architect also allows to import variable definitions data from text files.

How to convert the variable definitions base from text files to Jet or MS SQL database?:

1. Define the variable definitions base type as Generator mode

2. Determine the format and name of variable definitions base, which will be generated:

Variable definition base > Format tab > database format set to: Microsoft SQL Serwer database or Mdb format file (Jet/Microsoft Access)

In case of MS SQL database, the following parameters must be determined:

- Server name;

- Database name;

- Database directory;

- Authorization mode:

- Windows,

- MSQL server –requires to set User name and Password.

3. Define the data source:

Variable definition base > Data sources tab > indicate text files with variable definitions (button [image])

4. Select all items in ‘Select table’ window and confirm it with OK button.

5. Select Generate [image] command.

6. Open the database and, if necessary, change the variable attributes with use of Item definition editor or modify the variables definitions base scheme with use of Scheme editor.

It is possible to edit the database after switching to Editor mode:

Variable definition base > Type tab > Editor mode


Import of Variable Definitions from Text Files - Grouping Attributes

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.10. Converting the Variable Definitions Base from Text Files to Jet or SQL Format > 2.2.10.1. Import of Variable Definitions from Text Files - Grouping Attributes

2.2.10.1. Import of Variable Definitions from Text Files - Grouping Attributes

The value of the first attribute grouping the variable is by default the same as the name of the current variables file in which the variable is defined (file name without extension and without path). To explicitly specify the values of the attributes grouping the variable, place in the file the definitions of current variables, in the form of a comment, lines declaring the values of grouping attributes. The line declaring values of grouping attributes is a line with the following format:

#Attributes: Attribute1 = Value1 [, Attribute2 = Value2 ...]

or

#Attributes: Attribute1 = Value1 [, Attribute2 = Value2 ...]

The declaration starts from the place of declaration and extends to the next declaration or to the end of the file.


2.10. Exporting database to Excel

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.11. Exporting Database to Excel Sheet

2.2.11. Exporting Database to Excel Sheet

Architect allows to save all data or selected data from the variable definitions base in Excel sheet. The maximum number of lines exported to 32000.

How to export the variable definitions to Excel sheet?:

1. Open MSQL (or Jet) variable definitions base, giving its location in:

Variable definition base > Format tab

and click on Open [image] command from the Items Definitions Editor command category.

2. Select Export [image] command.

3. In ‘Export of base to Excel sheet’ window select the data to be exported and the path and name of the output XLS file.

Fig. 'Export of Base to Excel Sheet' Window.


2.11. Access from other programs

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.12. Access from Other Programs

2.2.12. Access from Other Programs

The variable definitions database is a base managed by Microsoft SQL Server or Jet base. It can be accessed from any program supported by those systems.

The access to data stored in variable definitions database VarDef is intermediated by AsixConnect module with use of DDE, Automation or .NET mechanism.


2.12. On-line Variable definition base update

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.13. On-line Variable Definition Base Update

2.2.13. On-line Variable Definition Base Update

If it is impossible to stop the application and its restart to modify the variable definition database, it is possible to update the database in online mode. This operation is possible only when the declared variable definition database type is the Standard variable definitions base, "Editor" mode.

Assuming that the variable definitions database was modified by using the editor (variable definitions were changed, new variables were added, etc.), use the button [image] Online Update.

Fig. On-line Variable Definition Base Update - Confirmation Window.

After confirming the willingness to update the on-line database, the Asix system will carry it out, and the appropriate message will appear in the Control Panel, indicating the number of modified database records and variable names.

Note: In case when the definitions of variables are stored in spreadsheets (in which updates of definitions were introduced), on the basis of which the database of variable definitions is generated - switching to database update mode using the variable definition database editor will cause the source spreadsheets will not include changes made using the editor.


Mirroring

Home > Data Server > 2. Parameterization of Data Server > 2.2. Handling of the Asix Application Variable Definition Databases > 2.2.14. Mirroring

2.2.14. Mirroring

Optionally, the variable definition database can support mirroring. To use this function, you have to provide the name of the MS SQL server that contains the mirror of variable definitiona database. Mirroring the variable definition database significantly increases the availability of the database.

Mirroring is defined at the stage of the variable definitions database format declaration:

Variable definitions base > Format tab

Configuration of the mirroring mechanism for the variable definition database:

1. Configure the Microsoft SQL Server services on the host computer so that they work under the same user (local or domain). Add a user to the list of SQL server users and give it the role 'sysadmin'.

2. On both servers, open ports 1433 and 5022.

3. In the Architect program, in the database format options, enter the name of the mirror server and generate a database of variable definitions on the master server.

4. Perform backup of the variable definition database.

5. In the Architect program, use the Variable Definitions Base > Mirror > Copy of User '_asix_internal' command to copy the '_asix_internal' user from the master server to the mrror.

6. Restore the variable definition database backup on the mirror server in RESTORE WITH NORECOVERY mode.

7. Using Microsoft SQL Server Management Studio, enable database mirroring (base local menu > Tasks > Mirror).


6 Appendix 1 - List of system attributes of the variable

Home > Data Server > Appendix 1 - List of System Attributes of the Variable

Appendix 1

Table 1. List of System Attributes of the Variable Definition Database

Internal name of the variable attribute (PL) | Attribute type | Default name displayed in the header (PL) | Internal name of the variable attribute (EN) | Default name displayed in the header (EN) | Type | Description
Nazwa | mandatory | Nazwa | Name | Name | T | Unique symbolic name of the process variable univocally identifying the variable for all asix system components
Opis | mandatory | Opis | Description | Description | T | A custom text e.g. containing the technological description of process variable
Kanał | mandatory | Kanał | Channel | Channel | T | Logical name of the transmission channel (one of the names given in the transmission channel declaration)
Adres | mandatory | Adres | Address | Address | T | Symbolic address, whose form is specific for each asix system driver
LiczbaElementow | mandatory | Liczba elementów | ElementsCount | Elements count | N | Number of elements included in the process variable (variable can be an array)
OkresProbkowania | mandatory | Okres próbkowania | SampleRate | Sample rate | N | Period of process variable value updating (in seconds)
FunkcjaPrzeliczajaca | mandatory | Funkcja przeliczająca | ConversionFunction | Conversion function | T | Name of conversion function used to convert the value received from the controller to the value fed to asix system components
Archiwum | mandatory | Archiwum | Archive | Archive | T | Name of ASPAD resource (logical name of archive resource)
ParametryArchiwizacji | mandatory | Parametry archiwizacji | ArchivingParameters | Archiving parameters | T | Parameters of archiving of the given variable
Grupa1 | optional | Grupa1 | Group1 | Group1 | T | Grouping attribute, generated by default
Format | optional | Format | Format | Format | T | Format of the number, used for displaying in asix system; the format is given in the manner required by C language (e.g. %4t2f is 4 digits, including 2 decimal digits
Jednostka | optional | Jednostka | Unit | Unit | T | Physical variable unit
ZakresPomiarowyOd | optional | Zakres pomiarowy od | MeasurementRangeFrom | Measurement range from | N | Maximum range, which can be used – minimal value
ZakresPomiarowyHi | optional | Zakres pomiarowy do | MeasurementRangeTo | Measurement range to | N | Maximum range, which can be used – maximal value
ZakresSurowyOd | optional | Zakres surowy od | RawRangeFrom | Raw range from | N | Conversion function parameter – input range from …
ZakresSurowyDo | optional | Zakres surowy do | RawRangeTo | Raw range to | N | Conversion function parameter – input range to …
ZakresPrzetwornikaOd | optional | Zakres przetwornika od | TransducerRangeFrom | Transducer range from | N | Transducer range – minimal value
ZakresPrzetwornikaDo | optional | Zakres przetwornika do | TransducerRangeTo | Transducer range to | N | Transducer range – maximal value
ZakresWyswietlaniaOd | optional | Zakres wyświetlania od | DisplayRangeFrom | Display range from | N | Lower range limit for displaying the given variable – for asix objects
ZakresWyswietlaniaDo | optional | Zakres wyświetlania do | DisplayRangeTo | Display range to | N | Upper range limit for displaying the given variable – for asix objects
ZakresSterowaniaOd | optional | Zakres sterowania od | SteeringRangeFrom | Steering range from | N | Lower range limit for the value of the given variable set from asix
ZakresSterowaniaDo | optional | Zakres sterowania do | SteeringRangeTo | Steering range to | N | Upper range limit for the value of the given variable set from asix
BazaSlupka | optional | Baza słupka | BarBase | Bar base | T | Size loaded from the database by the BAR object
NazwyStanow | optional | Nazwy stanów | StateNames | State names | T | Name of the set of texts or directly - the set of description of variable states (specific full values)
ZestawStanow | optional | Zestaw stanów | StateSet | State set | T | Name of the set of state descriptions, where the current line belongs to. Attribute used only for lines including the state description set element.
WartoscStanu | optional | Wartość stanu | StateValue | State value | T | Number of state, whose description is used in the current line. Attribute used only for lines including the state description set element.
MaskaZmiennejKontrolnej | optional | Maska zmiennej kontrolnej | ControlVariableMask | Control Variable mask | T | Indicator of the status bit signaled by the control variable
ZmiennaKontrolna | optional | Zmienna kontrolna | ControlVariable | Control variable | T | Name of variable representing the measurement variable status
LimitLoLo | optional | Minimum krytyczne | LimitLoLo | Limit LoLo | T | Name of asix system variable containing the critical minimal value for the measurement variable
LimitLo | optional | Minimum | LimitLo | Limit Lo | T | Name of asix system variable containing the minimal value for the measurement variable
LimitHi | optional | Maksimum | LimitHi | Limit Hi | T | Name of asix system variable containing the maximal value for the measurement variable
LimitHiHi | optional | Maksimum krytyczne | LimitHiHi | Limit HiHi | T | Name of asix system variable containing the critical maximal value for the measurement variable
ZakresWyswietlaniaKrok | optional | Zakres wyświetlania krok | DisplayRangeStep | Display range step | L | It is used by CHART object. It means span of units of main scale on OY axis (at how many unit intervals the label will be displayed on OY axis)
ZakresWyswietlaniaSzer | optional | Zakres wyświetlania szerokość | DisplayRangeWidth | Display range width | L | It is used by CHART object. It means the width of value label displayed on 0Y axis
ZakresWyswietlaniaPodzial | optional | Zakres wyświetlania podział | DisplayRangeDivision | Display range division | L | It is used by CHART object. It determines the segmentation of main scale units defined by DisplayRangeStep attribute into smaller ones on 0Y axis
Dokladnosc | optional | Dokładność | Precision | Precision | T | Rounding precision for the NUMBER object. E.g. , if 10 is given in this field, the number will be rounded to full tens. By default, rounding is disabled.
PolozenieSuwaka | optional | Położenie suwaka | SliderPosition | Slider position | T | Name of variable, where the values representing the position of the SLIDER object during moving of such slider will be entered.
RejestracjaSterowania | optional | Rejestracja sterowania | ControlLogging | Control logging | Logical value | Value 1 means that control actions of the variable are registered in AsAudit module
ZmiennaNieaktywna | optional | Zmienna nieaktywna | ItemNotActive | Item not active | Logical value | If the attribute value is 1, the variable is not visible in asix system for Asmen and Aspad
WykresTytul | optional | Tytuł wykresu | ChartTitle | Chart title | T | It is used by CHART object. It is used for object parameterization – while defining the parameters in CHART parameterization window, the title of the chart is retrieved from VarBase, from definition of variable added to the chart as first
ZakresSlupkaOd | optional | Zakres słupka od | BarRangeFrom | Bar range from | T | It is used by BAR object. Lower range limit for the value of the given variable
ZakresSlupkaDo | optional | Zakres słupka do | BarRangeTo | Bar range to | T | It is used by BAR object. Upper range limit for the value of the given variable
SzybkieOdswiezanie | optional | Szybkie odświeżanie | FastRefresh | Fast refresh | Logical value | It is used by CtTwinCATTcpip driver from the version 1.3.5. The variables with this parameter declared have the possibility of fast refresh with maksimal speed of a link (it doesn't influence archiving time)
SprawdzanieZakresuPomiarowego | optional | Sprawdzanie zakresu pomiarowego | MeasurementRangeCheck | Measurement range check | Logical value | The value of 1 menas that overflows of measurement range will be detected and signalled by the special OPC status for specified variable.

T –text, N – 64-bit floating point number


8 Appendix 3 – List of language codes

Home > Data Server > Appendix 2 – List of Language Codes

Appendix 2 – List of Language Codes

Language code | Language name
Af | Afrikaans
Sq | Albanian
En | English
Az | Azeri
be | Belarusian
bg | Bulgarian
hr | Croatian
cs | Czech
da | Danish
et | Estonian
fi | Finnish
fr | French
el | Greek
ka | Georgian
es | Spanish
nl | Dutch
is | Icelandic
kk | Kazakh
ko | Korean
lt | Lithuanian
lv | Latvian
mk | Macedonian
de | German
no | Norwegian
hy | Armenian
pl | Polish
pt | Portuguese
ru | Russian
ro | Romanian
sr | Serbian
sk | Slovakian
sl | Slovenian
sv | Swedish
tr | Turkish
uk | Ukrainian
uz | Uzbek
hu | Hungarian
it | Italian


Home > 2.4.1 Archives Types

2.4.1 Archives Types


Home > 5.5 Using the Security System in the Application

5.5 Using the Security System in the Application


Asix.Evo_Application_Parameterization

Home > Asix.Evo_Application_Parameterization

Table of Contents

1 Configuration of the Application Workstations

1.1 'Stations' Operating Panel

1.1.1 Creating New Workstation

1.2 Setting the Parameters Depending on a Workstation

1.3 Configuration of Workstation Communication Parameters

1.3.1 Server Aliases

1.3.2 Foreign Workstations

1.4 Running the Application in the Context of the Selected Workstation

1.5 Connection Diagnostics

2 Current and Historical Data Access Configuration

2.1 Data Server Configuration

2.2 Process Variable Definition Database

2.2.1 Creating a New Database

2.2.2 Importing the Previously Created Database

2.2.3 Editing and Browsing the Variable Definition Database

2.2.4 Variable Attributes

2.2.5 Setting the Database Activity Status

2.3 Communication Channels

2.3.1 Communication Drivers

2.3.2 Types of Virtual Channels

2.4 Declaration of the Process Variable Value Archives

2.4.1 Archives Types

3 Scheduler Configuration

3.1 Other Methods of the Operator Action Automatic Execution

4 Parameterization of Multilingual Applications

4.1 Application Languages Declaration

4.2 Switching the Operating Language

4.3 Program Texts

4.4 Application Texts

4.4.1 General Purpose Texts

5 Security System

5.1 Defining Users

5.2 Defining Roles

5.2.1 The "Runtime Administration Right" Permission

5.2.2 The "Control Send Right" Permission

5.2.3 The "Alarms Acceptation Right" Permission

5.2.4 The "Desktop Is Enabled" Permission

5.3 The Security System Operating Mode

5.3.1 Standard Mode

5.3.2 Central Mode

5.4 Settings Specific for a Workstation

5.5 Using the Security System in the Application

5.5.1 User Login

5.5.2 Verification of Permissions

5.5.3 Changes in the Permission Parameters in the Application Run Mode

5.5.4 Viewing the Login Event Log

6 Recording Control Operation

7 Operation with AsTrend Program

7.1 Operation in the Browser Version of the Application

8 Operation with the AsBase Program

8.1 Connection Filter

8.1.1 Inserts

8.2 Users Permissions

8.3 AsBase in Browser-Based Applications

9 Synchronization of the Application Files

9.1 Synchronisation of the Application Definition Directory

9.2 Synchronization of Working Directory

10 Using Pattern Trends

10.1 Trends Edition

10.2 Displaying Pattern Trends

10.3 Trend Transfer

11 Keyboard

11.1 Keyboard Object

11.2 Box Keyboard


Users' Privileges

Type topic text here.


Welcome

Home > Welcome

>> Help for Asix v.9

www.asix.com.pl

Asix.Evo - Data Server


3.1. Introduction

Ready asix system application consist of a set of interconnected technological masks containing static and dynamic objects. They constitute a coherent entity by means of the set of actions, which control their displaying. The basis for operation of the entire mask system is XML configuration file created with use of Architect program. The masks system is designed by means of AS program in Constructor mode. In turn, the ready application is executed by AS program operating in the application runtime mode.

Fig. View of technological masks of an application in demo asix system - Plant.

The configuration of asix application with use of Architect consists of:

- configuration of variable definitions database (discussed in detail in chapter 2. Handling of the asix application variable definitions databases);

- configuration of application operation.

The simplified application design and execution process in asix system is presented in the following graph.

Fig. Scheme of application design and execution process in asix system.

During application parameterization, Architect performs an ongoing control of mutual coherence od declared option, which results in significant increase of work efficiency.

The application operation configuration is effected with use of parameter modules displayed with button [image] (the button is located in the left block of Architect window).

Fig. Application parameter configuration module.

Architect module enables a fully visual and interactive configuration of the entire operation of asix system. This consists in defining the parameter necessary for operation of various subsystems of AS program responsible for execution of the designed application.

The above mentioned parameters were divided in Architect into the following groups (parameter tree is displayed with Application button, located in the left block of Architect window):

The parameters configuring the application operation are divided into the following modules:

- Start parameters,

- Masks,

- Current data,

- Current data - network server,

- Historical data,

- Alarms system,

- Network module,

- Security,

- Printout,

- Reports,

- Actions and Schedules,

- Miscellaneous.

The application operation parameter settings are saved in XML configuration file, which also stores data related to variable definitions database and the application alarms definitions base.

The details of asix package functionality (including the description of subsequent stages of application designing with use of asix5-6 package) are contained in “Asix – user manual” (asix.hlp or asix.pdf).

The design process for the application added to asix5-6 package as demo application – 'Factory' - is discussed in detail in "First application – step by step” manual.

Some practical examples discussed in Architect manual refer to the above mentioned demo application.


3.6.5. Channels management

Home > 3.6.5. Channels management

3.6.5. Channel management

The 'Channels management' window is activated by the Manage Channels command from the local menu displayed after clicking the right mouse button on the Current data [image] item. It allows to delete, copy to computer/field and change type of driver used in channel.

Fig. 'Channel manager' window.


3.2. Creating the new application configuration file

Creating the XML configuration file for the application is the first step preceding the stage of variable definitions base configuration and application configuration.

The parameter configuring the application operation and declaring the database, which shall be the basis for application operation are saved to one shared XML file (Extensible Markup Language), placed in the root directory of the designed application.

Creating the configuration file:

Version 1 – without wizard

  1. In the main menu select File and select command New application [image].

  2. In the left block of Architect window, click on Fields and computers button.

  3. Make the following changes in the list of computers:

    - add as many computers and fields, as required by the application project – bearing in mind that the common field includes parameters, which in the multi-station configuration of asix system are shared by all stations with the application running; at the same time, the configuration on Computer level allows to customize settings depending on the machine type (other settings for operator station, other for dedicated data server in corporate network). Settings on Computer level take precedence before the Field level settings.

    - change the computer and field names to ones appropriate for the environment, where the application shall operate

  4. Save the file in the designed application directory.

Version 2 – with use of wizard

1. In the main menu select File and select command New Application - Wizard [image].

2. In the new application wizard window, open Application tab and determine the following data:

- Application file name,

- Application directory;

and the following directories (where paths are relative in respect to the application directory):

- Masks directory,

- Data archive directory,

- Alarms archive directory,

- Reports directory,

- Trends directory,

- Temporary directory;

and also:

- Message file name – the file will be created in the temporary directory.

All introduced changes confirm with OK.

Fig. Configuration file/new application directory structure wizard – Application tab.

3. Define the following data in the new application wizard window in Computers and fields tab:

- in the Parameterization of multiple stations block, give the types of machines, for which the parameter sets should be created:

- Operator station,

- KE station,

- Terminal,

- Dedicated data server in the company network.

It is not required to define here all types of machines, for which the wizard will automatically create the application parameter sets – the designer can at all times modify the number of computers/fields displayed in Fields and computers block.

Furthermore, the selection of the specific machine type does not influence the number and type of parameters, which will be contained in the set. All parameters available for declaration are provided for each Field and for each Computer.

- in the Basic modules block, define the following elements:

- Name of system variable channel,

- Name of data archive in the network,

- Name of alarm server in the network,

- Add basic set of bitmap fonts,

- add set of classic Windows fonts (Arial, Sans Serif, Times New Roman)

Confirm the changes with OK button.

Fig. Configuration file/new application directory structure wizard – Computers and fields tab.

4. In the new application wizard window in VarDef – type tab, define the variable definitions database type.

If Generator mode option is declared, it will be possible to declare source files with variable definitions and generate the database only after the creation of application configuration file.

Confirm the changes with OK button.

Fig. Configuration file/new application directory structure wizard – VarDef – type tab.

If Generator mode option and database format Microsoft SQL Server 2000/2005/2008 database option are selected – prior to generation of application file with use of wizard, together with generation of SQL variable definitions database, the SQL server should be deployed on the computer. Asix system package contains MSDE 2000 (Microsoft SQL Server 2000 Desktop Engine), which is a simplified version of SQL Server 2000. MSDE version supplied by Askom is designated only for use with Askom products. The MSDE 2000 installation method is discussed in study: “MSDE 2000 – installation manual. Technical support”, available for downloading from ASKOM website (www.asix.com.pl - http://www.asix.com.pl/en/support/tips/art2.html ).

5. In the new application wizard window in VarDef – format and location tab, define the variable definitions database format and name.

In case of MS SQL database, the following parameters must be determined:

- Server name;

- Database name;

- Database directory;

- Authorization mode:

- Windows,

- MSQL server –requires to set User name and Password.

Fig. Configuration file/new application directory structure wizard – VarDef – format and location tab.


3.3. Importing *.INI configuration files

In case of applications created in older versions of asix package, it is possible to convert the application *.INI files to *.XML configuration file format.

This is performed by means of command:

File > New application – importer [image], which shall launch the import parameters window:

Fig. *.INI-based application import window.

‘Application import’ window allows to determine:

  • Source directory – parameter indicates directory of asix application parameterized with use of *.ini files;

  • Application files – this field indicates *.ini files of the imported application;

  • Options:

  • Import menu files (*.pum) – select this option to import the application menu definitions to *.XML configuration file; this will allow menu editing from the level of Architect program:

Masks module > Menu tab;

  • Import action set files (*.act) – select this option to import the definitions of action sets to *.XML configuration files; the syntax of action sets will be editable in Architect program:

Scripts and actions module > Action sets tab;

  • Import commented options – select this option to import options commented in *.ini files to *.XML file; the options will remain inactive;

If *.ini file contains commented documentation fragment, it is not recommended to select this option.


3.4. Configuration of start parameters

Start parameters include the basic information about the status of asix system in the stage of application start.


3.5. Configuration of masks parameters

Masks module includes parameters, which need to be configured in order to guarantee the proper operation of masks. Those parameters, among others, locate the graphical symbols used for mask design, indicates directories, from which the masks are acquired during the application runtime, and defines the selected parameters of objects operation on masks.


3.6. Configuration of current data parameters

The Current data [image] parameter group includes the settings of Asmen module settings, including the detailed parameterization of transmission channels – physically executed connections between asix system machine and object controllers and the parameterization of communication drivers.

In asix system all operations related with access to process variables are executed by Asmen module. It supervises the process of cyclical process variable value updating in the database and intermediates all operations related with sending controls to the object. The direct data exchange between the machine and object driver is executed by means of drivers operating under control of Asmen.

Basing on the performed parameterization, a repository of current process variable values is create (stored by Asmen module in the machine’s operating memory). All asix system components can access this repository. The values of stored process variables are updated on current basis through cyclical object reading.

Detailed description of Asmen module functionality can be found in “Asix –user manual” in chapter ASMEN communication module.


3.7. Configuration of network server related current data parameters

Configuration of parameters from group [image] Current data – network server is related to setting the parameters configuring the method of data exchange in the local computer network.

Local computer network may be used for creation of such asix configuration, where only a part of machines (data servers) have direct connections with controllers. The remaining computers (workstations) use the information provided by the data servers by means of local network.

Asix system transmission channels used for data acquisition through local network are dubbed ‘network channels’.

Data exchange in the local computer network between asix stations is executed by NETSERV module. This module is loaded automatically during asix start-up.


3.8. Configuration of archival data

The parameter group [image] Historical data contains the settings of Aspad module operation, including the logging parameters and parameters for further restoration of temporal trend of the variables.

Aspad module enables archiving of variables of any type allowed in Asmen module, on condition that these are scalar variables. These can be both the process variables, and variables being the result of calculation or simulation. In the current version, it is impossible to archive tables. Except for value and time, the OPC-compliant value status is also saved. Data are gathered in files of special structure (D, M, Y archive – the division into daily, monthly and annual files) or in databases (archive B).

Detailed description of the functional ability of Aspad module can be found in “Asix – user manual” in chapter “ASPAD Data Archiving Program.


3.9. Configuration of alarm system

Asix system has an embedded, flexible alarm handling system, allowing for full satisfaction of the needs related to the comprehensive handling of emergency situations and events in the technological process.

Description of the alarm system can be found in "Asix – user manual” in Alarm system chapter.

In general, the alarm system can be divided into two parts:

  • system core, responsible for alarm detection, saving and definitions;

  • visualization part, including two types of alarm masks (active and historical alarms).

System core configuration consists in appropriate definition of parameters in the application’s XML configuration file and creation of text files with additional information.

Additional parameters are determined in text files. These are:

  • alarm definitions files,

  • group definitions files,

  • limit definitions files.

Instead of above mentioned text files, alarm definitions and group definitions can be prepared in Excel spreadsheet and on this basis, the alarm definitions base can be generated (see: 3.9.1.1 . Preparation of alarms definitions and alarms groups in Excel spreadsheet).

Current status and alarm history are stored in disk files. Alarm files are stored in “alarms” subdirectory of the start directory (if no other solution is declared). File alarms.act stores all active alarms. Alarms history is stored in set of files with names based on pattern: al??????.log. Each file stores the alarms for one day. Date of the day is coded as characters ??????, and give, in sequence, day, month and year. Alarms history files can be kept indefinitely. It is possible to limit the alarms storing period.

Most parameters related to configuration alarms is configured by Architect module in application parameter group à [image] Alarm system.


3.10. Configuration of network module

Parameter group [image] Network module covers Aslink module operation settings.

ASLINK is a module allowing other asix system components for communication through the local computer network. Aslink defines the set of network services, which are used by all other asix system programs parameterized for network operation.

For its operation, Aslink utilizes the services provided by NETBIOS emulator, i.e. program implementing one of the most common network interfaces in the transport layer. NETBIOS specification was developed by IBM; ASLINK is based on NETBIOS specification in version 3.0 contained in IBM Local Area Network Technical Reference (IBM Part Number SC30-3587-00). The basis for Aslink operation are NETBIOS connection services for (in other words: session-based) data transfer.

The basic service provided for other asix package components, such as Asmen, Aspad or alarm handling subsystem – is the reliable data transfer between each pair of utility processes operating on any stations connected to the computer network and executing a common utility protocol. In this scope, Aslink module services are directed for supporting the communication based on “server” process and “client” process, utilizing its services.

In particular, Aslink provides:

  • searching the network for processes fulfilling the server roles in relation to resources necessary for client processes,

  • establishing of the connection (i.e. transmission channel) between the client and the indicated resource server,

  • bidirectional, reliable data transfer in each channel,

  • notifying the processes that the channel was closed as an effect of network failure or by an open command of one of the partners.

Detailed description of Aslink module functionality is contained in “Asix – user manual” in ASLINK – network module chapter.

All the setting of network module are stored in XML application configuration file. If there is no asix application on the computer, but there are: AsixConnect, AsTrend or any other application based on the asix application data - the network settings for the computer are stored in aslink.ini file. The aslink.ini file editor is run by the Network Module - Options for Servers command from the Tool menu of Architect - the editor configures all the same options that are set in the [image] Network module.


3.11. Application security configuration

Parameter group [image] Security includes an activation of dynamic system security measures, definition of level passwords, and in case of usage of login system – definition of users and locking commands, which may change the application status.

System security mechanisms allow for easy securing of access to potentially dangerous functions of the operating system, which – if used by the operator in an unskilled or irresponsible manner – could result in system damage. At the same time, security mechanisms allow asix system to operate on the Windows user account with large privileges, which facilitates the maintenance and management of the operating system. The dynamic security mechanism is integrated with asix system and toggles the security functions on and off, depending on the application’s access control configuration.

The set of dynamically switched security measures includes the following mechanisms:

- locking access to the task manager (Ctrl+Alt+Del keys);

- hiding and locking the taskbar;

- locking the keys opening start menu (Ctrl+Esc and Windows keys);

- locking the displaying of HLP help files.

The method of security mechanism switching depends on application’s access control configuration. Two variants are possible:

- application user system (login system) is active; then, the dynamic security mechanisms are toggled on only when the operator with administrator rights is logged in;

- only the level passwords system is active; dynamic security mechanisms are toggled on, only when level 4 password is active.

In case of usage of level passwords system, there are four levels of authorizations necessary for execution of operator actions and process control operations.

The login system allows to define a custom number of users. Each of the users possesses a password for one of the five authorization levels.

Detailed description of security mechanisms used in asix system (including the usage of level passwords system and user login mode) can be found in “Asix – user manual” in chapter Designer – designing the application.


3.12. Printout parameter configuration

Group [image] Printout – is a place, where user is able to declare the layout of printouts – including the alarm printouts.


3.13. Declaration of report definition handling

Module [image] Reports includes configuration parameters for reporting module. It concerns the reports prepared in ASTEL/ASTER language or script reports (see: "Asix - user's manual", chapter about reports).

Fig. Report parameter window – 'Report' tab.

Reports tab includes the following configuration parameters:

  • Edit lock – item locking the ability to correct report definitions in the application runtime mode; it may be recommended to unlock editing for deployment stage (then it is not necessary to switch to Designer module);

Default value: by default, the parameter is disabled, which means that it is possible to change reports in the application runtime mode

  • Scale lock – use the parameter to block the reports window size;

Default value: by default, the operator may freely change the report window size;

  • Directory containing files with report definitions

Default value: by default, the reports definitions files are located in the application’s current directory

  • Maximal number of days by which one can go back while calculating report – gives the time period, measured backwards from the current moment (in days), by which one can maximally go back during report calculation; if non-positive period or period bigger than 366 days is given, the default 366 days is assumed;

Default value: 0 days

The item allows to save some operating memory used for running of reporting module. Limiting the allowed period may enable calculating reports in situation, when normally the reporting module would not start due to insufficient memory.


3.14. Configuration of script and action parameters

Home > 3.14. Configuration of script and action parameters

3.14. Configuration of action and schedulers parameters

Group [image] Action and Schedulers includes parameters related with:

  • declaration of action sets;

  • configuration of scheduler;

Detailed information on action and schedulers one can find in "Asix - user's manual" (asix.hlp or asix.pdf).


3.15. Miscellaneous parameters group

Group [image] Miscellaneous parameters contains parameters not classified to other groups. These are the following parameter categories:

- Application,

- Script parameters,

- Calculator,

- Directly entered options.


3.16. Configuring multilingual application

Home > 3.16. Configuring multilingual application

3.17. Configuring multilingual application

The multilingual application system allows to switch the application operation language at the request of the operator. All texts inputted by the designer in stage of application creation are subject to change.

To parameterize the application for operation in several languages, perform the following steps:

1. The first step is to set the declared languages parameters:

  • Masks > Languages tab:

    pl, Polish, EastEurope

    en, English, EastEurope

    The order of entered languages is important – the first language is the primary (default) language.

2. Then create the list of text used in the application. This is facilitated with Table of Translation mechanism, which is used for translation of texts entered by the operator during the application definition. This pertains mostly to texts from objects located on visualization masks.

  • The mechanism is started, when file TranslateTable.Lng is placed in the application start directory. This is the text file, where all lines are multilingual texts.

    The basic Table of Translation can be generated automatically with use of TRANSLATION_FILE function from TOOLS menu of Designer window.

    When the categories of generated information are selected, use Generate button to save all found texts in TranslateTable.Tlt file. If file TranslateTable.Lng existed previously, all included translations will be transferred to the generated file.

    Designer shall supplement the missing translations directly in TranslateTable.Lng file or supplement TranslateTable.Tlt file and rename it to TranslateTable.Lng.

    After generating the translation table, supplement the entries according to the following example:

    [pl]polish text[en]english text

    It is possible to edit texts by means of Architect module editor:

    Masks > Languages tab> Table of translation, Edit button

3. If application acquires descriptions from variable definitions base, certain modification should be introduced there. In XLS file, next to Description column in each sheet, create columns with names in appropriate languages (in which the application is supposed to run), where the counterparts of descriptions located in Description column should be located.

  • In case of source archive for generation of alarms definitions base Alarms, the description is located in one column according to the record: [pl]polish text[en]english text.

4. The translation of multilingual application texts can be performed also with use of Table of Texts mechanism, which is used for translation of texts, which are displayed within application elements and are not given openly by the designer (they are embedded into program code). Mechanisms is started, when TextTable.Lng file is located in the application start directory.

Table of Texts file is a text file, where each line is a multilingual text determining the translations of texts.

Asix package also includes TextTable.Tlt file, containing complete table of texts for Polish and English language. Designer should copy this file to application directory with name TextTable.Lng, and then supplement the multilingual texts with variant definitions for other used application languages.

The rule of functioning of the Table of Texts consists in searching the translation for program-embedded text among all defined multilingual texts.

Text editing can be also performed with use of Architect module editor:

Masks > Languages tab > Table of texts, Edit button


3.16. Operator action

Detailed information on operator action you can find in "Asix - user's manual" (asix.hlp or asix.pdf).

Designing the operator actions for the asix application usage is very easy when you take advantage of Action editor. It is a very usefull tool activated after clicking the right mouse button in edition field for entering action definition. You can also run the editor form the Actions and Schedulers item, from scheduler tabs. The editor includes detailed descriptions of all actions (and theirs parameters) used in asix system application.

Fig. Action editor window.


3.18. Running the application

How to make a shortcut icon launching the asix system application?:

  1. In the Architect module window, open the application’s XML file and from the menu bar select command Tools > Shortcut creator…

  2. Determine the shortcut type (Shortcut to Asix), station name – for station, whose application you want to run, shortcut name, shortcut location (Desktop or Selected directory) and press Create button.

  3. The application may be now launched by means of shortcut, e.g. from the desktop.

The application may be also launched during Architect module operation with use of Run Asix system command from File menu. XML configuration file is launched, and the parameters declared for the given parameter are used.

Shortcut creator… also allows to make shortcuts for Architect and AsTrend programs.

Fig. Shortcut creator window.


3.19. AsPortal application configurator

AsPortal application configurator, embedded into Architect program, enables an easy launch of the process information portal for the designed application.

Detailed description of the AsPortal application functionality and configuration can be found in “Asix4Internet – user manual”.

AsPortal application configurator is launched by a command from the main menu:

Application > Configure Internet Applications > AsPortal tab

Configurator handling is reduced to use of two buttons:

  • Configure on the Server configuration tab – creates AsixConnect channel, parameterizes Web.Config file, assigns rights of access to the variable definitions base directory

  • Run AsPortal on the Client tab – allows to run AsPortal with access to process data of the operating application

Application is available locally under the address:

http://localhost/AsPort

Application is availabe in the local network under the address:

http://<computer name in Windows system>/AsPort

The scope of displayed information about process variables can be determined with use of View editor of AsPortal application started with command:

Application > Configure appearance of AsPortal Application

Editor allows to determine the list of attributes displayed:

- in the database preview and variable selection window, with determination of the number of lines displayed in one page (Variable definitions base tab);

- in the current data table (Current data tab);

- in the variable table, in result table headers, in description on the printout page – for the data presented in table form (Historical data – table tab);

- in variable table, in description on the printout page – for the data presented in form of charts (Historical data – chart tab).

Fig. Window of view editor of AsPortal application.


3.20. Web application creator

Web application creator allows to generate Web application, which can be viewed by the user by means of Internet Explorer 6/7 browser. One button click is enough to convert all standard application components to format required by Web application.

Detailed description of converting asix application into Web application can be found in “Asix4Internet – user manual” (Asix4Internet.hlp or Asix4Internet.pdf).

The web application converter is run by the Generate Web Application command form the Application menu.

Fig. Web application creator window.

Application is available locally after entering in IE6 browser of the following address:

http://localhost/<name of virtual application directory>

Application is available in the local network under the address

http://<computer name in Windows system>/<name of virtual application directory>

Fig. Web application 'Factory'.


3.2.1. Creating the new application - Wizard - import from OPC

Home > 3.2.1. Creating the new application - Wizard - import from OPC

3.2.1. Creating the new application - Wizard - base import from OPC

Creating the new application in the mode of importing variable definition base from OPC server is realized by the Wizard of a new application that imports the base form OPC server into the standard format of asix 5-6.

The mentioned wizard is run by the New Application - OPC Wizard... command from the File menu.

The wizard is similar to wizard described in 3.2. Creating the new application configuration file (see that chapter). Only the tabs referring to the variable definition base are different.

The OPC data spource tab allows you to set: Identifier of OPC server in Windows system, Remote server name in Windows and Name of OPC channel.

Fig. Creator of a new application of the asix system - base import from OPC - 'OPC data source' tab.

The VarDef - OPC tab allows you to set the following parameters:

- Determining names of variables imported from OPC server;

- Element count - for text and array variable the number of elements should be determined;

- Default archiving parameters;

- Output file - the spreadsheet with variable definitions will be generated on the basis of the definitions from the OPC server base; the file will be added to Data sources tab of Variable definition base (after using the wizard you will have the type of variable definition base set on the Standard variable definition base with Generator mode);

- Float values - only archive of type B can store float values with double precission; all other archives store float values with single precision.


3.21. Trend converter for old trend version

The trend converter is dedicated to convert trend definitions from *.DAT files into *.TRNX files. The *.DAT files were used up to asix 3 version. The current format of trend files is TRNX.

All the variables used by trend fields have to be declared in Variable Definition Base - only then the conversion can be realized.


3.22. Table editor

Variable Tables enable you to create windows designed to inspect the current values of ASMEN variables. You can access Variable Tables in edition mode from Architect or in run-time mode by using the TABLE operator action.

The edition of Variable Table is supported by the editor run from the Table Editor... command from the Tools menu of Architect.

Variable Table gives the possibility of access to the description of binary digits of status variables as well as description of binary digit values of status variables.

The interface of editor groups similar parameters defining a table on separate tabs:

- Table - defines basic parameters: position and size of table window, table view, cell view,...;

- Columns - defines headers of displayed columns and the format of displayed values;

- Rows - declares the variables to be displayed in a table (values of variables or values of binary digits);

- Colors - formats colors of a table and displayed values;

The example of table definition with values of analog variables you find in demo application 'Factory' available in asix package.

(default directory after asix installation: C:\AsixApp\Factory\Tables, file: T1.tbl)

The example of table definition with values of binary digits of status variable displayed in successive columns of variable row you find in demo application 'Factory' available in asix package.

(default directory after asix installation: C:\AsixApp\Factory\Tables, file: T3_diag.tbl)

The example of table definition with values of binary digits of status variable displayed in successive rows you find in demo application 'Factory' available in asix package.

(default directory after asix installation: C:\AsixApp\Factory\Tables, file: Drive_status.tbl)


3.4.1. Standard data

Fig. Start parameters window – Standard tab.

Standard tab defines:

  • Application identifier / Name – allows to assign a name to the application identifying the given application in the network of stations. If a name is assigned, during end of work, it is checked whether in the network there exist any machines running the same application. If such machine is not found, the appropriate information will be displayed. It is then required to confirm the program exit command.

Default value: no name

  • Box intro – field indicating to a bitmap, which will be displayed on the screen during the application start-up.

Default value: none

  • Action – field indicating to an operator’s action, which shall be executed during the application start – after opening of all masks declared in parameter:

Start parameters module > Masks tab > Open parameter

Default value - no start action

To perform several operations, an action set is required.


3.4.2. Declaration of programs started together with the application

Programs tabs:

  • AsTrend – allows to declare the start of AsTrend program simultaneously with asix application; AsTrend program runs minimized and waits for calls from AS program; you can also set the following parameters connected with AsTrend start:

  • Save block - if set, it doesn't allow saving any AsTrend files;

  • Always work as Administrator;

  • Alternative variable definitions base for AsTrend application;

  • Directory of the converted trends v1- if you have a very old asix version trends defined in DAT files, you have to declare this directory and use the converter run by pressing the Run converter button to convert DAT files into TRNX files.

  • Ignore action parameters of Trend v1 - option used only when you have to convert DAT files into TRNX files.

Default value: no declaration

Fig. 'Start parameters' window – 'Programs' tab - 'AsTrend' tab 1.

Fig. 'Start parameters' window – 'Programs' tab - 'AsTrend' tab 2.

  • AsBase – allows to declare the start of AsBase program simultaneously with asix application with additional options:

  • Name of XML configuration file – mandatory parameter; XML file stores the basic configuration information, such as location and method of access to AsBase application database; XML files also stores the definitions of archiving conditions and automatic prescriptions;

  • User, Password – optional parameter; results in automatic login of the indicated user at the program start-up;

  • Allow only one instance of application to run – optional parameter; in the situation, when the program is running, new program instance will not be created; the earlier AsBase instance will be put on top;

  • Run application minimized – optional parameter

  • Require administrator privileges to end AsBase application

Start AsBase has an identical effect as operator’s action ASBASE, located in ACTION parameter (Start parameters> Standard tab > Action parameter); the only important difference is the moment of execution – Start AsBase parameter is executed before opening of masks indicated in parameter: Start parameters module > Masks tab > Open parameter; while AUTOSTART action – even if executed by Action parameter (Start parametes module > Standard tab) is executed after opening of start masks. This can constitute a serious problem: autostart masks cannot use ASBASE objects.

Default value – none start action

Fig. 'Start parameters' window – 'Programs' tab - 'AsBase' tab.

  • Askom.Data.Host – allows to declare the start of Askom.Data.Host that is used by reporting system (based on reports prepared in Microsoft Reporting Services environment) to provide access to asix application process data; when the asix application has reports prepared in MS Reporting Services environment, the Askom.Data.Host has to be run all the time of application running.

Fig. 'Start parameters' window – 'Programs' tab - 'Askom.Data.Host' tab.

  • Scripts – the scripts declared in the table on Scripts tab will be executed during start of asix system application.

Fig. 'Start parameters' window – 'Programs' tab - 'Scripts' tab.


3.4.3. Basic parameters of Control Panel and Designer

Control panel tab allows to define the basic parameters of Control Panel and Designer.

Window tab

  • Control panel window position – the starting position of the Control panel window. The coordinates are given in pixels.

Default value: - standard position.

While defining the window position, the designer can use a tool simplifying this activity. Select… button runs the ‘Window position’ window, which contains Preview button. It allows to determine coordinates by manual moving of the grey window of the size of Control Panel.

Fig. Start parameters window – Control panel/Window tab.

  • Display control panel window always on top – this item allows to assign an attribute to the control panel window, which will result in displaying the window above all other system windows. It is useful to use this parameter, if masks with “on top” parameter are used, which can cover the panel.

  • Errors buffer - numer of errors stored in the control panel and designer window.

  • Hide – allows to block hiding of the application windows from Designer menu level (command Files > Hide windows is blocked) and action HIDE_ALL. It is useful, when it is necessary to set a different mode of operation of the same application on various stations (e.g. operator station and control station).

Command Files > Hide windows and action HIDE_ALL result in minimization of all open application windows to an icon in right part of the toolbar. This automatically reduces the CPU load. To restore the application, double-click on asix icon located in the right part of the toolbar.

  • Silence – this item disables the sound signaling of control panel alarms and messages.

File tab

Fig. Start parameters window – Control panel/Window tab.

  • Message file – indicates location, where the Control Panel and Designer messages will be saved and determines the maximal message file size.

Button [image] runs the asix log viewer window.

Button [image] deletes the log file.

Default value - system messages are not saved to file.

Fig. Asix log viewer.


3.4.4. File synchronization

File synchronization tab allows to set the mechanism of application file updating.

Files tab

  • Files – option allows to define files that will be synchronized with template from specified directory.

Default value: non-active.

Fig. 'Start parameters' window – 'File synchronization' tab - 'Files' tab.

Option tab

  • Period – synchronization period.

Default value: non-active.

  • Report – the option allows to send messages to Control Panel in case of file synchronization operation.

Default value: non-active.

Fig. 'Start parameters' window – 'File synchronization' tab - 'Options' tab.


3.4.5. Defining interdependencies between computers and fields

View of Computers tab depends on the fact, which element is highlighted in the computer and fields tree. If it is Field, the window displays a list of computers connected to the given field. If it is Computer, a tab appears with the statement of areas available and areas, where the given computer is connected.

Fig. View of computers connected to the selected field.

Fig. View of fields, where the selected computer is connected.


3.4.6 Declaratrion of active variables

Home > 3.4.6 Declaratrion of active variables

3.4.6. Declaratrion of active variables

The VarDef active variables tab allows to switch on variable selection according to the attribute defined by the user. That may be any attribute declared by the user in Variable Definition Base and then set on the VarDef active variables tab. The variables with the value of 1 for this attribute are treated as active variables and are loaded at asix application start-up.

Fig. 'Start paramaters' > 'VarDef active variables' tab.


3.4.7. Declaration of external VarDef

The Variable definiiton base tab is active for the External variable definition base declared as the VarDef type:

Architect > Databases > Variable definition base > Type tab

  • Variable definiiton base – name and path of MDB file or name of MS SQL server and database name separated by slash.

Fig. 'Start paramaters' > 'Variable definition base' tab.


3.5.1. Declaring the location of graphic files and technological masks

Files and Directories tab allows to execute the following functions:

Fig. Masks parameters window – 'Files and Directories' tab.

  • Graphical symbols file gives the name of file, where the bitmaps and icons used for the application are stored. The user may on his own created the graphical symbol files necessary for designed applications). The default vale: user can create the.

Default value: bitmaps are by standard added to the package and are colated in AS program directory.

The instruction for use of bitmaps in asix system application can be found in “Asix – user manual” (asix.pdf i asix.hlp), chapter Designer – designing the application.

  • Mask path – this item presents the list of directory names, where the files with visualization masks are located;

The default value: missing entry means that the mask items will be loaded from application’s root directory.


3.5.2 Declaration of masks opened automatically at application start-up

Home > 3.5.2 Declaration of masks opened automatically at application start-up

3.5.2. Declaration of masks opened automatically at application start-up

Opened masks tab defines:

Fig. Start parameters window – 'Opened masks' tab.

  • Opened masks – names of masks, which should be opened automatically at application start-up;

  • Opened and minimalized masks – names of masks, which should be opened automatically at application start-up and immediately minimized.


3.5.3. Declaration of fonts used in the designed application

Fonts tab

Fig. Mask parameter window – 'Fonts' tab.

Fonts tab allows to define fonts used in asix system application. Under the list of declared fonts, there is a font preview window, enabling to check the selected font.


3.5.4 Declaration of application languages

Fig. Mask parameters window – 'Languages' tab.

Languages tab is designated for defining the application operation languages.

  • Languages are declared by means of:

  • Language code – it is recommended to observe ISO639 standard; the language code is used for selecting the active language and for selection the appropriate versions of texts used in the application;

The statement of all language codes supported by Architect is contained in Appendix 2.

  • Description – language description;

  • Code page - parameter, which determines the appropriate code page for the given language; the parameter is used by the automatic font code page switching function;

Five language items can be declared for the given application, i.e. application built with use of the package can work in five languages.

The first declared language is of special significance. It describes so-called basic language. This is the language, in which the application was created.

Language switching system is activated, if at least two application operation languages are defined in the configuration file.

  • Table of Texts – is used for translation of texts, which are displayed within the application elements and are embedded into the program code.

The mechanism is launched, if file named TextTable.Lng is placed in the application start directory.

The Table of Texts file is a text file, where individual lines are multilingual texts defining the text translations. Comment lines, market with semicolon preceding the entire line, are allowed.

Within asix package, TextTable.Tlt file is supplied, which contains a full table of texts for Polish and English.

The designer should copy this file to the application directory under the name of TextTable.Lng, and then fill in the multilingual texts with variant definitions for other used application languages.

  • Table of translation – is used for translation of texts entered by the designer during application definition. In particular, this pertains to texts from objects located on visualization masks.

The mechanism is launched, when file named TranslateTable.Lng is placed in the application start directory. The base Table of Translation file can be generated automatically with use of TRANSLATION_FILE function from TOOLS menu of Designer window.

See also 3.17. Configuring multilingual application.


3.5.5. Editor for TABLE object

Table tab allows to run variable table editor used for displaying current values of process variables.

Fig. Mask parameters - 'Table' tab.


3.5.6. Definition of menu located on application mask

Fig. Masks parameter window – 'Menu' tab.

Menu tab is designated for creating menu definitions located on masks performing the function of menu bars with drop-down selectable items.

Fig. Drop-down menu view.

Definition of a single menu is attached to one button on the menu bar.

To create menu definition, declare the menu name in Menu window and use [image] command to open the menu editor.

Fig. Menu editor window.

In Menu editor determine the following elements defining the layout and method of operation of the single menu:

  • Name – in this field, enter the texts - directly or with use of Multilingual texts editor (started with button [image]) – which should appear in the ready-made application as the drop-down list items.

Fig. Multilingual texts editor.

  • Action – this field allows to declare an action for each item of the defined drop-down menu. The action will be executed, when the given item is selected. The action can be defined with use of Action editor started with button [image].

Fig. Action editor.

  • Group start – selecting this field for a given item causes that in the ready drop-down menu items list, a horizontal line will appear above this item, thus separating the item from previous ones.

Fig. Group start in the drop-down items menu list.

To add and delete drop-down list items, use the Menu editor toolbar:

, where:

- Add element (Shift + Ctrl + Ins);

- Add sub-element (Ctrl + Ins);

- Delete element (Ctrl + Del);

- Move up (Ctrl + Up);

- Move down (Ctrl + Down);

- Move left (Ctrl + Left);

- Move right (Ctrl + Right);

- Preview (Ctrl + P).

The created definition of single menu can be attached to button located on the menu bar mask:

Fig. Association diagram for single menu definition and application menu mask.


3.5.7. Definitions of text parameters

Text parameters tab allows to define the text constants, which serve for:

  • definition of texts displayed by the visualization objects of TEXT class,

  • definition of texts used by ASTER language for report development (alias instruction),

  • definition of numeric values (entered as text) used by ASTEL language to handle the process data (alias functor),

  • definitions of control codes used for report formatting in the printer (ctrl instruction),

  • definitions of components of the operator's action set,

The text parameter definition involves the following fields:

  • Logical name of text parameter;

  • Text – the parameter can be defined with use of Multilingual text editor, launched with button [image];

Fig. Masks parameters window – 'Text parameters' tab.


3.5.8. Screen keyboard declaration

The screen keyboard mechanism (active in the application runtime mode) provides the operator with option to enter texts to editing fields of dialog boxes and editing fields of NUMBER and CAPTION objects by means of an appropriate screen keyboard. The mechanism is a support for applications operating on touch screen panels.

Keyboard is activated after clicking in the area of field or object.

Fig. Screen keyboard windows available in asix system.

Fig. Masks parameter window – Screen keyboard tab.

Screen keyboard tab contains the following parameters:

  • Enable screen keyboard – runs the screen keyboards mechanism, enabling (in the application runtime mode) the entering of texts to editing fields of dialog boxes and NUMBER and CAPTION objects;

Default value: screen keyboard mechanism is disabled.

  • Screen keyboard size – the parameter allows to determine the size of screen keyboard in pixels; Default value: keyboard window has width of 500 pixels;

  • Numeric keyboard size – the parameter allows to determine the size of numeric keyboard in pixels;

Default value: window has width of 300 pixels.


3.5.9. Parameters controlling the visualization object blinking period and parameters for

Misc tab includes the following parameters:

  • Blinking period – declaration of blinking period (in miliseconds); this parameter is set on one-time basis and impacts the operation of all objects using the blinking attribute;

Default value: 333 ms

  • No hidden controls – parameter allows to block the sending of controls from masks, which are at least partially hidden under another window;

Default value: by default, the controls from all masks open at the given moment are sent.

  • Controls validity time - parameter allowing to define a period, measured in seconds since the moment of the last control setting by the operator until the moment of deleting all active selections by the system. “0” means that the controls validity time measurement option is disabled; by default, this option is enabled.

Default value: 0 - once defined control setting is active until the mask is closed – unless it is earlier removed by the operator.

Fig. Masks parameter window – 'Misc' tab.


3.6.1. Standard parameters

Fig. Current data parameters window – Standard tab.

Parameters related to current data located on Standard tab include:

  • Simulation – If option Checking this option will cause that current data module Asmen will not be loaded is checked, Asmen works in data simulation mode.

Default value: by default, this option is disabled.

  • Overloads – this parameter allows to register the overload status during process variable refreshing in the operator panel;

Default value: by default, this option is enabled;

The above mentioned overloads pertain to variables – in case when the declared variable refreshing time exceeds the ability of the transmission channel. (Refreshing frequency is declared in the variable definition.)

  • Data / Names of files with process variables declarations

The field is available only, when the process variable definitions are loaded from text files, which was earlier declared in:

Databases module > Type tab > Variable definitions base type: Variable definitions base in an old format – text files


3.6.2. Advanced parameters

Tabs Advanced and Advanced 2 appear only if the following command was selected:

View > Show advanced options

Fig. Current data parameters window – 'Advanced' tab.

Fig. Current data parameters window – 'Advanced 2' tab.

Advanced tab allows to parameterize the following items:

  • OPC status – declaration of using statuses in OPC-compliant mode; this option must be enabled to ensure the proper operation of scripting module.

Default value: option enabled

  • Priority – declaration of Asmen threads priority:

  • 0 - THREAD_PRIORITY_NORMAL,

  • 1 - THREAD_PRIORITY_ABOVE_NORMAL,

  • 2 - THREAD_PRIORITY_HIGHEST.

Default value: 0

  • Number of attempts of access to a variable – declaration of the number of remote access attempts to the server variable; after this number of attempts, it is assumed that the variable was not declared on the given server;

Default value: 1

  • Number of users – allows to define maximal number of users utilizing Asmen API. This item is used in multi-port applications with MUZ driver;

Default value: 128

  • Initial refresh – if the option is declared, the current values of all process variables are read in stege of Asmen installation;

Default value: option enabled

  • Delay of server data – item used in the terminal; defines the time, after which the variable error status is set; time is calculated as variable refresh time (given in the variable definition) multiplied by this item’s value; the item is applied to all variables at one time; unit: second.

Default value: 1 second

  • Refresh period – declaration of the default process variable refresh cycle (in seconds), for variables, which do not have the appropriate refresh cycle value declared in their declaration;

Default value: 1 second

  • Table path – declaration of directory name, where the tables used by the TABLE conversion functions are located;

Default value: no declared path

  • Variable description - if the option is declared, the 'Description' field in definitions of process variables is used; the option is meaningful only when variable definition base in text file form is used

  • Asynchronous control - the declaration of using asynchronous mode for control in fast transmission channels

Default value: no declaration


3.6.3. Diagnostic parameters

Home > 3.6.3. Diagnostic parameters

3.6.3. Diagnostics parameters

Diagnostics tab appears only if the following command was selected:

View > Show advanced options

Diagnostics tab

Fig. Current data parameter window – 'Diagnostics' tab.

Diagnostics tab includes:

  • Log file - by default the option is set for new applications

  • Channel statistics – statement of the number of refreshed and overloaded variables in individual physical channels; the statement is fed to control panel every second;

Default value: option is enabled

  • Overload statistics – statement of the number of overloaded variables in physical channels; the statement is fed to control panel, when an overload occurs;

Default value: option is disabled

Diagnostiocs - trace tab

Fig. Current data parameter window – 'Diagnostics - trace' tab.

  • Tracing of variables - this option determines writing into log file information on values received from PLCs and other sources by the current data module


3.6.4. Definition of communication channels

Definitions of communication channels are added with use of Add channel command, available after right-clicking on Current data item. ‘Add channel’ window will appear, where the channel name and communication driver name should be defined.

Fig. Channel definition declaration window.

Select the driver name from the list of drivers available in asix package. To display the list, press Choose button in 'Add channel' window.

Fig. Communication driver selection window.

Having selected the specific driver, an item with the selected driver name will appear in Current data parameter group. Click this item to open driver parameterization tabs in the parameter window. The tabs are described below.

Standard tab includes standard parameters for channel declaration:

  • Channel/Name – defines the channel name;

  • Channel/Driver – defines the driver name;

  • Driver used in channel:

  • Use driver from channel definition;

  • Temporarily use NONE driver – option applied in case of lack of physical connection to the controller; NONE driver can be used for application testing purposes;

  • Temporarily use NETWORK driver – NETWORK driver is a specific type of driver; it does not establish a physical connection with controller, but only with another machine, which has such a connection; when connected, network channel driver requests all servers, given the channel logical name; only the servers with appropriate channel declared respond to such request; if more than one server responds, the least loaded server is used for connection establishing; if the server is turned off during operation, the network channel driver will switch to another server;

  • Alarm in channel (parameter available only for selected drivers)– declaration of alarm call in case of lack of transmission in logical channel; optionally, it is possible to give the alarm number in case, when transmission is switched to a redundant channel (if only any redundant channel was declared for the logical channel);

Default value: no declaration of basic and redundant channel

  • Time synchronization (parameter available only for selected drivers)– synchronization of the time is performed in the direction: from asix to PLC; more infotmation can be found in CommunicationDrivers.hlp - in the part concerning the specific configuration driver;

Default value: no declaration

Fig. View of communication driver parameterization window – 'Standard' tab.

Advanced tab includes the following declarations:

Advanced tab appears, when command View > Show advanced options in Architect module window menu is selected.

  • Remote write access - if this option is turned on, it will grant the authorization for remote controlling in the declared logical channel only for the specified machines; other machines will not be able to perform controls in this logical channel;

Default value: none machine is allowed to perform remote controls

  • Remote read limitation – if this option is turned on, it will grant the authorization for remote reading of process variables in the declared logical channel only for the specified machines; other machines will not be able to read variables from this logical channel;

Default value: by default, the remote reading is not limited;

  • Redundancy (parameter available only for selected drivers)– declaration of redundant channel for the logical channel. Optionally, the scope of search may be limited by means of declaration of the list of machine. Enter the redundant channel name in this field, type comma and follow it names of machine, which the search scope should be limited to.

Default value: by default, the redundant channel is searched on all network machines

Fig. View of communication driver parameterization window – 'Advanced' tab.

Advanced 2 tab includes the following declarations:

Advanced 2 tab appears, when command View > Show advanced options in Architect module window menu is selected.

  • Local write denied – blocking of local controls in logical channel;

Default value: no blocking of local controls

  • Data validity period - period (in seconds), when the process variable values remain valid in the logical channel, regardless of the declared refresh frequency; process variable values validity is determined on the basis of refresh cycle;

Default value: 0

Fig. View of communication driver parameterization window – 'Advanced 2' tab.

Tab with the declared driver name includes parameters appropriate for configuration of the communication channel for the given driver.

Full description of drivers utilized by asix system can be found in “ASMEN – communication drivers and protocols” manual (CommunicationDrivers.hlp or CommunicationDrivers.PDF).


3.7.1. Standard data

Standard tab covers the configuration of the following options:

  • Redundant channels – determines the server channel type, which will be accepted by the given remote computer as redundant channel, available types are:

  • ONLY PHYSICAL - only physical channel,

  • ONLY NETWORK - only network channel,

  • ALL - any type of channel;

Default value: ONLY PHYSICAL

  • Gateway mode – declares the workstation operation in GATEWAY mode.

In configurations, where asix workstation is a gateway between two local computer networks, the workstation network channels are considered as equal to physical channels in scope of data provision in local network. Corporate network terminals may join the gateway network channels.

Default value: GATEWAY mode is not declared

  • Server search - period

Default value: 1s

  • Server search - timeout - maximum waiting time for answer during servers search

Default value: 18s x 55ms

  • Data transmission - timeout - maximum waiting time for answer from server during data transmission

Default value: 10s

Fig. Current data parameters window – for network server – 'Standard' tab.


3.7.2. Advanced data

Advanced tab appears, when command View > Show advanced options from Architect module window menu is selected.

Advanced tab

  • UTC time – requests, that variable values should be marked with UTC time.

Default value: option disabled

  • Closing client connections – it closes client connection in case of no connection with the PLC in the physical channel; the option should not be used if there is only one data server in the network that has connection with the PLC; the option is meaningful only for channels that support Alarm in channel option.

Default value: option enabled

  • Channels excluded from gateway – the list of network channels separated with commas, where the local network clients WILL NOT be able to connect to;

Fig. Current data parameter window for network server – 'Advanced' tab.

Advanced 2 tab

  • Refresh limit – determines the time interval (in seconds) for sending the process variables values belonging to channel defined in Channel field from the data server to the workstation. It is recommended to use this option for communication on slow links.

Default value: process variable values are sent with interval compliant to the process variable declaration on the data server.

  • Priority – declaration of NETSRV threads priority:

0 - THREAD_PRIORITY_NORMAL,

1 - THREAD_PRIORITY_ABOVE_NORMAL,

2 - THREAD_PRIORITY_HIGHEST.

Default value: 0

  • Connection thread – declaration of separate thread for network connections;

Default value: option enabled

Fig. Current data parameter window for network server – 'Advanced 2' tab.


3.7.3. Diagnostic parameters

Diagnostics tab appears, when command View > Show advanced options from Architect module window menu is selected.

Diagnostics tab

  • Log file – declaration of log file name with NETSERV diagnostic messages;

- Name – Default value: log file is not created

- Maximal size – default value: 1 MB; when the declared size is exceeded, the previous contents of the file are deleted

Detailed information on data exchange through the local network can be found in "Asix – user manual” in chapter ASMEN communication manager, Data exchange through local computer network.

  • Log of telegrams from Aslink – declaration of saving messages received from Aslink to log file declared in the above mentioned Log file option;

Default value: option is disabled

Fig. Current data parameters window – for network server – 'Diagnostics' tab.


3.8.1. Standard data

Standard tab allows to determine the following basic archiving parameters:

  • Simulation – check this option to skip Aspad loading;

Default value: Aspad is loaded

  • Find server repeat period – determines, after what time the system should reattempt to seek server for Aspad resources, if the previous attempts failed;

Default value: 60 seconds.

If a too short period is determined, the network will by overloaded by the operation of seeking for non-existent server. Too big value will result that after the server is toggled on, it will remain unnoticed for long time.

  • Conditions – allows to define the files containing the conditions to be used for conditional archiving.

Detailed description of conditional archiving is contained in “Asix – user manual” in chapter 7.7.1. Declaration of archiving conditions.

Fig. Historical data parameters window – 'Standard' tab.

Examples of archiving conditions:

Make archive, when bits 4. or 8. of variable AAA changed status:

WARUNEK, BNE, @AAA, $@AAA, 0x110

Make archive, when bit 0. of the archived variable changes status from 0 to 1:

WARUNEK, BGT, @, $@, 0x1

Make archive, when the value of archived variable is outside of its range (20,80) and on of bits of the bits 0-3 of variable WWW is activated:

W1, IN, @, <<, 20, 80, >>

W2, BAND, @WWW, 0xF

WARUNEK, AND, ?W1, ?W2

Make archive, when value of archived variable exceeds the limit of 100:

W3, GT, @, 100

WARUNEK, AND, ?W3, !$?W3


3.8.2. Declaration of server response waiting time

Server profile tab appears after selecting command View / Show advanced options from Architect module window menu.

Server search tab includes the following parameters:

  • Time for server profile – determines, how long the system should wait for server response after the initiation of search:

  • Minimal time – defines how long the system should wait, regardless of the fact how many servers had already responded.

  • Maximal time – determines the time, after which – when no server response is received – it should be assumed, that the server for the given resource was not installed in the network.

  • Repeat cycle – optional parameter for cycle, where the server search should be repeated if no response for previous queries was received.

Default value: respectively, 2 s, 10 s, 1 s

Too small Minimal time parameter will cause that the first responding server will be connected, which does not allow to apply the server load balancing criteria.

Too big Minimal time parameter will prolong the waiting for server connection.

Too small Maximal time may prevent from connecting to existing servers.

Too big Maximal time prolongs the waiting for resolution, that there is no appropriate server in the network.

Fig. Archival data parameter window – Server Profile tab.


3.8.3. Data merge period

Merging tab allows to set default minimum period for data merge (in days).

Fig. Data merge period tab.


3.8.3. Diagnostic parameters

Home > 3.8.3. Diagnostic parameters

3.8.4. Diagnostic parameters

Diagnostics and Diagnostics - trace tab appear after selecting command View / Show advanced options from Architect module window menu.

Diagnostics tab defines:

  • Log file name – file, where ASPAD will record diagnostic information;

Default value: log file aspad.log is created by default.

  • Diagnostic settings – allows to determine, what type of diagnostic information will be recorded in the log file.

Default value: Historical data merging diagnostics

Fig. Archival data parameters window – 'Diagnostics' tab.

Diagnostics - trace tab defines:

  • Tracing of sampled values – it allows (for selected variables) to write into the log file all the information on values that ASPAD received form the source;

Default value: no declared items

In the current version, it is possible to use this mechanism only for tracking of floating point variables.

Fig. Archival data parameters window – 'Diagnostics' tab.


3.8.5. Archive parameterization

Home > 3.8.5. Archive parameterization

3.8.6. Archive parameterization

In case of archiving the variable values, it is necessary to declare the archive.

Archive is declared with use of Add archive… after right-clicking on Historical data item. ‘Addition of a new archive’ window will be displayed, allowing to define the archive name.

Fig. Opening the 'Addition of a new archive’ window.

The basic archive type is STANDARD. The archive is saved in binary files on the disk.

The second archive type is AS BDE and MS SQL. This is an archive saved in database of – respectively - Paradox and SQL type.

Aspad collects data in files containing the records from one day, month or year period, respectively, to archive types:

Archive of D type (day) - data gathered in daily files;

Archive of M type (month) - data gathered in monthly files;

Archive of Y type (year) - data gathered in annual files;

Archive of H type (horizon) - data gathered in one file;

Archive of B type (database) - data gathered in typical databases;

Archive of P type (pattern) - pattern data;

It is also possible to divde the archives according to the data provisioning method:

Write archive - basic archive allowing to write and read data from archival files;

Read archive - archive only allows to read data from archival files;

Network archive - archive allows to read data from another computer through the network;

Slave archive - archive allowing to write and read data, used as redundant copy of a basic archive on another machine.

Slave archive is a writable archive located on the slave server of the given resource. Slave archive should be a redundant copy of a master archive on basic server. The difference between the slave archive and master archive consists in preferences for the master archive during connection of network clients. Client will connect to the slave archive only if no master archive can be found in the network.

Slave archive is use to provide a temporary redundant copy for the time of master server maintenance or failure. It is possible e.g. to declare the master archive with 100-day horizon and the slave archive with 10-day horizon. This will allow to fill the master archive for the downtime of max. 10 days, while during the presence of the master server, the clients will connect to it, thus allowing the use of 100-day horizon data.

To configure archive with use of Architect module, in the application parameter tree highlight the Historical data item and right-click - and then select Add archive command.

Click in the created archive to display the tabs for archive configuration in the parameter configuration window.


3.8.5. Historical data merging parameters

Home > 3.8.5. Historical data merging parameters

3.8.5. Acquisition of historical data

Acquisition of historical data tab includes:

  • Time of first acquisition – this option determines, after what time since the start of the current archiving, the first gap filling should be commenced;

Default value: 10 seconds

The data merging process requires an information on the length of gap in the archive resulting from the last archiving shutdown; to gather this information, it is necessary to find the first point after the gap; time determined in this item should allow to obtain the first datum for each variable.

  • Cycle length and Cycle phase – these are parameters determining the frequency of archive gap filling attempts – e.g. 5m, 30s means that 30 seconds after each full 5 minutes, the archive gap filling will be attempted;

Default value: for cycle length of 1 hour and for cycle phase of 5 minutes, the archive filling will take place 5 minutes after each full hour; cycle length is measured according to UTC time.

  • Gap filling horizon – an additional, optional parameter allowing to determine, how far the historical data filling attempt should reach backwards; the horizon does not depend on the fact, whether the filling attempt was already performed; the option is required for data sources, where historical data may emerge with some delay; if no such parameter is given - the lack of historical data in the data source causes that the restoration attempts are given up.

Default value: none

Fig. Archival data parameter window – 'Acquisition of historical' data tab.


3.8.7. Archive management

The 'Archive management' window is activated by the Manage Archives command from the local menu displayed after clicking the right mouse button on the Historical data [image] item. It allows to delete, copy to computer/field and change type of archive.

Fig. 'Archive management' window.


3.9.1. Determining the alarms definitions base creation mode

Alarm definitions in asix system can be generated in text files prepared by the designer or generated from spreadsheet.

Alarm definition base mode is declared in:

Databases module > Alarm definition base > Type tab

There is the possibility to add alarm definition base to Variable Definition Base. You have to set the Alarm definition base is generated from a spreadsheet/ Add alarm definitions base to variable definition base option on Type tab, and then go to Data sources tab and select Field/Fomputer that will identify the name of alarm server in the network for alarm definitions declared on Data sources tab.

Fig. Alarm definition base window – 'Type' tab.

Fig. Alarm definition base window – 'Data sources' tab.


3.9.2. Activating the alarms system work mode

Alarms/System type tab enables the configuration of the following parameters:

  • Locking the alarms system initiation – item allowing to lock the alarms system initiation;

Default value: alarms system is active

  • Work mode of alarms system – determines the alarms system work mode:

  • Operator mode – is the basic work mode of the alarms system, where all active alarms handling mechanisms (detection, acknowledgement, etc.) are enabled and the operation of network-connected stations is possible.

Operator stations collaborate only, when they have same alarms set name give. Alarms set is identified by 8-character name.

It is important that the system designer shall guarantee the compliance of all elements comprising the set. In case of alarms and alarms group definition files, the compliance of file names is sufficient (program automatically transfers the file contents, if any incompliance is found; the file writing time is checked). The alarms detection strategy parameters must be unconditionally compliant. This is due to the fact that only one machine within working operator stations group actively detects alarms and transfers it to other machines. As it is not determined, which station is active, all stations must be able to undertake the detection of all alarms.

  • Historical viewer mode – allows only for passive browsing of alarms collected from operator stations.

  • Local mode – is functionally identical to the operator mode except of lack of network services.

  • Historical server mode – from the operator’s point of view, it is identical to historical viewer mode. Additionally, an automatic updating of alarms archive from all detected operator stations is performed. The collected archives may be provided for other machines operating in historical viewer mode.

Default value: ‘Operator mode’, if the Network name of alarms set is declared; in other case, the default value is ‘Local mode’ operation.

Alarms/Network name tab enables the configuration of the following parameters:

  • Network name of alarms set – definition of the network name of alarms set supported by AS program. Name can have max. 8 characters. The set of available characters is the same as for file names. Network name is important for stations working in operator mode. Stations of the same name conduct a common, integrated alarm handling. Network name is also used on passive stations for identification of the alarm origination source.

Default value: no network name. Program can only work in (passive) historical viewer mode or local mode.

  • Dynamic resource name

Fig. Alarms system parameters window – 'Alarms/System type' tab.

Fig. Alarms system parameters window – 'Alarms/Network name' tab.


3.9.3. Declaring the alarms definitions files and alarms groups definitions files

Ability to declare files, which can be accessed for alarms definitions and alarm groups definitions is possible only, when Database module contains the declaration of database work mode with files:

Databases module > Alarm definition base > Work mode of alarms definitions base: Text files with alarms definitions are edited only by the developer

Alarm base tab

  • Names of files, where alarms are defined – the parameter allows to declare names of file, where alarms were defined; the names should be separated with commas;

Default value: alarms definitions will be read from ‘alarm.def’ file from the current application directory

Alarm base - groups tab

  • Names of files, where alarm groups are defined – the parameter allows to declare the names of files, where alarm groups were defined; the names should be separated with commas;

Default value: none

Fig. Alarms system parameters window – file settings1.

Fig. Alarms system parameters window – file settings2.


3.9.4. Parameterizing the alarms archive

Archive/ Hard Disc tab pertains to the following parameters:

  • Store alarms to disk files – item allows to block saving of alarms to disk files;

Default value: by default, alarms are stored in the disk files;

Lack of alarms stored to disk files option causes, that only the alarms kept in the computer's operating memory are available (by standard, 1000 items). Furthermore, the alarm history is lost when the machine is restarted.

  • Alarms archive directory – item used to determine directory, where the alarm log files will be saved;

Default value: by default, the files are created in subdirectory ‘Alarms’ in the application’s start directory;

  • Limitation of alarm files storage – item determines, for how many days the alarm files will be kept;

Default value: by default, the files are kept for indefinite period;

Indefinite storage of files will result in filling of the disk, i.e. the need of periodical deletion of old files. Additionally, big number of alarm files can slow down the alarm browsing function operation (especially with use of selection criteria).

  • Alarms archive backup directory – this item, when checked, toggles on the historical alarm log backup mechanism; AS program keeps the copies of log files in the give directory; updating is performed every hour; backup directory should (optimally) be located on other physical disk than the working log directory; it is also possible to use the portable disk drives;

Default value: by default, backup is not performed.

Historical log files stored in backup directory are not subject to the limitation imposed by item Limitation of alarm files storage.

These files are kept for an indefinite period.

  • Accuracy of time measure in alarm archive – setting the accuracy of time recording in alarm archives; alarm times can be kept with resolution of miliseconds or with system clock resolution (ca. 55 ms); usage of milisecond resolution additionally changes the time display format on the alarm masks; the use of this item is important, if non-standard alarm recognition strategies are applied, which mark the alarms with times of milisecond accuracy;

Default value: standard strategies operate with accuracy of 55 ms.

Changing the Accuracy of time measure in alarm archive requires the deletion of the old archive (for all connected stations at the same time).

Fig. Alarms system parameter window – 'Archive/Hard disc' tab.

Archive/ Microsoft SQL Server - the alarms can be stored in any number of databases on MS SQL server (archiving on the SQL server is performed independently of the archiving defined on the Hard disk tab). Alarms have to be stored in MS SQL database when you use the AsAlarm program.

Fig. Alarms system parameter window – 'Archive/Microsoft SQL Server' tab.

Archive/ Operating memory tab pertains to the following parameters:

  • Number of alarm events of the historical log stored in memory – the item defines the number of alarm events of the historical log, which are stored in memory; usage of this item may improve the access times for historical alarms; if operation without disk file log is selected, this item determines the total number of kept alarms;

Default value: by default, the number of alarms kept in memory is 1000.

Fig. Alarms system parameter window – 'Archive/Operating memory' tab.


3.9.5. Definition of alarms strategy

Except for alarms definition, it is also necessary to determine the alarm detection method. Strategies tab allows to declare one of the five alarm detection strategies available in asix system:

  • Bitmap strategy – consists in checking the status of bits in alarm bitmap created by the process controller software, this requires to declare Asmen data used for reading the alarm bitmap contents; number of alarms in the bitmap is derived from Asmen data size; if fewer bits are used, their number can be limited by means of third parameter Alarm count; the period of bitmap status check results from refresh time given in Asmen data definition;

Default value: by default, the strategy is not used

  • Limit strategy – the item causes, that the alarm recognition strategy based on limit excess sampling is installed; sampling period determines the cycle of limit sampling in seconds (default is 1 second); file list gives the names of files (separated with commas), where the limit descriptions were located; lack of list means that limits.def file from the current application directory will be used;

Default value: by default, the strategy is not used

  • Buffer strategy – enables the parameterization of buffer strategy in AS program by declaration of one or several items of the following syntax:

<buffer_variable>,<synchronizing_variable>,<alarms_variable>,<alarm_number>,

where:

<buffer_variable> - name of Asmen variable used for alarm information exchange; its size must be equal to controller buffer size;

<synchronizing_variable> - name of Asmen variable used for synchronization of buffer access;

<alarms_variable> - name of Asmen variable used by PC to issue the alarm bitmap read request;

<alarm_number> - determines the alarm number within asix system, assigned to the first alarm detected by the declared strategy.

Default value: by default, the strategy is not used

  • Active strategy (SINEC L2) – to use this strategy, it is required to apply a transmission protocol allowing for initiating transmission from the controller side and the special controller program sending the data according to the protocol adopted in the active strategy; the strategy requires the declaration of one or more items of the following syntax:

buffer,synchro,alarm_number,id

where:

buffer - name of variable used for data exchange,

synchro - name of synchronizing variable,

alarm_number - number of the first alarm handled by this strategy element,

id - identifier (of SINECL2 network, currently 1(SSNR =0) or 2 (SSNR =8)).

Default value: by default, the strategy is not used

To use this strategy, it is required to apply a transmission protocol allowing for initiating transmission from the controller side and the special controller program sending the data according to the protocol adopted in the active strategy.

  • OPC alarms server strategy – allows to declare the alarm recognition strategy, according to which the driver is located in external dll file; to declare the OPC alarm driver, the line of the following syntax must be used:

ALOPC.dll, , <server>, <file_al_opc>

where:

<server> - is the name of OPC alarm server;

<file_al_opc> - is the name of file with OPC conditions translation into asix system alarm.

Fig. Alarm system parameters window – 'Strategies/Bitmap' tab.


3.9.6. Definition of alarm format

The tab group Look is used to define the alarm displaying method:

  • Background color – determines:

  • Alarm table background,

  • Alternative alarm table background,

  • Separating lines;

Fig. Alarm system parameters window – 'Look / Background color' tab.

  • Alarm text color – depending on the alarm type, allows to define text color and background color for:

  • System alarm,

  • Message,

  • Warning,

  • Alarm,

  • Important alarm.

Fig. Alarm system parameters window – 'Look / Alarm text color tab.

  • Alarm date color – depending on the alarm status, allows to define the date text color and date background color for:

  • Beginning of alarm,

  • Beginning of acknowledged alarm,

  • End of alarm,

  • End of acknowledged alarm.

Fig. Alarm system parameters window – 'Look / Alarm date color' tab.

  • Selected alarms – allows to declare the background color for selected alarms;

Fig. Alarm system parameters window – 'Look /Selected alarms' tab.

  • Red Mode masks – defines the text color and background color for ‘Red Mode' masks;

Fig. Alarm system parameters window – 'Look / Red Mode masks' tab.

  • Options – allows to define additionally:

  • Use of 4-digit format of year number in dates on alarm masks and printouts;

  • Sort alarms on the list of current and historical alarms;

Fig. Alarm system parameters window – 'Look / Options' tab.


3.9.7. Parameterization of alarm signaling

Home > 3.9.7. Parameterization of alarm signaling

3.9.7. Parameterization of alarm signalling

Signalling tab is used to parameterize the sounds, action that will be executed at the moment of alarm detection and to switch on the interface between AsAlert and the asix system application.

Sounds tab:

  • Sound signalling of alarm detection – allows to determine the method of sound signaling for alarm detection:

  • ‘ENABLED’ – means that alarms are always signaled;

  • ‘DISABLED’ – means that alarm signaling is disabled;

  • ‘MASTER’ – pertains to network installation; the given station generates sound signals only if it is the active side in the network;

Default value: ‘ENABLED’

The installation of sound card is required.

  • Alarm signal – name of WAV file - declaration of WAV files, which should be played at detection of alarm event of the given type;

Default value: by default, simple standard signals are generated;

  • Warning signal – name of WAV file - declaration of WAV files, which should be played at detection of alarm event of the given type;

Default value: by default, simple standard signals are generated;

  • Important signal – name of WAV file – declaration of WAV files, which should be played at detection of alarm event of the given type;

Default value: by default, simple standard signals are generated;

  • Long alarm – enabling the permanent playing of the signal after alarm detection. Signal will be disabled only when action SILENCE_SIGNAL is executed;

Default value: option disabled

Sound signals will be disabled due to use of Silence option, defined in Start parameters, on Control Panel tab.

Fig. Alarm system parameters - 'Signalling / Sounds' tab.

Action tab:

  • Action that shall be executed at the moment of alarm detection

Default value: none

It is impossible to differentiate action types for different alarm numbers.

Fig. Alarm system parameters - 'Signalling / Action' tab.

Alerts tab:

  • AsAlert - it option allows to swtich on the interface between AsAlert and the asix system application; the Edit command runs the configurator of that interface.

Default value: none

Fig. Alarm system parameters - 'Signalling / Alerts' tab.


3.9.8. Declaration of alarm handling authorizations

Security tab enables:

  • to declare password level, which needs to be give to allow specific operations:

  • authorization level required to perform the operation of change of filtered alarms,

  • authorization level required to perform the operation of change of alarms signaled with sound,

  • authorization level required to perform the operation of change of excluded alarms.

Default value: no control

The method of declaration of the login mode is discussed in chapter 3.11. Application security configuration.

  • Additionally, if option Lock of alarms handling by the operator is used, the operations of change of filters, exclusions and acknowledgement are blocked. It will be only possible to browse alarms;

Default value: handling is not blocked

Fig. Alarm system parameter window – 'Security' tab.


3.9.9. Declaration of buzzers map and exclude map

Maps tab allows to declare:

  • buzzers map; it is a declaration of bitmap areas used for parameterization of sound signaling executed by the controller, according to the following syntax:

data_name, number_of_the_first[,alarm count]

where:

data_name - gives the symbolic name of Asmen process variable, where the controller stores bit information on alarm signals (value 1 for the given alarm means that it generates buzzer or ring, depending on the map type);

number_of_the_first - it defines the number assigned to the first alarm in the map; number of alarms in the map results from Asmen data size; if fewer bits are used, their number can be limited with use of the third parameter;

Default value: by default, the signal maps are not handled;

Fig. Alarm system parameters window – 'Maps / Buzzers' tab.

  • bells map; is declared in the same way that buzzers map.

Fig. Alarm system parameters window – 'Maps / Bells' tab.

  • exclude map; is the declaration of bitmap, which controls the exclusion of alarms executed by the controller, according to the following syntax:

data_name, number_of_the_first[,alarm count]

where:

data_name - gives the symbolic name of Asmen variable, where the controller stores bit information on excluded alarms (value 1 for the given alarm means that the alarm is excluded);

number_of_the_first - it defines the number assigned to the first alarm in the map; number of alarms in the map results from Asmen data size; if fewer bits are used, their number can be limited with use of the third parameter;

Default value: by default, the exclusions are performed only internally in the machine.

Use of this item results in disabling of the internal exclusion and filter control mechanism.

Fig. Alarm system parameters window – 'Maps / Exclude' tab.


3.10.1. Computer name

Computer name tab allows to specify:

  • Automatic setting of network names of computers;

  • Network name of computer: default Windows name with dot at the end of name, custom name or '*' value used when the application is running under the Windows Server Terminal Services.

Fig. Network module parameters - 'Computer name' tab.


3.10.2. TCP/IP communication

TCP/IP communication allows to declare the following parameters:

  • Connections using TCP/IP protocol - you should enter here the names of Windows system or IP address of all the computers to which the network module should connect; names should be separated by commas;

  • TCP/IP port no

  • Don't use TCP/IP

Fig. Network module parameters - 'TCP/IP communication' tab.


3.10.3. NetBIOS communication

NetBIOS communication includes the following parameters:

Network protocols tab:

  • Used network cards and protocols:

  • All network cards and TCP/IP protocol;

  • Selected network cards and protocols.

Default value: All network cards and TCP/IP protocol

  • Network cards and protocols used by network module to search for servers:

  • All network cards and TCP/IP protocol;

  • Selected network cards and protocols.

Default value: All network cards and TCP/IP protocol

  • Don't use NetBIOS communication

Fig. Network module parameters - 'NetBIOS communication / Network protocols' tab.

Advanced tab:

Advanced tab appears after selecting command View / Show advanced options from Architect module window menu.

  • Group name – defines the name of group, where the station belongs to;

Default value: default name is: ‘ASIX’

Allowed values: text of max. 15 characters. Character size matters. Name cannot include character „*”.

  • Session connections – the parameter value is the list of remote station names, with which the connections will be established. Specific names are separated with commas. If the configuration file of the remote station does not include the station name definition, the station name defined in the network settings of the operating system should be given.

Default value: none

  1. Connections with stations from outside of the list will not be established.

  2. Parameter can be used in ASLINK module in version 5.4.0 or newer.

  3. If the parameter is set, datagrams will not be handled and on adapters, where the session connections will be established, time will not be synchronized.

  4. Session connections will be established on adapters specified by Network protocols parameter.

  5. Usage of this parameter will result in lack of communication with ASLINK modules in version 4.

  • Aslink4 – enables communication with stations controlled by network module in version earlier than 5.00.000; toggle this option on to increase the network load, even if the network does not include stations operating under control of the older network module versions;

Default value: option is disabled

  • Aslink domain / Enable communication of stations located in different networks connected via router – give value Yes, if the connections between stations located in different networks connected via router should be executed. (Only for NetBIOS over TCP/IP protocol – NetBt).

Default value: option is disabled

Fig. Network module parameters - 'NetBIOS communication / Advanced' tab.

Time synchronization tab:

Time synchronization tab appears after selecting command View / Show advanced options from Architect module window menu.

Client

  • Time synchronization and Time synchronization limitation – items allows to declare lack of time synchronization or force the synchronization with selected time servers;

Default value: time is synchronized with all available time servers

  • Synchronization conditions allow to determine:

  • Maximal time difference - difference between server time and time of local station, which, if exceeded, will cause the synchronization of local time (CMOS); value in seconds;

Default value: 4 seconds

  • Time packets count - number of successive time packets, which station has to receive from single server to synchronize its clock;

Default value: 3

  • Ignored time packets - number of time packets, that are omitted after each running of network module on each adapter;

Default value: 2

  • Long time difference determines:

difference (time in miliseconds) between time server time and local station time, which, if exceeded, will result in special treatment of received time packets, consisting in delayed synchronization of local station time;

Default value: 3600 miliseconds

number of packets (counter), which, if received, force the time synchronization;

Default value: 2

  • Time packets replication – toggling this option on causes that the all time packets received from the given adapter will be sent to other adapters; additionally it is possible to determine the number of allowed time packets.

Default value: time replication is toggled off

  • Time change limit – maximal single time change

Default value: 0 m

Fig. Network module parameters - 'NetBIOS communication / Time synchronization / Client' tab.

Server

  • Time server – defines, whether the station will operate as time server (i.e. whether it will broadcast the current time data in the network):

The station never acts as time server,

The station always acts as time server – even if the higher priority time server is active in the network,

The station acts as time server only if it has the highest priority;

Default value: the station acts as time server only if it has the highest priority

  • Server priority – defines the station priority as time server; the bigger the value, the higher the priority (0 – 32,768). Priority value is given together with current time in synchronization packets (BROADCAST). If a time server active at the given moment receives a packet with higher priority, it ceases to be the active time server.

Default value: 0

  • Time interval of broadcast of packets containing the current time – determines the time interval (in seconds), with which the packets with current station time will be broadcastet to the network.

Default value: 0

  • Maximal time interval of broadcast of packets containing the current time – value in seconds

Default value: 60 seconds

  • Condition for time server activation – station will become the time server, where the existing time server will not provide the user-defined number of subsequent synchronization packets;

Default value: 5

  • Time packets replication – determines the number of allowed time packet replications; maximum number of subsequent stations, which may be included in the time packet route. The parameter is valid only on the station being the time server.

Default value: 2

Fig. Network module parameters - 'NetBIOS communication / Time synchronization / Server' tab.

Diagnostics - AslView tab:

Diagnostics - AslView tab appears after selecting command View / Show advanced options from Architect module window menu.

Diagnostics – AslView tab pertains to configuration of diagnostic information passed to AslView programs connected to the network module:

  • History – defines:

Maximal number of records in history of network module connections;

Default value: 0;

Maximal number of record in history of time changes;

Default value: 50;

Maximal number of records in history of client/server connections;

Default value: 300;

  • Changes lock - parameter defines the authorizations related to change of parameters from the level of AslView program:

Enable change of parameters from AslView application;

Disable change of parameters from AslView application;

Block with password change of parameters from AslView application;

Password - parameter defines the password to be entered by AslView application user, who wishes to perform actions resulting in significant changes in network module operation.

Default value: it is not allowed to change parameters from the level of AslView application.

Parameter Log-in validity period defined in Security module is binding here

Fig. Network module parameters - 'NetBIOS communication / Diagnostics - AslView' tab.


3.10.4. Advanced parameters

Advanced tab appears after selecting command View / Show advanced options from Architect module window menu.

  • Network names of computers filtering – defining the text filter, which shall govern the remote station namesl stations with names incompliant with the filter will not be visible; name can include characters ? and * (only at the end); to give names of several stations, separate them with commas;

Default value: none (all stations are visible)

  • Send timeout – maximum duration of sending operation; a unit is a time of 500ms;

Default value: 30 (15 seconds)

  • Receive timeout – maximum duration of receiving operation; a unit is a time of 500ms;

Default value: 30 (15 seconds)

  • Keep alive – time after which the pasket checking the connection state in the local network will be posted;

Default value: 5 seconds

  • Keep alive WAN – time after which the packet checking the connection state in the wide area network will be posted;

Default value: 60 seconds

  • Local links / Enable connections between clients and servers located on the same station – it is possible to establish connections between clients and servers located on the same station without use of the network software.

Default value: option is enabled

Fig. Network module parameters - 'Advansed' tab


3.10.5. Diagnostic parameters

Diagnostic tab appears after selecting command View / Show advanced options from Architect module window menu.

Fig. Network module parameters window – Diagnostics tab.

Diagnostics tab includes parameters controlling the diagnostic information fed by Aslink module:

  • Log file – defines the name of file, where the diagnostic information and maximum file size (KB) will be stored;

Default value: file named ‘aslink.log’ of maximum size of : 500,000 KB

  • Store information about… – allows to declare the type of information to be stored in the log file; it is possible to declare storing of information about:

  • Received packets,

  • Sent packets,

  • CALLBACK calls,

  • API function calls,

  • Data from organizational packets,

  • Data packets,

  • Data from data packets,

  • Broadcasted time packets,

  • NetBios NBC operations

Default value: no information type is declared

  • Data size – defines the maximum length of the data part of network packets, which will be stored in log file;

Default value: 10 B.


3.11.1. Activating the dynamic security mechanism. Definition of level password mode

Policies tab allows to define the following parameters:

  • System policies – allows to activate the dynamic system security mechanism; w hen the application user system is active – the dynamic policies are switched on only when an operator with administrator privileges is logged in; if the level password system is active – dynamic policies are toggled on only when the level 4 password is active;

Default value: system policies are disabled

  • Work mode of policies system:

  • User mode.

  • Level passwords mode;

Default value: ‘User mode’

Fig. Security parameters - 'Policies' tab.


3.11.2. Parameterization of login system

User mode tab – active only then the policies system work mode is set to User mode, allows to define:

  • Default user id – the user is automatically logged in (without request for password) during the asix system application start-up;

Default value: no declared default user

  • Login validity period – determines the login validity period; after the expiry of the defined time, user is logged of or the system switches to the default user;

Default value: 0, i.e. login validity time is indefinite – until the application is switched off

  • List of defined users – allows to create application users items including: user id, name, password and authorization level;

Default value: there is no list of defined users, i.e. it is impossible to log into asix and to perform operations protected by a specific security level

User declarations are kept in external ‘Users.ini’ file, located in the application root directory.

Fig. Security parameters - 'Users mode' tab.


3.11.3. Parameterization of level passwords system

Level passwords mode tab- active if the policies system work mode is set to Level passwords mode, allows to define:

  • Log-in vailidity period – determines the time (in minutes), for which the set password remains valid;

Default value: 15 minutes

  • List of defined level passwords – includes items, where the passwords for specific levels are saved.

Default value: passwords are not defined, which means lack of control on the given level (if the level passwords mode was declared)

Level passwords are stored in external ‘Passwords.ini’ file, located in the application’s root directory.

Fig. Security parameters - 'Users mode' tab.


3.11.4. Parameterization of locks

Locks tab allows to lock the selected elements related to application handling:

  • Change lock – enables blocking all commands, which may result in change of application status in a manner unplanned by the designer: locking the Designer module, locking reports editing, locking trend editing and locking the ability to open masks from the level of control panel with use of MASKS.OPEN command;

Default value: by default, the lock is disabled

  • Exit lock includes the following variants:

  • Allow users to close the application;

  • Don’t allow users to close the application;

  • Secure closing the application – with a password or authorization level:

  • Password or authorization level – if User mode is applied, and application access is locked with a password, parameter Login validity time defined on User mode tab becomes valid;

Default value: by default, the exit command is available without any limitations

Lock pertains only to exiting through closing of Designer window or Control Panel. An alternative exit method is also available - with use of operator action END.

  • Designer lock includes the following variants:

  • Allow users to switch to designer mode;

  • Don’t allow users to switch to designer mode;

  • Secure switching to designer mode – with password of authorization level:

  • Password or authorization level – if User mode is applied, and access to designer mode is locked with a password, parameter Login validity time defined on User mode tab becomes valid;

Default value: by default, designer mode is available without any limitations

  • Control lock – allows to block the execution of control operations in the application; it is used on remote stations;

Default value: by default, the controls are not locked

Using the control lock does not interfere with operation of CALCULATOR class objects; even though they are performing controls.

Fig. Security parameters - 'Locks' tab.


3.12.1. Declaration of printing permission. Declaration of color changes performed during masks

Printing tab allows to declare the use of printer and to define the color changes executed during dumps of masks or screen:

  • Printing permission – item deciding whether the program will execute printouts; all printers available in the system are accessible; if some operation does not allow for individual printer selection, the default system printer is used;

Default value: by default, the printouts are executed;

  • Color change – item allows to define the color changes executed during performing dumps of masks or screens;

how to record the color change method:

r, g, b, zr, zg, zb, e.g.: 0,0,0,255,255,255 changes black into white,

parameters r, g, b (decimal numbers determining RGB components) define the color, which should be changed on the printout to color zr, zg, zb.

Default value: no declaration

Fig. Printout parameter window – Printing tab.


3.12.2. Declaration of screen printout

Screen printout tab allows to determine the following parameters:

  • Automatic dump:

  • Ask before execution of screen dump;

  • Don’t ask before execution of screen dump;

  • Don’t ask before execution of screen dump and don’t show message after it is done;

Default value: by default, prior to each screen dump, a dialog box is opened used to determine the screen dump parameters

  • Dump parameters – item determining the screen dump parameters:

  • Dump lock – locking the screen dump;

  • Window – check this option to dump the active window;

  • Screen – check this option to dump the entire screen;

  • BMP file – check this option to dump to BMP file;

  • Printer – check this option to print in the selected printer format;

Default value: by default, the entire screen is dumped to BMP file format;

Determined parameters may be modified by the operator, unless Automatic dump option is used.

  • Screen dump direcotry

Fig. Printout parameters - 'Screen printout' tab.


3.12.3. Declaration of font parameters and header and footer parameters

Printout tab defines the following parameters:

  • Headers and footers tab:

  • Application name – text displayed in the header and footer line of the created printouts;

  • Header – determines the header text for all types of printouts (except on-line alarms – for which the header text is defined on Alarms printing tab);

Default value: if the user does not declare its own header text, by default, the text defined by control character: &w | | ASIX will be used.

  • Footer – defines the footer text for all types of printouts (except on-line alarms – for which the footer text is defined in Alarms listing footer on Alarms printing tab);

Default value: footer is defined with control characters &D &T|&p|&c ; control characters described in Header item are also allowed.

  • Margins – allows to set margins for printouts, the item pertains to all printers and most printouts (except for trends printout and printouts made in text mode); margin unit is 1/10 mm;

Default value: all margins equal 0;

Fig. Printout parameter window – 'Printout / Headers and footers' tab.

Fonts tab includes the font definitions used in the created printouts (mask dumps):

  • Font – definition of font for text information printing; value given in tenth parts of millimeter; value 0 is automatic scaling to page width;

Default value: Courier New,0;

  • Header font – definition of font for header printing; height given in tenth parts of millimeter; value 0 is automatic scaling to page width;

Default value: Times New Roman,30;

  • Footer font – definition of font for footer printing; height given in tenth parts of millimeter; value 0 is automatic scaling to page width;

Default value: Times New Roman,30.

Set of available control characters used in header and footer declaration is presented in Appendix 4.

Fig. Printout parameter window – 'Printout / Fonts' tab.


3.12.4. Declaration of report printing

Report printing tab allows to declare:

  • Report header – defines the header text to be added to the report printout;

Default value: by default, the text defined in item Header in Printout tab is used.

  • Report footer – defines the footer text to be added to the report printout;

Default value: by default, the text defined in item Footer in Printout tab is used.

  • Settings / Reports in text mode – as a standard, reports are performed in graphical mode. If the option is used, the font controlling sequences placed in the report contents and used in earlier reports cease to function. Enabling the text mode results in printing reports in a manner compatible with AS program version earlier than 2.59;

Default value: printout in graphical mode

Set of available control characters used in header and footer declaration is presented in Appendix 4.


3.12.5. Declaration of alarms printing

Alarms printing tab contains parameters defining the format for historical and active alarms printing:

Header and footer tab:

  • Historical alarms header – defines the header text for historical alarms printouts;

Default value: by default, the text in Header item (Printout tab) is printed;

  • Active alarms header – defines the header text for active alarms printouts;

Default value: by default, the text in Header item (Printout tab) is printed;

  • Historical alarms footer – defines the footer text for historical alarms printouts;

Default value: by default, the text in Footer item (Printout tab) is printed;

  • Active alarms footer – defines the footer text for active alarms printouts;

Default value: by default, the text in Footer item (Printout tab) is printed

  • Alarms listing header – defines the header text used for active alarms printout in the graphical mode;

Default value: by default, the following text is printed: alarm events listing| |

  • Alarms listing footer – defines the footer text used for active alarms printout in the graphical mode;

Default value: by default, the text defined with the following control characters is printed:

&D &T|&p|&c

Set of available control characters used in header and footer declaration is presented in Appendix 4.

Fig. Printout parameter window – 'Alarm printing / Headers and footers' tab.

Fonts – Alarms tab contains the definitions of fonts used for alarm printing:

  • Alarms font – defines fonts for printing alarms in graphical mode; height given in tenth parts of millimeter; value 0 means automatic scaling to page width;

Default value: Courier New,0;

  • Alarms header font – defines fonts used in alarm printout headers; height given in tenth parts of millimeter; value 0 means automatic scaling to page width;

Default value: if the parameter is not set, the setting from item Header font (Fonts tab) is valid;

  • Alarms footer font – defines fonts used in alarm printout footers; height given in tenth parts of millimeter; value 0 means automatic scaling to page width;

Default value: if the parameter is not set, the setting from item Footer font (Fonts tab) is valid.

Fig. Printout parameters window – 'Alarms printing / Fonts' tab.

Option tab allows to define:

  • Alarm text length – determines the number of characters used for alarm text printing; as a standard, the length is calculated to approx. 90 characters, so as the entire printout line does not exceed 120 characters;

  • Alarms printout formats:

  • Alarm line format – determines the number and sequence of information printing; it is a character string made up of letters defining the field types – characters defining the alarm line format is contained in Appendix 5;

  • System alarm line format – item allowing to define the format used for printing system alarms; characters used for format definition are described in item Alarm line format;

Default value: the default format is the format given in Alarm line format line;

  • Settings:

  • Print system events– specifies whether the system events should be printed;

Default value: by default the system events are printed

  • Immediate alarm listing – item determines the current alarm printout mode; immediate listing is a text printout identical to the mode used in AS program mode older than 2.59; alarm lines are printed one by one, in the moment of event occurrence (however, printer can internally buffer the text and print the page only when its full); in the graphical printing mode, first a full alarm page is gathered and only then the printing is performed; printout header and footer are added;

Default value: current alarms printouts are by default performed in the graphical mode;

  • Date separator on historical alarms listing – determines whether the historical alarms printout should include lines signaling the alarms change date;

Default value: by default, the parameter is not used;

  • Alarms printing – item enabling immediate alarm printing;

  • Print on default printer – usage of the first form item is printing on the default system printer;

  • Don’t print alarms;

  • Print on selected printer – allows to specify any printer installed in the computer.

Default value: print on default printer

F ig. Printout parameters window – 'Alarms printing / Options' tab.


3.12.6. Special characters controlling the printout format

Info tab includes the statement of control characters used for definition of header and footer contents for created printouts (mask dumps) and list of letters defining the number and order of information printing on the alarms printout.

List of characters controlling the layout of headers and footers is contained in Appendix 4.

List of characters controlling the alarms line format is contained in Appendix 5.


3.13.1. Declaration of script reports files

Script reports tab includes:

  • Files of script reports – allows to declare the use of script reports according to the following syntax:

report_name, report_code_file_name [, output_file_name, report_parameters]

where:

report_name - parameter is a custom text describing the report; this name will be displayed in the report list in Reporter window and will be used to run the report with use of operator actions;

report_code_file_name - parameter is used to give file name with report code; it is possible to give full path to file or only a file name with extension; in second case, report file will be searched in directory given in directory indicated in item Directory with report definitions files and mask path directory;

output_file_name - parameter is used to give the basic name of files, where the generated reports will be stored; names of output files are created only through adding an extension depending on the report creation data to the basic name; parameter output_file_name should be used only, when on the basis of the same code file, there will be different reports types created (see description of report_parameters item); if the parameter is ignored or character * is inputted, the report output files names will be created on the basis of report code file name;

parametry_raportu - parameter allows to create parameterized report code files; parameter content is fully passed to the script when it is launched and can be used to control the script operation; bear in mind, that if the same report code file is used in many SCRIPT items, give a unique output file name in each item.

The report parameters may include scripter execution parameters (for more information on script declaration, see “Scripts – user manual” - file Skrypty.hlp or Skrypty.pdf):

//S - in the given moment, only one script with parameter //S, included in the given file can run; parameter is important only when script is launched as asix operator action; scripting module will reject the next attempt of script launch in situation, when the previous script instance with parameter //S included in the same file is not completed yet; if the parameter is missing, it is possible to launch at the same time multiple scripts based on program included in the same file;

//X - when the script is launched, a debugger (installed in the system as the default one) is also started; debugger stops the script execution on the first script instruction;

//D - if error in script is found, debugger will be started;

//IT:nnn - limitation of initialization part execution time, expressed in milliseconds;

//T:nnn - limitation of event part execution time, expressed in milliseconds;

//E:name - gives the script language name (e.g. //E:JScript);

//Thread:name[,pri] - gives the thread name, where the script is executed and defines pri priority of the thread; thread name can be custom and is used to group the scripts executed in one thread; script thread priorities:

0 IDLE

1 LOWEST

2 BELOW_NORMAL

3 NORMAL - (default),

4 ABOVE_NORMAL,

5 HIGHEST,

6 TIME_CRITICAL;

default thread priority is priority 3 (normal);

//U - if this parameter is given, “OnRead” events and temporal event functions defined by SetInterval and ExecuteAt methods will not be generated, if asix application windows are hidden (e.g. with use of HIDE operator action).

Executive parameters are given in convention of cscript program, i.e. they are preceded with double slash.


3.13.2. List of operators

  • List of operators allows to declare names of operators that will appear in report window.


3.14.2. Declaration of action time/event scheduler

Scheduler tab allows to define scheduler actions launched on the basis of time conditions or in response to the change of the selected process variable value.

The meaning of fields in Term area is as follows:

  • Time of execution – field used to determine time (with accuracy of one minute), when the action should be executed;

  • Confirmation – check this checkbox to determine that prior to the action, the system should request the operator for confirmation,

  • Day of execution – field used to give the number of day in the month, when the action should be executed; value Daily enables daily execution of the action.

  • Action – content of action, which should be executed;

The meaning of fields in Event area is as follows:

  • Variable name – name of process variable, whose value is the condition of action execution;

  • Condition – drop-down list used to determine the type of checked condition; there are 4 types of conditions available:

= - variable equal to the given value,

> - variable bigger than the limitation,

< - variable smaller than the given value,

& - logical multiplication of the variable and the given value,

  • Value – number used for comparison with the monitored process variable value; it is a decimal integer number or a floating point number - the program automatically reconciles the data types for variable and value; it is not possible to use condition of "&" type for floating point data.

  • Confirmation - check this checkbox to determine that prior to the action, the system should request the operator for confirmation

  • Action - content of action, which should be executed;

Fig. Parameters of actions and schedulers - 'Time scheduler' tab.

Fig. Parameters of actions and schedulers - 'Event scheduler' tab.


3.14.3. Declaration of action sets

Home > 3.14.3. Declaration of action sets

3.14.1. Declaration of action sets

Action sets time allows to define for an application an action set, being the sequence of custom operator actions, assigned to one operator actions. It is also possible to import action set declared in *.ACT file (from old versions of asix) and export action sets into *.XLS file.

Fig. Scripts and actions parameters window – 'Action sets' tab.


3.15.1. Declaration of application resolution and work directory for screen dumps

Application tab allows to declare the following parameters:

  • Application resolution – screen resolution in pixels used by the application; usage of this item means that in case of work in screen resolution bigger than the one given in this item; point of opening of masks and other elements will be moved, so as the application works in center of the screen;

Default value: if the value is not declared, the application window will appear in the upper left screen corner with resolution bigger than the one, in which the application was executed

  • Work directory – parameter allows to define application’s work directory; work directory is used, among others, as a place for storing screen dumps;

Default value: if the item is left unused, the directory active in the moment of application start will be used as the work directory.

Fig. Miscellaneous parameters - 'Application' tab.


3.15.2. Script parameters

Script parameters tab allows to define:

  • Log file - parameter determines the file name, where the diagnostic information will be stored;

Default value: if the parameter is not given, the log file will not be created

  • Debugger settings - parameter determines the scope of cooperation between scripting module and script debugger

  • Run scripts without debugger – if this option is selected, debugger will be never started; in case of script timeout or error, AS program panel will be fed with error information with line number and character given; executive parameters //X and //D given in the script declaration are irrelevant, if option Run scripts without debugger is checked;

  • Run scripts with debugger – option allows to run scripts under control of the debugger;

  • Run scripts and start debugger at the moment when script module is initialized;

Default value: Run scripts without debugger

Parameter Debugger settings is valid only when Windows operating system includes a proper script debugger installed.

  • Event timeout – parameter determines the maximum time of event handling by the script. If the parameter value is 0, the event handling time is not limited. The unit is time expressed in milliseconds.

Default value: 5000 milliseconds

  • Initialization timeout - parameter determines the maximum time of initialization part handling of the script. If the parameter value is 0, the initialization handling time is not limited. The unit is time expressed in milliseconds.

Default value: 15000 milliseconds

  • Automatic reload on error

Fig. Miscellaneous parameters - 'Script parameters' tab.


3.15.3. Calculator parameters

Calculator tab includes the following parameters:

  • Timeout – maximum time (in seconds) for calculation of CALCULATOR and EXPRESSION objects;

Default value: 30 seconds

  • Overloads – item allows to lock the diagnostic messages informing about overloads in CALCULATOR and EXPRESSION objects;

Default value: default messages are generated;

Fig. Miscellaneous parameters - 'Calculator' tab.


3.15.4. Declaration of parameters entered directly

Directly entered options tab allows to declare for the given application some items, which cannot be edited with support from Architect - i.e. these are items used in older asix versions or brand new item.

Fig. Miscellaneous parameters - 'Directly entered options' tab.


3.8.6.1 Standard parameters

Standard tab includes the following parameters:

Fig. Archive parameter window – 'Standard' tab.

  • Archive:

  • Name – logical name of the archive (resource);

Default value: Archive1

  • Archive type due to data provisioning method:

(local archive):

‘Write archive’

‘Read archive’

‘Slave archive’

or

‘Network archive’

Default value: ‘Write archive’

  • Kinds of archive:

‘STANDARD’

‘MS SQL’

Default value: ‘STANDARD’

STANDARD archive

STANDARD archive requires some additional parameters. To set those parameters correctly, press button [image] to open additional window:

Fig. STANDARD archive parameterization window.

  • Archive directory – relative or direct path to the directory, where the archive files will be stored;

Default value: none

  • Storage period for archive files – storage period for archive files, respectively, of D, M and Y type, where:

min is the number of days, for which – after the end of the given file period – it is not allowed to delete the file, even if there is no free space on the disk (default is 1),

max is the number of days, after which the file must be deleted (default is 0, which is interpreted as ).

MS SQL archive

MS SQL archive requires some additional parameters. To set those parameters correctly, press button [image] to open additional window:

Fig. MS-SQL archive parameterization window.

  • Server name – relative or direct path to the directory, where the archive files will be stored;

name of SQL server instance, where the database exists or will be created; if the parameter is empty, a local server will be used (it is also possible to declare LOCAL server, which is equivalent to empty server name in the archive declaration);

instance name has the following form:

system_name_of_the_machine – for the basic server instance or

system_name_of_the_machine\instance_name – for the named instance;

Default value: none

  • Database – database name on the server side; if this parameter is empty, the database name= ASSQL_resource_name;

the name cannot be repeated for different archives on the same SQL server, but can be repeated in various declarations, if they pertain to multiple servers

Default value: none

  • Optional parameters:

-XT, +XT - archiving of data time – defines, whether the database will archive the exact data time (+XT) or only the time rounded to full sampling cycle (-XT) (the exception are data, for which EVERY attribute was declared – for such data the time is not rounded to sampling cycle);

toggling this option on will add 8-byte field to each data record;

Default value: +XT – time is archived;

-WT, +WT - archiving of time of write – defines, whether the database will archive the time of writing;

toggling this option on will add 8-byte field to each data record;

Default value: -WT – time of write is skipped;

-VT, +VT - archiving of sample validity time – defines whether the database will archive the sample validity time (+VT) or whether it will be skipped, and the default validity time should be archiving period (-VT); as an effect, for –VT, when the archiving period will be shortened in future, the historical data will be separated with gaps; by default the validity time is archived;

toggling this option on will add 4-byte field to each data record;

Default value: +VT – validity time is archived;

-SV, +SV - number of bytes of trend identifier – defines, whether the variable trend identifier should have 2 (+SV) or 4 (-SV) bytes; in case of +SV, the database cannot store more than 32,767 variables per resource (this includes the variables once declared and later deleted);

toggling this option off will increase, for each data record, the trend identifier field by 2 bytes in data and by 2 bytes in base index;

Default value: +SV – small identifiers are used;

-SD, +SD - number of bytes of record identifier – defines, whether the data record identifier should have 4 (+SD) or 8 (-SD) bytes; in case of +S, the database cannot store more than 2 billion (231) data records per resource (this includes each record write and change, even if it is later deleted);

toggling this option off will increase, for each data record, the record identifier field by 4 bytes in data and by 4 bytes in base index;

Default value: +SD – small identifiers are used.

In case of databases declared as MS SQL, record for each sample includes by default the value, quality, cycle time, exact time, record write time, and sample validity period. Only the cycle time belongs to the database key. The first three fields are mandatory.

It is not allowed to change the optional fields in declaration for once created database, even if they do not reflect the database tables structure.

Network archives

Network archives require to give stations, which can be accessed for data for the resource in case of local archive filling or remote archive reading. Station declaration is performed with use of window opened with button [image]:

Fig. Station declaration window for remote archive reading.

  • Network data servers:

‘All’

‘Only from the list’

‘All with exceptions of those on the list’

  • List of network names of data servers – allows to declare stations, from which it is impossible to access data for the resource during merging of local archive or remote archive reading.

Default value: ‘All’

***

  • UTC time – declaration determines the resource archiving according to UTC time;

If such resources are declared, the time zone settings MUST contain the correct zone with checked option of automatic winter/summer time change. In opposite case, time will be recorded incorrectly.

If UTC time is declared in the archived resource, the old archive must be converted. For standard archive, it can be performed with use of special AspadTools function. Bear in mind the sequential processing of archive files – it is the best to convert all of them with one command.

If UTC time is not declared, communication between ASPADs is executed in local time and is insensitive to incorrect time zone settings.

If UTC time is declared on the server, UTC time must be also declared on the client machine.

Examples of MS SQL archive declaration:

Declaration of write archive for MyArchive resource on local server in ASSQL_MyArchive database, without archiving of record write time:

Write archive

Name: ‘MyArchive’

Archive type: ‘MS SQL’

Server name: -

Database: -

Declaration of write archive for MyArchive resource on local server in MyArchive database without archiving of record write time:

Write archive

Name: ‘MyArchive’

Archive type: ‘MS SQL’

Server name: -

Database: ‘MyArchive’

Declaration of read-only archive for resource ‘ArcSrv1’, on server ‘Srv1’, in ‘ASSQL_Arc’ database with full record:

Read-only archive

Name: ‘ArcSrv1’

Archive type: ‘MS SQL’

Server name: ‘Srv1’

Database: ‘ASSQL_Arc’

Archiving of time of write: R


3.8.6.2 Aggregates archiving

The Aggregates tab allows to parameterize Aggregator - asix built-in module for calculating and archiving statistical data. Aggregates archiving is not active by default.

Aggregates archiving

Default value: option disabled

  • Periods list – aggregation period list in Aspad convention, separated by horizontal lines, i.e. 5m|1h, means calculation 5 minutes and 1 hour aggregates;

  • Aggregates list – aggregates short names list, separated by horizontal lines, i.e. QGood|QBad|Avg

  • Aggregation horizon – aggregation limit for oldest data, in Aspad convention, i.e. 366d means that aggregates oldest than one year will not be archive. Aggregation horizon is not required, empty value means all data aggregation.

Warning: Periods list and Aggregates list are required parameters for this option.

Fig. Archive parameters window – 'Aggregates' tab.


3.8.6.3 Data merging

The Merging tab allows to determine the following parameters:

  • No merging – toggle this option on to prevent from data merging for the given archive (resource);

Default value: option enabled

  • Mergin mode:

- Merge data only at application start-up; later retrieve data from the current data mode;

- Keep merging data; don't retrieve data from the current data module;

  • Merging limitations – allows to limit the list of stations, from which Aspad will merge data; on condition that option No merging is disabled:

- Merge data only with servers from the list;

- Merge data with all servers except the ones from the list;

  • Minimum merge period - using this option one can increase the period from which archives should be merged; by default, current and previous archive files are merged.

Fig. Archive parameters window – 'Merging' tab.


3.8.6.4. Remote read access

The Management tab allows to set the Remote read access parameter. There are two possible options:

- Only stations from the list can use this archive;

- All stations except the ones from the list can use this archive.

Fig. Archive parameters window – management of remote read access tab.


3.8.6.5 Parameters defining the archive backup execution

Fig. Archive parameter window – 'Backup' tab.

Backup tab pertains to options:

Backup – parameterizes the backup creation method:

Default value: backup is not created

  • Archive – determines the name of archive, where the backup should be executed; it is the name of archive defined as slave archive;

Default value: none

  • Cycle length – determines, how often the backup execution should be initiated;

Default value: 1 day

  • Cycle phase – determines delay between full cycle and backup initiation;

Default value: 1 hour and 30 minutes

  • Type and number of copied files – allows to determine what types of files should be backed up and how many last files of the given type should be backed up:

  • Daily archive files (D),

  • Monthly archive files (M),

  • Annual archive files (Y),

  • Archive with horizon files

Default value: no type declaration

For one resource, it is possible to declare several archives, for which the backup will be executed. It allows e.g. to back up daily files in other location than monthly files.


3.8.6.6 Declaration of synchronization of B-type archive contents with MS SQL base data

Fig. Archive parameters window – 'Synchronization' tab.

Synchronization tab defines:

  • Synchronization – method of synchronization of B-type archive with data collected in MS SQL base.

Method of writing:

SYNCHRONIZATION = source_name, target_name, [I] [cycle], phase

or

SYNCHRO = source_name, target_name, [I] [cycle], phase

where:

source_name - name of resource defined in ARCHIVE declaration, determining archive, from which the data should be copied;

target_name - name of resource defined in ARCHIVE declaration, determining archive, where the data should be copied to;

cycle - determines, how often the data adding should be initiated; adding letter I in the beginning causes that the first synchronization will be performed always during system start-up; I without cycle time causes that synchronization is performed only at system start-up; if value 0 is given as cycle parameter, synchronization is not performed cyclically, and this declaration will be used only as declaration for SYNCHRONIZE_ARCHIVE operator action; default value of cycle parameter is: 24 hours, unless I is given (then no cyclical operation is executed);

phase - defines delay between the full cycle and the initiation of data copying; default value is 0.

Default value: no declared synchronization

Synchronization results in incremental copying. Only the data added or changed in the source archive since last copying will be copied. In case of conflict with existing data, target archive will include data of better quality. In case of data of the same quality, manually inputted data are preferred.

It is possible to input multiple SYNCHRONIZATION declarations, also for one resource, which allows e.g. to fill data from several twin servers.

  • Master archive – if the paramater is used, the data in the archive on this computer is more important than on other computers.

Fig. Window with information on 'Master archive' parameter.


3.8.6.7. Advanced parameter

Advanced tab appears after selecting command View / Show advanced options from Architect module window menu.

Advanced tab defines:

  • Store of values with given status – the option allows configuration of archivization depending on status. By default, only values with good status are archivized.

Fig. Archive parameters window – 'Advanced' tab.


3.9.10. Advanced parameters

Advanced tab appears after selecting command View / Show advanced options from Architect module window menu.

Advanced tab includes the configuration of the following parameters:

  • Disable display of excluded alarms – application of the mode consisting in disabling display of excluded alarms; however, such alarms are registered and saved to log - where all registered events can be viewed after the exclusion is lifted;

Default value: excluded alarms are displayed

  • Filter method – selecting the alarm filtering method; it is possible to filter short alarms appearing for time shorter than declared (method no. 1) or fast sequences alarm appearance- disappearance – alarm appearance (method no. 2);

Default value: 1

  • Active station – additional parameterization for stations working in the network in operation mode; in the group of interconnected operator stations, at each time there is only one machine, which detects alarms; disabling this option will mean that the given computer will never become an active station; it is applied in locations, where there exists no direct link to controllers or on supervisory stations with required access to active alarms;

Default value: station may be active

  • Network names of computers being historical alarm servers – open declaration of operator stations being the alarm servers;

Default value: no declared stations

Parameter pertains to application configuration files for machines operating with control alarm system; the longer is the search time, the bigger probability of finding the requested servers.

  • Network names of computers of historical alarm servers operating as a gateway in the network – open declaration of historical alarms server ; used for declaration of machines working in historical alarms server mode as the gateway stations;

Default value: no declared station

Item pertains to application configuration file for machines working with control alarms system. The longer is the search time, the bigger probability of finding the requested servers.

Fig. Alarm system parameters window – 'Advanced' tab.


3.9.1.1 Preparation of alarms definitions and alarms groups in Excel spreadsheet

In case when the data source necessary for generation of alarms definitions base is Excel sheet, the data must be saved in worksheets of XLS or XLSX format. The sheets can be created in Microsoft Excel (version 97, 2000, XP, 2003 and 2007) or Open Office (version 1.1.2 or later).

Alarms definition sheet must be named Alarms and include the following columns:

  • Number – unique alarm number;

  • Type – alarm type (SYSTEM, MESSAGE, WARNING, ALARM, IMPORTANT, IGNORED);

  • BeginningText – text displayed in the moment of alarm detection;

  • EndText – text displayed for finished alarms. If no such text is given, the same text as for alarm start will be used;

  • GroupId – max, 4-character identifier of the group, where alarm belongs to;

  • MaskName – name of suggested mask;

  • Printt – enabling or disabling (PRINT, NOT_PRINT) of line alarm printout.

Fig. Alarms definitions sheet.

Print column determines alarms, which will be printed, if the current alarm printing is declared.

Current alarm printing is determined by Alarm printout parameter:

Fields and computers module > Printout > Alarms printout tab: Headers and footers, Fonts, Options tab

If the Alarms printout parameter is declared without the printer name in the Printer field, the default system printer will be used. Printer parameter allows for individual selection of the printer dedicated for alarm printing.

Alarms groups definitions sheet must be named Groups and should contain the following columns:

  • GroupIdy – max. 4-character group identifier, used to identify groups in alarm definitions,

  • GroupDescription – custom text describing groups; the text will be displayed in the groups list in the alarms selection window; if no such text is given, the group identifier will be used in the selection list;

  • Print.- enabling or disabling (PRINT, NOT_PRINT) the line printout of alarms belonging to the given group.

Fig. Alarms groups definitions sheet.

To shorten the stage of preparing sheets with alarms definitions and alarms groups, Architect provides the function for generating template sheet containing all necessary sheets, sheet columns and exemplary alarm definitions:

Database module> Template tab > the generated file is by default named ‘AlarmsDefinitionsBaseTemplate.xls’

(Template tab is available only when the alarms definitions base mode: Alarms definitions base is generated from a spreadsheet is enabled)


3.9.1.2 Generating alarms definitions base from spreadsheet

Generation of alarms definitions base from spreadsheet is performed in the following steps:

1. Define the alarms definitions base work mode as Alarms definitions base is generated from a spreadsheet

Fig. Alarm definitions base > 'Type' tab.

2. Specify the data sources:

Alarmbase > Data sources tab > specified Excel files

Fig. Alarms definitions base > 'Data sources' tab

4. Select Generate [image] command.


Appendix 4 - Control characters used for definition of constant printout elements

The definitions of headers and footers are comprised of three parts separated with | character. They will be printed, respectively, on the left side, in the middle, and on the right side of the page.

&p - page number

&c - machine name

&a - application name

&o - operator (in version 2.66 - empty text)

&w - text definining the printout type (predefined text, e.g. to print the scheme mask: “Screen dump")

&r - report name

&m - month - number

&M - month - name

&y - year

&h - hour

&n - minute

&s - second

&D - full date in form defined in the operating system

&T - full time in form defined in the operating system

&& - &

&es - name of printed alarm resource

&ef - start time of the printed alarm period

&et - end time of the printed alarm period

&ec - description of used criteria – filename, if the criteria are taken from selection file

Header and footer can have many lines. For this purpose, the text should include ^ character.


Appendix 5 – Alarm line format

A - alarm text;

D - alarm date – 4-digit year;

d - alarm date – 2-digit year;

T - alarm time with miliseconds;

t - alarm time without miliseconds;

S - status: start/end (during printing of active alarms, S flag is ignored);

N - subsequent number;

I - alarm number/identifier;

X - in space of code, the * character is printed for special alarms, and space for normal alarms;

Spacja - enters a space to the text;

Default value: the default format is ADTS;

After A flag, it is possible to give the length of field and number of starting character in format: length[/first_character] - first_character can be a negative number, which shall mean that it is counted from the end of alarm text.


1. What`s New in asix5

Home > 1. What`s New in asix5

1. What`s New in asix6

AsAlarm - INTERACTIVE ANALYSIS OF ALARM EVENTS

AsAlarm is an application providing tools for in-depth analysis of alarms generated by the monitored site and of other data relating to alarm system operation, in accordance with the EEMUA (The Engineering Equipment and Materials Users Association) guideline No 191.

Alarm information management is implemented with the use of:

• historical event table,

• graphs of selected alarm events,

• analytical section for calculating various statistics.

AsAlarm allows viewing of the following statistical information calculated based on alarm event log analysis:

• event occurrence distribution (number, percentage),

• event duration,

• average time to acknowledge,

• number of terminated alarms,

• number of acknowledged alarms,

• identification of most frequently occurring events,

• identification of the longest events.

AsAlarm uses an archived alarm event log stored in the SQL database. Two versions of the application are available: run locally (desktop version) and Web-based.

Fig. AsAlarmNet.

AsRaport - REPORTING BASED ON MICROSOFT REPORTING SERVICES

Microsoft® SQL Server™ 2008 Reporting Services is a complete platform designed to meet a wide range of expectations in the field of enterprise-wide reporting. With Reporting Services, which is a component of SQL Server 2008, you can: create reports based on a variety of data sources, manage reporting environment involving the planning of generated reports, manage report subscriptions and control access rights, as well as provide users with reports in the appropriate format and in a convenient way (automatic report delivery based on e-mail subscription or embedding of reports in the business applications and portals).

Version 6 of the asix package introduces a new reporting system using MS Reporting Services to create reports based on the process values archive, data from the variables definition database and archive alarm event log.

The asix system is compatible with both Reporting Services offered by the free Microsoft SQL Server 2008 Express and the services made available in full MS SQL Server 2008. Extension of the asix system within the Reporting Services environment includes the following applications: Askom.Data.Host, AsRaport, AsixConnect database run on Microsoft SQL Server and an independent archiver to store alarm events in Microsoft SQL database. In addition, as a consequence of its integration with Reporting Services, asix 6 provides AsRapView module for viewing of reports (created in Reporting Services environment) in asix application.

Fig. Report based on Microsoft Reporting Services.

Alarm event logging in a MS SQL database

Version 6 of the asix Package introduces the possibility of logging alarm events in an SQL database (such logging is done in parallel with saving alarm events in the binary files archive). The SQL database stores both alarm definitions and alarm events - this data is used by AsAlarm applications and AsRaport reporting environment.

AsPortal - PROCESS INFORMATION PORTAL

New graphics, which changed the image of the AsPortal module will certainly encourage users to use this form of access to process data. A novelty is the ability to print and export tables and plots to files in a format selected by the user.

Fig. AsPortal.

Table - PRESENTATION OF THE CURRENT VALUES OF PROCESS VARIABLES

A breakthrough in the functionality of the Table object is the ability to access the descriptions of status variables bits and the descriptions of their values.

Users probably will be glad to know that Table object editor is now available. What has so far been created manually in text files, can be now achieved using the convenient and intuitive editor that completely spares the designer the need to create table definitions. The editor interface has been designed in such a way to logically group together the various parameters defining the table on separate tabs.

Table Editor fully supports the designer in both the creation of binary value tables - in which the variable bits can be displayed in subsequent columns within a single row, or diagnostic table of the drive status word - where the bit values of one variable are presented in the subsequent table rows. Interesting is also the possibility of executing operator actions, which are called from the table level - from separate table fields based on the definitions stored in variable definitions database.

Fig. Table editor.

Upgrades to AsTrend application

The upgrades to AsTrend application involve a number of changes aimed at improving the application. An absolute novelty is, in addition to Windows-based version of the application, providing the user with fully functional equivalent web-based version of AsTrend running in the browser. Brief overview of upgrades to AsTrend application:

• Web-based AsTrend application

gives access to the web-based application through a web browser under asix4Internet license.

• Working with the table of historical data

AsTrend application now features a new mode that allows viewing of historical data in tabular form.

• Changes in XY charts

Plotting XY charts with multiple OY axes has been added.

• Data Aggregation

Added ability to calculate aggregates for all types of asix variable data - previously aggregates were calculated only for the uniform data.

• Displaying reference waveforms

The Reference waveforms in series options enables you to run a trend model window (one or two). The addition of two reference waveforms allows for a ribbon diagram, which is useful in assessing the evolution of the variable values under analysis in terms of exceeding the maximum and minimum values.

• Displaying the uniform data

A button for displaying the data reading interval dialogue box has been added to Uniform data command on the tool bar.

• Adding aggregated variables

The Series menu now features an option to add an aggregated variable. This command allows you to add an asix variable and to define its aggregate.

• Saving the default trend parameters

Save as default check box has been added to trend options editor. These options will always be used when creating a new trend.

• Embedding a table in the trend chart

Currently, the table (the tool for displaying the measured data points forming the curves shown in the chart in AsTrend application) can be 'docked' in the trend window, fitting the table in the chart area so that table of variable values is displayed instead of the chart. Table then obscures the chart area, however, the user can switch between the chart/table views using the tabs Chart / Table, which appear above the legend when embedding the table.

• 'Integral' - a new option of aggregate value format

A new option Show integral as time has been added among value format series parameters, which can display the value of 'integral' aggregate as time in the format: d h:mm:ss.

• Converting 'integral' and 'gradient' aggregates

A new Measurement period option has been added to series parameters, which is used to convert the 'integral' and 'gradient' aggregates. The option is initialized when adding a variable based on the value of Unit attribute.

• Historical Data Table Mode

AsTrend has been enriched in a new operation mode enabling data view in a table form.

• Other novelties

- possibility of adding to a trend empty series; they can be used as separators in the trend legend as well as in historical data table;

- new calculated attributes: Sample Time of Read Line 1, Sample Time of Read Line 2, Sample Quality of Read Line 1, Sample Quality of Read Line 2. Now Sample Time of Read Line 1/2 attributes contain time of read line instead of time of sample indicated by read line.

Novelties in synoptic mask design

• Synoptic masks scaling mechanism

Far-reaching changes in the synoptic masks scaling mechanism will certainly prove to be invaluable when mapping complex technological systems. Thanks to solutions based on the use of so-called detail masks and references to selected fragments of any other synoptic mask, the new scaling mechanism allows unrestricted navigation of mapped technology at any level of detail required by the user.

• HINT - a new class of objects

When this object is used on the mask, a hint is displayed for all dynamic objects (with a declared variable name). The range of information is specified in the definition of the HINT object. These are generally variable attributes declared in the same manner as in the legend area format in the CHART object.

• Operator notes are assigned to specific locations on the synoptic mask

Operator Notepad is a new functionality of AsAudit application, which allows operators to draw up 'handwritten' text notes that can be attributed to any location on the application synoptic mask. The concept of a segment is linked to notes, which, in this case, is an element uniquely identifying a note or a group of notes. Thanks to the segment, it is possible to link a note to a specific location on the synoptic mask. The segments are defined in the AsAudit Configurator, while notes are created in the AsAudit Console. Segmented notes can be viewed using the AsAudit Browser, and an appropriate operator action is required to retrieve notes created for a particular segment from the synoptic mask level.

• BUTTON object modified

The BUTTON object now allows simultaneously declaring both image and text to be displayed over the image. This significantly simplifies the design and naming of the visually impressive buttons on technological masks.

• New application templates for the application wizard

Application Wizard is available from the Architect. It features two application templates, incorporating graphic elements to allow for the design of aesthetic visual masks.

• Possibility of scaling PICTURE/PICTURES objects

Data archiving upgrades

• New replicated archive

Replicated Archive applies to servers, where Asmen current data module has no physical channels for data archived within a given resource, while another archive is available on the network, which can be used to retrieve historical data. Aspad archive data module does not read current data from Asmen for the replicated archive, but instead it continuously retrieves historical data from another server storing data from the physical channels, saving it in its own archive. Proxy servers are a typical application of such a solution.

The replicated archive eliminates inconvenience typical of other types of archives:

- No filling of missing archive data, resulting from a momentary loss of the connection with the computer providing data

- too frequent reading of current data, when the cycle is shorter than the archiving cycle,

- data redundancy, which occurs when applying an archive with synchronising option.

• Simplified synchronising declaration for MS SQL Archive

When declaring the synchronization of MS SQL archive with other data archive, it is sufficient to specify the synchronization parameters (for the archive, whose data will be synchronized), only the SQL Server name from which to retrieve the data to be synchronized. The names of the two databases containing archives must be identical. Thus there is no need to declare an additional 'virtual' archive, with which data is to be synchronized.

• Option to declare archiving condition in variable definition

Starting with version 6.0.2 of the asix Package, variable archiving conditions can be entered in the Architect's definitions database editor, in the form of a conditional expressions in line with the condition definition syntax or expressions consistent with the argument condition syntax. Since most of the conditions have simple single-line form, this will allow avoiding creating an additional conditions file in many applications.

• Additional aggregates

List of available archive data aggregates has been extended with new items:

Total of Increases - the sum of positive changes since the last known value prior to origin, to the last value before the end of the sampling interval. For a binary variable, this will reflect the number of time switched on.

Total of Decreases - the sum of absolute negative changes since the last known value prior to origin, to the last value before the end of the sampling interval. For a binary variable, this will reflect the number of time switched off.

Last Known - the last known (good or uncertain) value before the origin of the sampling interval. Yields the last value, even if it occurred a long time ago.

Last - the last known (good or uncertain) value in the sampling interval excluding the end of the interval, to distinguish from the End aggregate, which includes the end of the interval.

Standard Deviation - time-weighted standard deviation of the sampling interval.

Root Mean Square - time-weighted rms of the sampling interval.

Last Known Average - time-weighted average of in the sampling interval. Last known value is inserted in place of corrupt or missing values.

Last Known Integral - integral in the sampling interval, with the time calculated in seconds. Last known value is inserted in place of corrupt or missing values.

New items in the list of communication drivers

• Max1000. Communication based on the so-called. "Network protocol" with the MAX 1000 camera management system by ULTRAK. The driver only carries out the camera switching and time synchronization functions (the driver provides time stamp). Communication takes place using the RS-232 serial interface.

• NordicRF. The exchange of data with Nordic ID RF 601 barcode scanner. Communication takes place using the RS-232 serial interface of the base station.

• LZQM. Exchange of data with LZQM electricity meters, produced by POZYTON Electronic Measuring Instruments Facility in Częstochowa. Communication takes place by means of a serial communication according to CLO standard.

• Global. CtGlobal driver is used to exchange data between the asix system application an a so-called swap file, which is a container for the driver's current variable parameters (name, status, value, timestamp). In an application run across multiple computers, the contents of the swap file can be synchronized between different computers. This way changes in variable values occurring on a single computer can be propagated to all other computers.

• Srio. The exchange of data with the SRIO 500M hub (ABB-produced), which provides communication between the host system and the devices connected to the SPA bus, such as protection relays and signalling devices. Communication with the hub is accomplished via RS232-compliant serial communication, data transport layer - based on the ANSI X3.28 protocol in full-duplex mode with the BCC checksum.

• SNMP. The driver can read and write objects values using SNMPv1 and SNMPv2c protocol- manage the various elements of telecommunications networks, such as routers, switches, computers and telephone exchanges. The driver performs its functions by using the SNMP Management API.

Other upgrades

• asix on the system path

Since the 6.0.2 version asix is not added to the operating system path. Thanks to that the Asix Package Manager allows to configure MS Windows environment for running any asix version installed on the computer (there is the possibility to have many asix versions installed on one computer, w.e.f. asix 2).

Internet applications from previous asix versions (since the 6.0.1 version back) need the asix to be added to the operating system path.

• Changes in Architect

Architect has been equipped with Asix Package Manager tool that allows user to configure the operating system for running any asix version installed on the computer (w.e.f asix 2).

The Find a variable command has been added to the variable selection window and variable preview window. In addition, the variable selection window has the option of storing the state of group tree.

• OPC driver

The new channel parameterization option: Status item of channel allows to declare a variable signalling the channel status (the information on failed or proper connection with a controller).


2. Help System

asix uses standard system help tools.

The use of the help system is identical, as in every other program that operates in Windows system. The help system includes three windows called: Contents, Search and Index (not always).

The main help file is asix.chm.

The Contents window enables review of the table of contents of the asix documentation with possible opening and browsing of the individual topics.

Figure. Asix Help File - Contents Tab.

The Search window enables searching for any text in the documentation and looking through the selected part of the help, where this text appears.

Figure. Asix Help File - Search Tab.

The Index window contains the list of keywords; reference of them can be looked through.

The asix help system can be used separately - with no need to run the asix program. For this purpose it is enough to run the asix.hlp file. If the help system is used together with the asix program, the help can be obtained at any moment by striking Alt-F1 keys. The window of context help is then displayed, being referred to the active window (or to the field included in the window) which has been opened before striking Alt-F1. The help window can also be displayed within the given window by means of clicking the Help button (whether exists).


3_1_Hardware_Software

Home > 3_1_Hardware_Software

3.1. Software Requirements

The asix system operates under MS Windows XP, MS Windows Server 2003/2008, Vista, Windows 7 systems.


3_2_Installing_asix

Home > 3_2_Installing_asix

3.2. Installing asix

The installation procedure includes the following steps:

  • Installing the protection key

Before you start the system, insert the hardware protection key in any parallel port of your computer. The key must be inserted over the full time of operation of asix programs.

asix is available in different versions, which differ each other in available operation sets. The key that comes with the software determines the type of installation. The keys are provided with a 4-character code number, which determines the authorization types in possession. The actual meaning of the code you may find in the price list.

  • Installing the asix software

Insert the CD ROM disc into the CD ROM drive. The installation procedure is self-extracting (if problems arise, execute command: asix.exe).

Then, follow the installation program guidelines. It is recommended to close any other Windows programs as far as possible during the installation of asix.

STEP 1

After you insert the CD ROM disc into the CD ROM drive, a greeting window will appear.

To proceed, choose asix installation.

STEP 2

If Internet modules are installed, it is possible to install:

- .NET Framweowrk 1.1.4322;

- IIS (Internet Information Services) of 5.00 or newer version;

- ASP.NET service has to be switched on in IIS.

If the user decides to install Asix4Internet, the above components will be installed simultaneously with Asix4Internet.

STEP 3

If the asix package is being found on the computer; it is necessary to uninstall it or to install the current version to the other directory. There are two variants of installation:

  • full instalation – requires HASP key;

  • trial installation – 30-day trial version. After 30 days you must install HASP key and full version.

STEP 4

The next window contains welcome introduction. After pressing the button Next you follow to the windows with License Agreement and Readme information.

Figure. ‘Welcome to the Asix Installation Wizard’ Window.

Figure. ‘License Agreement’ Window.

Figure.‘Readme Information' Window.

STEP 5

The following window is to acknowledge the registration.

Figure. ‘User Information’ Window.

STEP 6

In the next step the installer will run the window, which enables the user to declare the directory.

Figure. ‘Destination Folder’ Window.

There is a default directory:

<disk>:\Program Files \ASKOM\ASIX

where:

<disk> is the name of the disk which the Windows system is installed on.

You may change the selected directory using the Browse option.

STEP 7

The next window contains list of the system components to be installed. Some elements of the system are selected for the installation by default. The user may freely configure the list of elements to be installed.

  • If you intend to use your computer for designing the application, you’d better install all the asix components. The correct operation requires the Programs to be installed only. If you would like to have the prompt feature, select additionally the Help option. Fonts contains files including definition of the fonts used for the asix version running under DOS for the case of importing the parts of the application developed previously by means of asix in its old DOS version.

The Programs option includes:

Visualization package – there are programs and libraries of the asix package;

AsAudit - the module extends the central user log-in and authorization control system with registration of performed controls, operator's action and application integrity control.

Drivers – a selection field is used for installing standard and special communication drivers; standard ones are the part of standard asix installation but special ones are the separate items on the price list;

AsixConnect - is a package of servers, which are demanded when you intend to use other programs to extend asix application functionality (e.g. MS Excel, Access).

  • The Asix4Internet option should be installed if you intend to use tools for Internet application support.

  • If you want to have an access to help system, select Help.

  • A lot of space is required to install the technical manuals and their viewers (Manuals). In the case of insufficient space on the disk you can print the manuals and eliminate them afterwards from the memory.

  • If you select Example applications, the expandable demo applications will be installed. It is worth to be installed indeed, to see the parts of the example installations and to follow some standard solutions.

  • The BDE (Borland Database Engine) system is to be installed when it is not installed yet. This component is necessary when process variable data are stored in a database.

STEP 8

The next window notifies about readiness for installation of selected components.

STEP 9

Finally, the window informing about the end of the installation process will be displayed.

Figure. Window Informing about asix Installation Performance.

After the asix installation, in Start / Programs menu the asix group, containing particular modules of the asix package, will be created.

STEP 10

After the asix package has been already installed, the asix installation wizard restart displays the ‘Application Maintenance’ window with the follwing options:

- Modify – it lets you configure the individual features;

- Repair – preferences stored in the registry may be reset to default values;

- Remove – uninstalls asix from the computer.

Figure. ‘Application Maintenance’ Window.


3_3_Starting

Home > 3_3_Starting

3.2. Starting asix

asix is started by clicking the previously created application shortcut icon.

To create the shortcut to designer window you should select AS32.exe with the full path from the installation directory in Properties/shortcut/target element. In /Start in: you enter the application’s working directory.

NOTICE To run the application with the shortcut, the name of application’s *.xml initialization file should be specified as the AS32.exe call parameter.

Figure. Shortcut Properties Window.

An example of shortcut creating:

install directory: - C:\Asix

initialization file: - ACID_FACTORY.xml

target: - C:\AIS\as32.exe ACID_FACTORY.xml

start in: - C:\ACID_FACTORY


3_4_Uninstallation

Home > 3_4_Uninstallation

3.3. Uninstallation

Two options give you the possibility to uninstall asix system: calling the deinstallation program from the Control Panel window (Add/Remove Programs) or from the appropriate dialog box – when you run the asix package installation file, you should select the Remove option.


3. Installing and Configuring the asix Software

Home > 3. Installing and Configuring the asix Software

 3. Installing and Configuring the asix Software


4.1. Defining the Process Data for ASMEN Program

The first operation needed to start designing the application is to determine set of the process data as a base on which the application will be developed. All the data necessary to display the status of the industrial process are read by means of the ASMEN program. In order to do it you should set parameters of ASMEN. Two fundamental elements of parameter settings are:

  • definition of the read/write transmission channels for the process data, what depends on the choice of hardware equipment to be used for communication with the data source;

  • definition of the process data, their addresses, refreshing frequency and method of their processing.

The ASMEN configuration is performed by defining the communication channels in the initialization file and creating the database of variable definitions (VarDef) with definitions of process variables, that we will refer to during the process of application development.

Currently it is recommended to prepare the information about process variables with use of tools like spreadsheet or database program and then generate the database of variables of asix system from this data. It is also possible to generate the database of variables from the data contained in a text file.

For the VarDef generation you should use the Architect module. Excel spreadsheet allows preparing the full set of information about process variables like: Name, Description, Symbol, unit, Measurering Range, Assembly information etc. This detailed configuration can be yet delayed.

In asix 5 visualization system, the variable definitions database data can be stored:

- as Jet database,

- as MS SQL database,

- it is possible to use the Excel worksheet directly as the variable base, without the stage of variable generation stage. After the worksheet is loaded, it is no longer used.

Operation, that absolutely has to be performed, is defining the logical names of all used process variables. These names are needed for creation of visual masks.


4.2. Defining the Process Data to Be Archived

The next step is to declare the process variables to be archived. These variables are necessary for calculating the reports as well as for presentation of variable values on masks and trend charts. The ASPAD unit handles all the archived data. In order to set ASPAD’s parameters it is necessary to make definition of the set of the ASMEN process data to be archived and the period of their archiving. Parameterization of variables for archiving is included in the database of variable definitions (VarDef). In addition, general program operating parameters should be defined in the configuration file.


4.9. Network Installations

Two main types of stations exist in the asix system.

1. Operator workstation (local station or server) designed for direct handling of the process.

Their basic features are as follows:

• 24 hour operation,

• direct access to the PLCs controlling the industry process,

• active archiving the process variables,

• possibility of process control,

• on-line alarm handling with acknowledgement facility available.

2. Remote stations (network terminal) dedicated for supervisory staff.

Their basic features are as follows:

• usually periodical functioning only,

• data access by means of network connections with operator stations,

• archived data taken mainly from the operator computer’s active archive,

• possibility of process control usually disabled,

• alarms handling by passive browsing of the alarm history only.

Departures from the mentioned above characteristics are possible to allow creation of „hybrid” stations which combine the features of both basic types of stations.

Particular approach is used to the network installations, where a few operator stations are used. Their features are:

• updating, made at the moment of starting of the operator station, is performed to update the process variable archives to the condition of the previously activated operator station;

• archive files of alarms are updated in the similar way;

• alarms are handled in the same way on all operator stations. Acknowledgement, deletion or filtration of the alarm at one station automatically evokes the same action at all the other operator stations.

See description of ASMEN and ASPAD modules and AS32 program handling module in the next chapters for detailed rules of parameter setting for asix.


4. Stages of Application Development

This section describes the successive steps of development of an application in asix. In real designing, surely such presented sequence of operations cannot be strictly followed. When expanding application, you will be forced many times to return to the previous points to complete the setting of parameters. Nevertheless, it is worth to be familiar with the guidelines presented below to know the whole method of application development.

Within asix you can distinguish certain autonomous modules, which support operation of the main part of asix system. The modules are developed as DLL libraries, which are automatically activated when required:

ASMEN - Communication Manager;

ASMEN is responsible for data transmission between the computer on which it has been started up and the PLCs and other process controllers;

ASPAD - Data Archiving Module;

the ASPAD’s task is to maintain the long-term archives of all the data retrieving from the process under control;

ASLINK - Local Network Manager;

ASLINK is used for the asix’s network installations. It performs information exchange between individual components of the system. It requires the presence of the NEBIOS utility package (referred further as NETBIOS emulator). NETBIOS is a component of Windows systems.

Characterized methodology of the asix application development includes the following points which will be described in next chapters:

  1. Defining Process Data for Asmen Program.

  2. Defining Process Data to Be Archived.

  3. Creating an XML – application configuration file.

  4. Creating a Variable Definitions Database.

  5. Creating Visualization Masks.

  6. Defining the Way of Application Handling.

  7. Defining the Application Operating Parameters.

  8. Launching the Application.

  9. Network Installations.


5. Selection of the asix System Language

The asix software package possesses the possibility of switching the language of program operation between Polish and English by means of the SelectLanguage.exe program placed in the directory of installed package. The program for language switching is started by the command Start/Programs/ASIX/Select Language.Thanks to such solution the user can quickly and easily determine the language in which the target application will be executed, without the need of manual defining the proper section in the application INI file (as it was in the older version of the asix system) or package installation in the required language.

The operation of switching the language of the asix system consists in setting options in the following dialogue windows.

First of all, the user is asked for selecting the language version for the SelectLanguage.exe program.

Figure. ‘User Interface Language of ASKOM Applications’ Window -1.

The following windows have an informative character.

Figure. ‘User Interface Language of ASKOM Applications’ Window -2.

Figure. ‘User Interface Language of ASKOM Applications’ Window -3.

The selection of the user interface language of the asix system causes the projection of windows (all windows in programs and all messages including error descriptions) in the chosen language. Only the package documentation language is not switched – the documentation in PDF and HLP format files is accessible in the language in which the system was installed.

English application developing demands the asix system to be switched to English. Therefore, to make it possible for the user working on the package installed in Polish to develop an English application - the PDF file containing names of all operator actions, objects, units and functions in Polish along with English equivalents is accessible in the Polish documentation.

The essential meaning has language settings in two below windows - the first window determines the language version for the user who is currently logged in to the operating system, the second window determines operating system settings which will be obligatory for all the other users (if they don’t have their own individual settings).

Figure. ‘User Interface Language of ASKOM Applications’ Window - 4.

Figure. ‘User Interface Language of ASKOM Applications’ Window - 5.

Both cases make it possible for the user to determine the language with use of the following options:

- Language of operating system;

- Polish language;

- English language.

If the first option is selected (Language of operating system), then language depends on operating system settings. If Polish language is selected in the operating system, asix uses the Polish language. If any other language is selected, the asix system uses the English language.

If second or third option is selected, then selected language is in force independently of the language selected in the operating system.

At the end, the SelectLanguage program shows new settings for the currently logged user and global system settings that are to be confirmed. The settings for the currently logged user are taken into consideration as first. The system settings are obligatory in case of starting the asix program by other users who do not possess individual settings.

Figure. ‘User Interface Language of ASKOM Applications’ Window - 6.


7_9_Pattern

Home > 7_9_Pattern

7.9. Pattern Trends

The pattern trends are specific type of the archive, in which the data is collected only in the moment of application parameterization. There is a pattern written in it, which can be later retrieved, with any time shift. They are treated as an additional, read-only archive type, marked with letter P.

Pattern data is stored in database analogous to B-type archive. The best solution is to place the patterns in a separate database, treated as a separate ASPAD program resource. It is possible to place B and P archives in the same database, but it’s not recommended.


7.10. Aggregation of Archival Data

Since the version 6 the asix system has been equipped with built-in Aggregator module for calculating and archiving statistical data. The aggregated data is retrieved from the asix server and made available to programs those get the data by the AsixConnect module (those programs are: AsTrend, AsAlarm, AsScripter).

Such approach significantly improves speed of charting and flexibility of the display, e.g. AsTrend automatically selects the aggregate period according to the charted time period.

Aggregator reads the raw data, calculates aggregates and record them in an archive of aggregated data.

Aggregator allows to caclulate aggregates at the moment of data readout. On the basis of raw data and recorded aggregated data - Aggregator calculates aggregates also for other (not archived) periods.

The archive of aggregated data is stored in binary files of internal format.


4.3. Creating an XML - application configuration

Creating the XML configuration file for the application is the first step preceding the stage of variable definitions base configuration and application configuration.

The parameter configuring the application operation and declaring the database, which shall be the basis for application operation are saved to one shared XML file (Extensible Markup Language), placed in the root directory of the designed application.


4.4. Creating a Variable Definitions Database

In asix system the variable definitions database is the space for storing of all information on process variables. Each variable identified by unique Name is assigned to one record in the variable definitions database; the fields of this record contain the values of so-called variable attributes. The attribute list includes mandatory, optional and user-defined items. The mandatory attributes are e.g. variable description unit, channel number for communication with the object, archiving parameters. The optional attributes are e.g. limits, format, ranges. Furthermore, the user may also create their own text attributes, individual for each project, e.g. KKS or assembly data.

VarDef system supports Microsoft SQL Server 2000/2005/2008 databases and MDB (Jet/Microsoft Access) databases. In order to migrate the application from earlier asix versions, the variable definitions may be converted from Paradox database or text files to the MSQL or Jet database.

Architect module provides a full support of VarDef database in Jet or MS SQL format. In this regard, it combines the functionality of two separate programs applied previously for creating and editing the variable definitions databases: Variable Database Manager and Variable Database Editor (used in the older asix versions). Those applications are still included in asix suite to enable the use of the older database version.


4.5. Creating the Visual Masks

At the moment when at last the process variable naming and the archived variable naming have been established, you may begin designing the visualization part of the application. In this purpose AS32 program should be started in designer mode.

Under Windows system a shortcut for AS32.exe should be created. (See: 3.2. Starting asix).

The application may be also run in designer mode during Architect module operation with use of Run Asix System - Constructor command from File menu.

Every application has its fundamental part, the set of visual masks defined for graphic presentation of the controlled process. In general, designing the mask consists of two stages:

• defining the general parameters such as: size, position, activation mode;

• inserting the static and dynamic objects to the mask designed to illustrate the process status and possibly to initiate control operations.

The masks designing is the main activity to be done when creating applications. For details, please refer to the next chapters.


4.6. Selecting the Application Handling Mode

Apart from the creation of visual masks, a very important problem in the application is to ensure its proper logic structure. This procedure is limited to determine the mode of switching between the masks. Although the AS32 program gives certain switching possibilities, they are regarded as auxiliaries only.

The designer may influence the mode of application handling by rendering accessible for operator the so-called "operator actions". Among the variety of actions, the most important ones for this stage of designing there are the opening and closing mask's actions. The designer must define two elements:

  • full contents of the action,

  • mode of execution of the action.

In application mode, the actions can be performed by clicking the mouse at the appropriate position on the mask or by pressing the appropriate combination of keys on the keyboard. The first mode requires from the designer to place BUTTON class objects with their actions defined properly on the mask. The another mode requires setting the parameters, which may be done in two ways. If the action is already defined in the BUTTON object, an alternative key combination may be assigned to it at the same time (in the definition of the object). The another method that uses the keyboard requires the so-called keyboard shortcuts sets to be used. These are the application components, that connect various key combinations with operator actions. Such arranged sets can be combined with the masks. The feature of the use of the keys (in both versions) is that the combinations selected are active during the full period of the mask presence (to which they have been inserted) on the screen. It is unimportant which mask is active.

The next component to be defined is the initial condition i.e. the masks, which are to be opened at the start up of the application:

You should use the Mask paths which should be opened automatically at application start-up option in:

Architect program > Fields and Computers > Masks > Files and directories tab


4.7. Defining the parameters of the application

The last step required to complete the full description of the application is to define the parameters necessary for operating the various AS32 program subsystems. As a rule, such parameters are defined in text files.

There are the components that require setting parameters:

• Alarm handling system

You should define alarm definitions base:

Architect program > Databases > Alarm definitions base

You should declare paramaters for alarm handling system:

Architect program > Fields and Computers > Alarms system

For more detaled information see:

the chapter 13. Alarm System,

the Architect user’s manual, chapter 3.9. Configuration of alarm system

• Reports

Definitions of reports prepared in text files. Configuration of report definition handling is performed by means of Architect program.

For more detaled information see:

the chapter 14. Report Generation Module,

the Architect user’s manual, chapter 3.13. Declaration of report definition handling

• Trend handling

Configuration consists in generating the set of trends with the AsTrend program.

For more detaled information see:

the AsTrend user’s manual

• Application operation parameters

For more detaled information see:

the Architect user’s manual, chapter 3. Configuration of asix system application


4.8. Running the Application

The last step, that has to be made is starting the AS32 program in application mode. Under Windows system a shortcut has to be created with the adequate asix icon.

The AS32.exe program start parameter is a name of the existing application configuration file.

Three methods of application starting up, which vary in the mode of process data capturing, may be established. They allow testing the application components gradually.

Internally Simulated Data

First stage of testing the created application. To do that, no other program is needed, except for the AS32 program. To disable the operation of ASMEN and ASPAD programs, the Simulation parameter should be switched on:

Architect > Fields and Computers > Current data module > Standard tab > Simulation parameter

Architect > Fields and Computers > Historical data module > Standard tab > Simulation parameter

This method of starting permits the logic structure of the application (mode of mask switching) to be verified.

Data Simulated by ASMEN

The next stage uses the data obtained from ASMEN. Now it is necessary to have fully defined process data. Setting the transmission channels to NONE type causes that ASMEN does not accept on-line data but produces the data simulated internally. Additionally you may set a particular simulation mode for each variable to follow its predicted characteristic. At this stage you may run ASPAD to archive the simulated data.

The data simulation stage performed by ASMEN is the last one to be accomplished directly on the designer’s computer without accessing the industrial process. At this stage, testing of compliance between the ASMEN process variable definitions and the process mask variables is mainly carried out.

On-line Data of the Industrial Process

This is the final step of application creation. The ASMEN’s transmission channels are configured for on-line retrieving the process data. Obviously, it is related to a proper hardware configuration. What it remains is to verify if the ASMEN process data have been properly defined or not (if they address proper data at the controller memory).

There can be the following optional parameters entered in the application’s batch line:

  • /RESET – it causes operating system to be rebooted in case of the program failure;

  • /number_of_seconds – it declares, that the program will be started with the delay specified in the parameter. It may be useful, when the program is run from “system autostart” and the time for the operating system to load completely is needed. During the program startup following window will be displayed on the screen:

Figure. ‘Start Delay’ Window.

  • /PROTECT – it causes default activation of dynamic protection system at the as32.exe program start. See: 10.8. System Protections.

NOTICE: The parameters can be entered in the application’s batch line in optional order.


The function of writing the variable used in object to the

Home > The function of writing the variable used in object to the

The function of writing the variable used in object to the clipboard enables copy of variable names used in objects which are located on synoptic masks. Saved variables can be pasted in the window of AsTrend chart.

REMARK: This function works only in runtime mode of the mask.

To copy a variable to the clipboard, you have to indicate the correct object by mouse cursor and press the Ctrl + C key combination.


There are options in mask parameterization window for adjusting

Home > There are options in mask parameterization window for adjusting

There are options in mask parameterization window for adjusting mask size to the screen size. The location and size of objects on such a mask is unchangeable apart from the current size of the mask. The function may be used for large masks with sliders, which are displayed on screens differ in size – then size of the mask adjust to the size of monitor screen, displaying only the area that fits on the screen.

Adjust Size Right – if you set the option, the width of the mask will be scaled to the width of the screen.

Adjust Size Bottom - if you set the option, the height of the mask will be scaled to the height of the screen.


Asix.Evo_Expressions_and_Functions

Home > Asix.Evo_Expressions_and_Functions

Table of Contents

1 Using Expressions and Functions

2 Expression Syntax

2.1. Expression Elements

2.1.1. Numbers

2.1.2. Texts

2.1.3. Constants

2.1.4. Identifiers

2.1.5. Function Calls

2.2. Operators

2.2.1. ~ ! - (unary)

2.2.2. * / %

2.2.3. + -

2.2.4. < <= > >=

2.2.5. == !=

2.2.6. &

2.2.7. ^

2.2.8. |

2.2.9. &&

2.2.10 ||

2.2.11. ?:

3 Calculating Expressions

3.1. Value Types and Conversion

3.2. Context of Use

3.3. Expression Diagnostics

4 List of Functions

5 Function Descriptions

5.1. AbsToRelX

5.2. AbsToRelY

5.3. AlarmsControler

5.4. AlarmsCount

5.5. AlarmsGroupState

5.6. AlarmsMode

5.7. ApplicationChanged

5.8. Asix6Attribute

5.9. Asix6Limit

5.10 Attribute

5.11 CheckStateMask

5.12 CheckStateTemplate

5.13 Color

5.14 Concat

5.15 Cos

5.16 DeadBand

5.17 DelayedState

5.18 E

5.19 Evaluate

5.20 ExistsAttribute

5.21 Format

5.22 FromAsix6Date

5.23 FromAsix6Time

5.24 GetStateDescription

5.25 GetStateText

5.26 HasRole

5.27 HasWaitingControl

5.28 HorizonAggregate

5.29. IsActive

5.30. IsAlarm

5.31. IsAlarmExcluded

5.32. IsAlarmUnaccepted

5.33. IsAltPressed

5.34. IsBlinkOff

5.35. IsBrowser

5.36. IsControlPressed

5.37. IsDiagramActive

5.38. IsDiagramOpened

5.39. IsMouseOver

5.40. IsMousePressed

5.41. IsSelected

5.42. IsShiftPressed

5.43. IsWorking

5.44. LastKeyPressed

5.45. Log

5.46. LocalProperty

5.47. Log10

5.48. NewValue

5.49. OPCTime

5.50. Parameter

5.51. PI

5.52. Pow

5.53. Property

5.54. RangeAggregate

5.55. RateOfChange

5.56. RawValue

5.57. RelToAbsX

5.58. RelToAbsY

5.59. Replace

5.60. Round

5.61. Sin

5.62. Sqrt

5.63. Substring

5.64. TableElement

5.65. TableLength

5.66. Tan

5.67. Text

5.68. ToAsix6Date

5.69. ToAsix6Time

5.70. ToBool

5.71. ToDateTime

5.72. ToDouble

5.73. ToFullPath

5.74. ToInt8

5.75. ToInt16

5.76. ToInt32

5.77. ToInt64

5.78. ToSingle

5.79. ToTimeSpan

5.80. ToUInt8

5.81. ToUInt16

5.82. ToUInt32

5.83. ToUInt64

5.84. Variable

5.85. VarIsGood

5.86. VarIsNotGood

5.87. VarStatus

5.88. VarStringValue

5.89. VarTime

5.90. XOnScreen

5.91. XorColor

5.92. YOnScreen


Home > 2 Creating Object Controls

2 Creating Object Controls


001

Home > 001


031

Home > 031


032

Home > 032


037

Home > 037


038

Home > 038


042

Home > 042


043

Home > 043


044

Home > 044


Asix.Evo_Getting_Started

Home > Asix.Evo_Getting_Started

Table of Contents

1. Introduction

1.1. System Requirements

1.2. Installation

2. First Application

2.1. Developing a New Application

2.2. Clock Diagram Edition

2.3. Editing Start-up Window

2.4. Setting Start-up Parameters

2.5. Security Settings

2.6. Creating a Shortcut

2.7. Starting the Application

2.8. Running the Application in the Browser Mode

3. Application Supporting Actual Data Handling

3.1. Creating Application with Wizard

3.1.1. Application Location and Languages Selection

3.1.2. Application Template

3.1.3. Workstation Configuration

3.1.4. Specifying the Method of Process Data Collection

3.1.5. Process Variable Database Declaration

3.1.6. Data Source Configuration

3.1.7. Alarm System Parameterization

3.1.8. Other Settings

3.2. Configuration Overview

3.3. Communication Test - Variable Preview Panel

3.4. Creating Application Windows and Diagrams

3.4.1. Creating Window

3.4.2. Creating Diagrams

3.4.3. Signalling Exceeded Limits

3.4.4. Adding Diagram Parameters

3.4.5. Entering Templates

3.5. Adding Terminal Workstation

4. Application with Alarm Handling

4.1. Alarm System Parameterization

4.2. Active Alarm Table Displaying


Home > 1 Starting the Programme and Switching the Operation Modes

1 Starting the Programme and Switching the Operation Modes


Home > 2 Editing Properties

2 Editing Properties


Home > 3 Editing Windows and Diagrams

3 Editing Windows and Diagrams


Asix.Evo_Objects

Home > Asix.Evo_Objects

Table of Contents

1 Log Viewer Object

2 Keyboard Object

3 Messages Object

4 The Chart Controller Object

5 Shape Object

6 Line Object

7 Gauge Object

8 Picture Object

9 Authorization Box Object

10 Web Browser Object

11 Button Object

12 Pipe Object

13 Bar Object

14 Active Alarms Viewer Object

15 Historical Alarms Viewer Object

16 Variable Table Object

17 Conveyor Object

18 Text Object

19 Polygon Object

20 Chart Object

21 Tank Object


Work Point

Home > Work Point

25 Work Point Object

Object Functions

The Work Point object is used to visualize the position of 'work point', computed as a function of two values of X and Y coordinates. The position of Work Point can be displayed on the image background being the part of the object or on the background of other objects. The value calibration can be displayed within the object.

The position of Work Point can be displayed with the use of one of predefined coursors or any image. Drawing the trail of work point position last changes is also possible.

Fig. Examples of Work Point.

Properties

See: Standard Properties of Objects (Asix.Evo_Visualization_Elements.PDF/CHM)

Basic Properties

Name | Value Type | Description
Value X | Number | The value of work point X coordinate. The position on the screen is calculated taking into account the properties: Minimum X Value and Maximum X Value. If the calibrations are displayed, the work point is shifted on all area of the object. Otherwise, the area occupied by the calibration is omitted.
Minimum X Value | Number | The value corresponding to the extreme left position of the work point.
Maximum X Value | Number | The value corresponding to the extreme right position of the work point.
Value Y | Number | The value of work point Y coordinate. The position on the screen is calculated taking into account the properties: Minimum X Value and Maximum X Value.
Minimum Y Value | Number | The value corresponding to the extreme bottom position of the work point.
Maximum Y Value | Number | The value corresponding to the extreme upper position of the work point.
Pointer style | Enumerated type: None, Cross, X, Round, Picture | Specifies the pointer display method. The pointer is used to present the current position of the work point. The Picture value means using any image declared in the Pointer picture property.
Pointer size [%] | Number | Specifies what percentage of the object work area the pointer occupies. The value of 0 means using the pointer of fixed size - that is unchanged when you resize the object.
Trail points count | Number | Specifies the number of points of the trail of work point position changes.
Line Width | Number | Specifies the thickness of the trail line of the work point position changes.
Allow clearing points | Logical | Specifies whether the clicking in the area of the object will be clearing the trail of work point position changes during the object operation.
Show X calibration | Logical | Specifies whether the horizontal calibration of the working area is drawn.
Show Y calibration | Logical | Specifies whether the vertical calibration of the working area is drawn.
Font | Font Name | The system name of the font used to display the value of the work point calibration divisions.
Font style | Multiple enumerated type: Regular, Bold, Italic, Underline, Strikeout | Determines the used font style. Multiple styles can be used simultaneously.
Divisions Count X | Number | Specifies the number of major divisions on the horizontal calibration of the working area.
Subdivisions Count X | Number | Specifies the number of minor divisions between each pair of major divisions on the horizontal calibration.
Divisions Count Y | Number | Specifies the number of major divisions on the vertical calibration of the working area.
Subdivisions Count Y | Number | Specifies the number of minor divisions between each pair of major divisions on the vertical calibration.

State Properties

Name | Value Type | Description
Pointer Color | Color | Specifies the color of the work point current position pointer.
Pointer picture | Picture name | Specifies the name of picture used as the work point current position pointer. The picture must be contained in the application picture library.
Trail color | Color | Specifies the color of the trail line of the work point position changes.
Background color | Color | Specifies the object background color (the area occupied by the calibration).
Background picture | Picture name | Specifies the name of the picture that appears as the object background. The picture must be contained in the application picture library.
Canvas color | Color | Specifies the color of the object working area. If the pointer is displayed on the other object background, the Transparent color should be selected.
Calibration color | Color | Specifies the calibration color.

Events

See: Standard Events of Objects (Asix.Evo_Visualization_Elements.PDF/CHM)


Home > 4 Description of operator actions

4 Description of operator actions


IApplication Interface

Home > IApplication Interface

5.1 IApplication Interface

The IApplication interface provides one method connected with the script reports system.


Report Class Properties

Home > Report Class Properties

5.2.1 Properties

Footer

ReportFooter Footer { get; }

ReadOnly Property Footer As ReportFooter

This property returns the footer object of the report page.

Header

ReportHeader Header { get; }

ReadOnly Property Header As ReportHeader

This property returns the header object of the report page.

MigraDocument

MigraDoc.DocumentObjectModel.Document MigraDocument { get; }

ReadOnly Property MigraDocument As MigraDoc.DocumentObjectModel.Document

This property returns the Document object of the MigraDoc library. This object is created at the moment of the Report class object generation.

MigraSection

MigraDoc.DocumentObjectModel.Section MigraSection { get; }

ReadOnly Property MigraSection As MigraDoc.DocumentObjectModel.Section

This property returns the Section object of the MigraDoc library. The section is created at the moment of the Report class object generation. It is the main section of the document in which all report components will be inserted.


ReportChart Class Methods

Home > ReportChart Class Methods

5.17.2 Methods

AddLegend

void AddLegend(ReportChartLegendPosition aPosition, string aStyle);

Sub AddLegend(ByVal aPosition As ReportChartLegendPosition, ByVal aStyle As String)

This method is used to add to the chart a legend describing the data series inserted in the chart.

The aPosition parameter specifies the position of the legend. The following values are available:

ReportChartLegendPosition.Bottom - below the chart area

ReportChartLegendPosition.Top - above the chart area

ReportChartLegendPosition.Left - left of the chart area

ReportChartLegendPosition.Right - right of the chart area

The aStyle parameters specifies the style name for the text inserted in the chart generated.

AddSeries

ReportChartSeries AddSeries(stringaName, MigraDoc.DocumentObjectModel.Shapes.Chart.ChartType aChartType, string aVarName, string aAggrName,MigraDoc.DocumentObjectModel.Color aColor, MigraDoc.DocumentObjectModel.Color aFillColor);

Function AddSeries(ByVal aName As String, ByVal aChartPar As MigraDoc.DocumentObjectModel.Shapes.Charts.ChartType, ByVal aVarName As String, ByVal aAggrNameAs String, ByVal aColor As MigraDoc.DocumentObjectModel.Color, ByVal aFillColor As MigraDoc.DocumentObjectModel.Color) As ReportChartSeries

This method is used to add a data series to the chart generated on the basis of archival data of process variables.

The aName parameter specifies the data series name. The data series name is used in the chart legend.

The aChartType parameter defines the way the data series is displayed. It is possible to mix series of different types in one chart, but not all combinations are permitted.

The aVarName and aAggrName parameters define the name of the process variable and the name of the aggregate calculated.

The aColor parameter specifies the line colour for drawing data series, while the aFillColor defines the colour of the background fill (used for some series types, such as in a bar chart).

ReportChartSeries AddSeries(stringaName, MigraDoc.DocumentObjectModel.Shapes.Chart.ChartType aChartType, string aFieldName, MigraDoc.DocumentObjectModel.Color aColor, MigraDoc.DocumentObjectModel.Color aFillColor);

Function AddSeries(ByVal aName As String, ByVal aChartPar As MigraDoc.DocumentObjectModel.Shapes.Charts.ChartType, ByVal aFieldName As String, ByVal aColor As MigraDoc.DocumentObjectModel.Color, ByVal aFillColor As MigraDoc.DocumentObjectModel.Color) As ReportChartSeries

This method is used to add a data series to the chart generated on the basis of data transferred at the moment of the chart generation (through the object of the DataTable or ICollection type).

The aChartType parameter defines the way the data series is displayed. It is possible to mix series of different types in one chart, but not all combinations are permitted.

The aFieldName parameter defines the name of the component used by the series. It is the name of the column in the object of the DataTable type or the property name of the objects transferred in ICollection.

The aColor parameter specifies the line colour for drawing data series, while the aFillColor defines the colour of the background fill (used for some series types, such as in a bar chart).

AddXSeries

void AddXSeries(string aFieldName);

Sub AddXSeries(ByVal aFieldName As String)

This method specifies the data series used to describe the chart X axis. The aFieldName parameter defines the name of the component used by the X axis series. It is the name of the column in the object of the DataTable type or the property name of the objects transferred in ICollection.

This command is used only for charts based on data collections. For charts based on historical data, the X axis is always the time axis.

CustomizeXAxis

void CustomizeXAxis(MigraDoc.DocumentObjectModel.Color aLineColor, string aStyle, string aFormat, int aTickDensity);

Sub CustomizeXAxis(ByVal aLine As MigraDoc.DocumentObjectModel.Color, ByVal aStyle As String, ByVal aFormat As String, ByVal aTickDensity As Integer)

This method is used to define the way for the generation of the chart X axis.

The aLineColor parameter specifies the axis line colour. The aStyle parameter defines the style name used to generate texts describing the axis scale. The aFormat parameter defines formatting (value to text conversion) of the X axis values. The aTickDensity parameter specifies the density of axis descriptions. The value set to 1 means that all axis points will have descriptions. Values greater than 1 denote the interval between subsequent points to which descriptions will be affixed.

CustomizeYAxis

void CustomizeYAxis(double? aMinValue, double? aMaxValue, double? aTickValue, bool aHasGridLines, MigraDoc.DocumentObjectModel.Color aLineColor, string aStyle, string aFormat);

Sub CustomizeYAxis(ByVal aMinValue As Double?, ByVal aMaxValue As Double?, ByVal aTickValue As Double?, ByVal aHasGridLines As Boolean, ByVal aLine As MigraDoc.DocumentObjectModel.Color, ByVal aStyle As String, ByVal aFormat As String)

This method is used to define the way for the generation of the chart Y axis.

The aMinValue, aMaxValue and aTickValue parameters are used to define the way for the Y axis description. They represent respectively: the scale minimum value, maximum value and the interval between subsequent descriptions on the axis scale. The values null (Nothing) used mean automatic scaling of the Y axis.

The aHasGrdiLines parameter defines whether horizontal value grid lines should be placed on the chart. The aLineColor parameter specifies the axis and grid line colour.

The aStyle parameter defines the style name used to generate texts describing the axis scale. The aFormat parameter defines formatting (value to text conversion) of the X axis values.

GenerateContent

void GenerateContent ();

Sub GenerateContent ()

This method is used to generate a complete chart content on the basis of the data available. The use of this command is not obligatory. The Render method of the Report class executes automatically the GenerateContent method for all the charts for which this method has not yet been executed.

SetQueryData

void SetQueryData(DateTime aStartTime, DateTime aStartTime, TimeSpan aAggrInterval);

Sub SetQueryData(ByVal aStartTime As Date, ByVal aEndTime As Date, ByVal aAggrInterval As System.TimeSpan)

This method defines the parameters of a query for data in case of the charts generated on the basis of archival data of process variables.

The aStartTime and aEndTime parameters specify the start and end times of a query for data. The aAggrInterval parameter defines the data aggregation period.

SetXAxisTitle

void SetXAxisTitle(string aTitle, string aStyle);

Sub SetXAxisTitle(ByVal aTitle As String, ByVal aStyle As String)

This method is used to define the description of the chart X axis. The aTitle parameter defines the axis description, while the aStyle parameter defines the style name.

SetYAxisTitle

void SetYAxisTitle(string aTitle, string aStyle);

Sub SetYAxisTitle(ByVal aTitle As String, ByVal aStyle As String)

This method is used to define the description of the chart Y axis. The aTitle parameter defines the axis description, while the aStyle parameter defines the style name.


ReportTableColumn Class Properties

Home > ReportTableColumn Class Properties

5.11.1 Properties

AggrName

string AggrName { get; set;}

Property AggrName As String

This property defines the aggregate name of the historical values of a process variable.

Callback

CellCallback Callback { get; set; }

Property Callback As CellCallback

This property defines the callback function which will be executed for each value cell at the moment of its content generation. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ColumnAltStyle

string ColumnAltStyle { get; set;}

Property ColumnAltStyle As String

This property specifies the style name for a value cell in the even rows of the table.

ColumnStyle

string ColumnStyle { get; set;}

Property ColumnStyle As String

This property specifies the style name for a value cell.

ErrorMode

ReportTableCellErrorBehavior ErrorMode { get; set; }

Property ErrorMode As ReportTableCellErrorBehavior

This property defines the way for the generation of content in value cells in which there is no data or whose status is incorrect. Detailed indications for use can be found in the description of the AddColumn method of the ReportTable class.

ErrorStyle

string ErrorStyle { get; set;}

Property Errortyle As String

This property specifies the style name for value cells with incorrect data status.

Format

string Format { get; set;}

Property Format As String

This property defines formatting of the values displayed in the column cells.

HeaderStyle

string HeaderStyle { get; set;}

Property HeaderStyle As String

This property specifies the style name for the column header cell.

HeaderText

string HeaderText { get; set;}

Property HeaderText As String

This property defines the text displayed in the column header row.

ItemName

string ItemName { get; set;}

Property ItemName As String

Depending of the context of its use, this property defines:

- the name of the process variable whose archival values are read,

- the name of a special column,

- the name of the data collection field transferred to the table.

MigraColumn

MigraDoc.DocumentObjectModel.Column MigraColumn { get; }

ReadOnly Property MigraColumn As MigraDoc.DocumentObjectModel.Column

This property returns the base object of the table column of the MigraDoc library.

ReportTable

ReportTable ReportTable { get; }

ReadOnly Property ReportTable As ReportTable

This property returns the object of the table which the column belongs to.

Width

int Width { get; set;}

Property Width As Integer

This property specifies the column width expressed in millimeters.


Home > 2. Examples of Typical Scripts

2. Examples of Typical Scripts


3.1.1.9. CurrentUserRoles

Home > 3.1.1.9. CurrentUserRoles

3.1.1.16. CurrentUserRoles

string CurrentUserRoles { get; }

ReadOnly Property CurrentUserRoles As String

The property returns the names of all roles to which the currently logged user is assigned. The role names are returned in the form of a single text in which individual names are separated by commas. If only checking whether the user is assigned to a particular role is required, it is easier to use the HasRole function.


3.1.1.12ExecutionContext

Home > 3.1.1.12ExecutionContext

3.1.1.17. ExecutionContext

IContext ExecutionContext { get; }

ReadOnly Property ExecutionContext As IContext

This property returns a reference to the object implementing the IContext interface. This interface contains properties that define the context of the script call. The call context is particularly important for the interactive scripts started within the event handling of the visualization objects. On the basis of a context, it is possible to load e.g. the object main variable name.


3.3. IVariable Interface

Home > 3.3. IVariable Interface

3.4. IVariable Interface

The IVariable interface allows obtaining information concerning the variable definition and its current value, a readout of archival values, active monitoring of the current value changes and sharing a variable value recording method.

The reference to the IVariable interface for the selected alarm variable can be obtained by calling the GetVariable from the IApplication interface.


3.5.2. Properties

Home > 3.5.2. Properties

3.5.1. Properties

FormattedValue

             string FormattedValue { get; }

            ReadOnly Property FormattedValue As String

This property returns the text value of the process variable created based on the format defined in the variable definition database.


3.6.1.1. ErrorDescription

Home > 3.6.1.1. ErrorDescription

3.7.1.1. ErrorDescription

string ErrorDescription { get; }

            ReadOnly Property ErrorDescription As String

This property returns the text describing an archival data readout error (when the ResultStatus property is equal to ArcResultStatus.Error).


3.6.1.2. Query

Home > 3.6.1.2. Query

3.7.1.2. Query

ArcQuery Query { get; }

ReadOnly Property Query As ArcQuery

This property returns the ArcQuery class object from which the archival data readout parameters can be read, used in the OrderArcData function.


3.6.1.3. ResultStatus

Home > 3.6.1.3. ResultStatus

3.7.1.3. ResultStatus

ArcResultStatus ResultStatus { get; }

ReadOnly Property ResultStatus As ArcResultStatus

This property returns the current progress for the historical data reading operation. The enumeration type of ArcResultStatus may have the following values:

· Processing - the data reading operation is in progress

· Ready - the data reading operation has been completed successfully

· Error - the data reading operation has been completed with an error


3.6.1.4. Values

Home > 3.6.1.4. Values

3.7.1.4. Values

ArcVariableState[ ] Values { get; }

ReadOnly Property ArcVariableState As ArcVariableState( )

This property returns the historical trend points array, which is obtained by executing the OrderArcData function.


3.6.1.5. VariableName

Home > 3.6.1.5. VariableName

3.7.1.5. VariableName

string VariableName { get; }

            ReadOnly Property VariableName As String

This property returns the name of the variable for which the historical data are read.


3.6.2.1. CancelQuery

Home > 3.6.2.1. CancelQuery

3.7.2.1. CancelQuery

void CancelQuery( );

Sub CancelQuery ( )

The CancelQuery method allows to stop the historical data reading operation in progress.


3.6.2.2. RegisterQueryResultEvent

Home > 3.6.2.2. RegisterQueryResultEvent

3.7.2.2. RegisterQueryResultEvent

void RegisterQueryResultEvent(ArcQueryResultEvent aFunction);

Sub RegisterQueryResultEvent(ByVal aFunction As ArcQueryResultEvent)

This function is used to register the callback function to be called when the historical data reading operation is completed. The aFunction parameter specifies the callback function - it must be compatible with the ArcQueryResultEvent delegate.

delegate void ArcQueryResultEvent(IArcQueryResult aQueryResult);

Delegate Sub ArcQueryResultEvent(ByVal aQueryResult As IArcQueryResult)

The reference to the IArcQueryResult interface is transferred through the aQueryResult parameter to the callback function which was performed in the context of this interface.

The function of waiting for the completion of the reading can be unregistered by using the UnregisterQueryResultEvent method.

Example:

C#

IApplication application;

void ArcQueryFun(IArcQueryResult aQueryResult)

{

if (aQueryResult.ResultStatus == ArcResultStatus.Error)

application.ReportMessage(EvoMessageType.Error, "OrderArcData error: " +

aQueryResult.ErrorDescription);

else

{

foreach (ArcVariableState v in aQueryResult.Values)

application.ReportMessage(EvoMessageType.Error, v.TimeStamp.ToString() +

": " + v.Value.ToString());

}

application.TerminateScript(true);

}

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

IVariable iv = aApplication.GetVariable("A004", false);

IArcQueryResult qr = iv.OrderArcData(new ArcQuery(DateTime.Today,

DateTime.Now,"average",TimeSpan.FromMinutes(15)));

if (qr.ResultStatus == ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, "OrderArcData error: " +

qr.ErrorDescription);

else

qr.RegisterQueryResultEvent(ArcQueryFun);

return false;

}

VB

Dim application As IApplication

Sub QueryArcFun(aQueryResult As IArcQueryResult)

If (aQueryResult.ResultStatus = ArcResultStatus.Error)

application.ReportMessage(EvoMessageType.Error, _

"OrderArcData error: " + aQueryResult.ErrorDescription)

Else

For Each v As ArcVariableState In aQueryResult.Values

application.ReportMessage(EvoMessageType.Error, _

v.TimeStamp.ToString() + ": " + v.Value.ToString())

Next v

End If

application.TerminateScript(True)

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication

Dim iv As IVariable

iv = aApplication.GetVariable("A004", False)

Dim qr As IArcQueryResult

qr = iv.OrderArcData(New ArcQuery(Date.Today, Date.Now, _

"average", TimeSpan.FromMinutes(15)))

If (qr.ResultStatus = ArcResultStatus.Error)

aApplication.ReportMessage(EvoMessageType.Error, _

"OrderArcData error: " + qr.ErrorDescription)

Else

qr.RegisterQueryResultEvent(AddressOf QueryArcFun)

End If

Return False

End Function

The ArcQuery class object transmitted in the call of the OrderArcData method reads out the 15-minute average values from the period since the beginning of a day until the current moment. If the initiation of reading operation is successful, the ArcQueryFun function will be registered and executed at the operation completion. The record to the message log is done within the ArcQueryFun callback function for all the historical values that have been returned by the Values property of object of IArcQueryResult class transferred by the function call. Then, the script running is completed.


3.6.2.3. UnregisterQueryResultEvent

Home > 3.6.2.3. UnregisterQueryResultEvent

3.7.2.3. UnregisterQueryResultEvent

void UnregisterQueryResultEvent();

Sub UnregisterQueryResultEvent()

Unregistering the function being in progress, which was previously registered using the RegisterQueryResultEvent function.


3.6.2.4. Wait

Home > 3.6.2.4. Wait

3.7.2.4. Wait

bool Wait();

Function Wait() As Boolean

This function suspends running of the script until the historical data read operation is completed. This function is provided with a 5-minute waiting time limit. If the data is not read within this time, the function returns false.

An alternative to the Wait function is to use the Sleep function of the IApplication interface combined with the QueryResult status monitoring.


3.7.1.1. IsBad

Home > 3.7.1.1. IsBad

3.8.1.1. IsBad

             bool IsBad { get; }

ReadOnly Property IsBad As Boolean

This property determines whether a variable value status is incorrect.


3.7.1.2. IsGood

Home > 3.7.1.2. IsGood

3.8.1.2. IsGood

             bool IsGood { get; }

ReadOnly Property IsGood As Boolean

The property determines whether a variable value status is correct.


3.7.1.3. IsUncertain

Home > 3.7.1.3. IsUncertain

3.8.1.3. IsUncertain

             bool IsUncertain { get; }

ReadOnly Property IsUncertain As Boolean

The property determines whether a variable value status is uncertain.


3.7.1.4. Status

Home > 3.7.1.4. Status

3.8.1.4. Status

             public StatusOpc Status { get; }

            ReadOnly Property Status As Askom.Ascent.StatusOpc

This property returns the detailed status of process variable value in the convention of the OPC communication interface. In the case of simple tests of variable status, it is recommended to use the IsGood, IsBad and IsUncertain properties.


3.7.1.5. TimeStamp

Home > 3.7.1.5. TimeStamp

3.8.1.5. TimeStamp

             DateTime TimeStamp { get; }

            ReadOnly Property TimeStamp As Date

This property returns the time stamp of the historical value.


3.7.1.6. Value

Home > 3.7.1.6. Value

3.8.1.6. Value

             object Value { get; }

            ReadOnly Property Value As Object

This property returns the historical value of the process variable registered at the time specified by the TiemStamp property.


3.8.1.1. AlarmState

Home > 3.8.1.1. AlarmState

3.9.1.1. AlarmState

AlarmState AlarmState { get; }

            ReadOnly Property AlarmState As AlarmState

This property returns an object of AlarmState class from which the information regarding the current state of the alarm monitored via the reference to the IAlarm interface can be read out. If the active alarm log contains more than one event, the latest event status is returned.


3.8.1.2. Definition

Home > 3.8.1.2. Definition

3.9.1.2. Definition

AlarmProperties Definition { get; }

             ReadOnly Property Definition As AlarmProperties

This property returns an object of AlarmProperties class from which the information regarding the definition of the alarm monitored via the reference to the IAlarm interface can be read out.


3.8.1.3. Domain

Home > 3.8.1.3. Domain

3.9.1.3. Domain

            string Domain { get; }

            ReadOnly Property Domain As String

This property returns an alarm domain name which includes the alarm monitored via the reference to the IAlarm interface.


3.8.1.4. Id

Home > 3.8.1.4. Id

3.9.1.4. Id

             string Id { get; }

            ReadOnly Property Id As String

This property returns the ID of the alarm monitored via reference to the IAlarm interface.


3.8.2.1. Accept

Home > 3.8.2.1. Accept

3.9.2.1. Accept

bool Accept();

Function Accept() As Boolean

This method is used to acknowledge the alarm. It acts the same way as the alarm acknowledgement done by the operator using the alarm table. This function returns the initial execution status. A value of true means that the operation has been accepted for execution. Acknowledgement can not be completed due to failure in meeting conditions checked in later phases of the operation execution, such as lack of workstation permissions for acknowledge of the alarms of the domain.


3.8.2.2. Cancel

Home > 3.8.2.2. Cancel

3.9.2.2. Cancel

bool Cancel(params object[ ] aParameters);

bool Cancel(DateTime aEndTime, params object[ ] aParameters);

Function Cancel(ByVal ParamArray aParameters( ) As Object) As Boolean

Function Cancel(ByVal aEndTime As Date , ByVal ParamArray aParameters( ) As Object) As Boolean

This method allows reporting the alarm event termination. An optional aParameters parameter table is used to provide additional data related with the event. The significance of these data is entirely up to application designer. The call made using the aEndTime parameter allows explicit specification of the event time. If the call does not include the aEndTime parameter the event time is automatically set at the current moment. The method can be performed only for alarms that belong to an external alarm diagnosis strategy.

This function returns the initial execution status. A value of true means that the operation has been accepted for execution. However, the declaration may be ignored because of the failure in meeting conditions checked in later phases of the operation execution, e.g. the workstation is not an active domain controller and the normal external strategy (not global) has been used.


3.8.2.3. Raise

Home > 3.8.2.3. Raise

3.9.2.3. Raise

bool Raise(params object[ ] aParameters);

bool Raise(DateTime aStartTime, params object[ ] aParameters);

Function Raise(ByVal ParamArray aParameters( ) As Object) As Boolean

Function Raise(ByVal aStartTime As Date , ByVal ParamArray aParameters( ) As Object) As Boolean

This method allows reporting the alarm event beginning. An optional aParameters parameter table is used to provide additional data related with the event. The significance of these data is entirely up to application designer. The call made using the aStartTime parameter allows explicit specification of the event time. If the call does not include the parameter the event time is automatically set at the current moment. The method can be performed only for alarms that belong to an external alarm diagnosis strategy.

This function returns the initial execution status. A value of true means that the operation has been accepted for execution. However, the declaration may be ignored because of the failure in meeting conditions checked in later phases of the operation execution, e.g. the workstation is not an active domain controller and the normal external strategy (not global) has been used.


3.8.2.4. RegisterStateEvent

Home > 3.8.2.4. RegisterStateEvent

3.9.2.4. RegisterStateEvent

void RegisterStateEvent(AlarmEvent aFunction);

Sub RegisterStateEvent(ByVal aFunction As AlarmEvent)

This function is used to register the callback function to be called on every change of the controlled alarm state. This applies to both alarm beginning and termination events as well as status changes caused by the operator actions, such as the alarm acknowledgement.

The aFunction parameter specifies the alarm monitoring function - it must be compatible with the AlarmEvent delegate.

delegate void AlarmEvent(string aDomain, string aAlarm, AlarmState aAlarmState, AlarmEventType aEventType);

Delegate Sub AlarmEvent(ByVal aDomain As String, ByVal aAlarm As String, ByVal aAlarmState As AlarmState ,ByVal aEventType As AlarmEventType)

When the monitoring function is called the three parameters are transmitted to it. The aDomain and aAlarm parameters specify correspondingly the domain name and Alarm ID, which is concerned by the callback function call. The aAlarmState parameter forwards the object from which the current alarm state may be readout. The AEventType parameter specifies the type of event. The AlarmEventType enumeration type takes the following values: AlarmBegin (detection of the alarm beginning), AlarmEnd (detection of the alarm end), AlarmManagement (change of state resulting from the operator's actions, such as the alarm acknowledgement), DomainStart(activating the domain), DomainStop(stopping the domain).

The monitoring function can be unregistered using the UnegisterStateEvent method.

Example:

C#

IApplication application;

void AlarmFun(string aDomain, string aAlarm, AlarmState aAlarmState,

AlarmEventType aEventType)

{

// kod funkcji zwrotnej

if (aEventType == AlarmEventType.AlarmBegin)

application.ReportMessage(EvoMessageType.Info, aAlarm + ": alarm rozpoczęty");

}

public bool Initialize(string[] aParameters, IApplication aApplication)

{

application = aApplication;

IAlarm ia = application.GetAlarm("Blok1","DemoB1");

ia.RegisterStateEvent(AlarmFun);

return false;

}

VB

Dim application As IApplication

Sub AlarmFun(aDomain As String, aName As String, aAlarmState As AlarmState, aEventType As AlarmEventType)

' kod funkcji zwrotnej

If aEventType = AlarmEventType.AlarmBegin Then

application.ReportMessage(EvoMessageType.Info, aName & ": alarm rozpoczęty")

End If

End Sub

Public Function Initialize(ByVal aParameters() As String, ByVal aApplication As _

IApplication) As Boolean Implements IScript.Initialize

application = aApplication

Dim ia As IAlarm

ia = application.GetAlarm("Blok1", "DemoB1")

ia.RegisterStateEvent(AddressOf AlarmFun)

Return False

End Function

The above code creates the IAlarm object for the DemoB1 alarm from the Blok1 domain. Then, the AlarmFun monitoring function is recorded, which checks the type of event and records the information on alarm beginning events in the message log every time the alarm state is changed.


3.8.2.5. UnregisterStateEvent

Home > 3.8.2.5. UnregisterStateEvent

3.9.2.5. UnregisterStateEvent

void UnregisterStateEvent();

Sub UnregisterStateEvent()

Unregistering the alarm state monitoring function, which was previously registered using the RegisterStateEventfunction.


3.9.1.1. AcceptanceOperatorId

Home > 3.9.1.1. AcceptanceOperatorId

3.10.1.1. AcceptanceOperatorId

             string AcceptanceOperatorId { get; }

            ReadOnly Property AcceptanceOperatorId As String

This property returns the ID of the user who acknowledged the alarm event.


3.9.1.2. AcceptanceStationName

Home > 3.9.1.2. AcceptanceStationName

3.10.1.2. AcceptanceStationName

             string AcceptanceStationName { get; }

             ReadOnly Property AcceptanceStationName As String

This property returns the name of workstation on which the alarm event was acknowledged.


3.9.1.3. AcceptanceTimeStamp

Home > 3.9.1.3. AcceptanceTimeStamp

3.10.1.3. AcceptanceTimeStamp

             DateTime AcceptanceTimeStamp { get; }

             ReadOnly Property AcceptanceTimeStamp As Date

This property returns the time the alarm event was acknowledged by the user.


3.9.1.4. BeginDetectionTimeStamp

Home > 3.9.1.4. BeginDetectionTimeStamp

3.10.1.4. BeginDetectionTimeStamp

              DateTime BeginDetectionTimeStamp { get; }

             ReadOnly Property BeginDetectionTimeStamp As Date

This property returns the time at which the beginning of the alarm event was detected.


3.9.1.5. BeginExprValue

Home > 3.9.1.5. BeginExprValue

3.10.1.5. BeginExprValue

             object BeginExprValue { get; }

             ReadOnly Property BeginExprValue As Object

This property returns the value of the expression associated with the alarm, calculated at the alarm beginning detection.


3.9.1.6. BeginTimeStamp

Home > 3.9.1.6. BeginTimeStamp

3.10.1.6. BeginTimeStamp

             DateTime BeginTimeStamp { get; }

             ReadOnly Property BeginTimeStamp As Date

This property returns the time of the alarm event beginning


3.9.1.7. EndDetectionTimeStamp

Home > 3.9.1.7. EndDetectionTimeStamp

3.10.1.7. EndDetectionTimeStamp

             DateTime EndDetectionTimeStamp { get; }

             ReadOnly Property EndDetectionTimeStamp As Date

This property returns the time at which the end of the alarm event was detected.


3.9.1.8. EndExprValue

Home > 3.9.1.8. EndExprValue

3.10.1.8. EndExprValue

             object EndExprValue { get; }

             ReadOnly Property EndExprValue As Object

This property returns the value of the expression associated with the alarm, calculated at the alarm end detection.


3.9.1.9. EndTimeStamp

Home > 3.9.1.9. EndTimeStamp

3.10.1.9. EndTimeStamp

             DateTime EndTimeStamp { get; }

             ReadOnly Property EndTimeStamp As Date

This property returns the time of the alarm event end.


3.9.1.10FormattedBeginText

Home > 3.9.1.10FormattedBeginText

3.10.1.10 FormattedBeginText

             string FormattedBeginText { get; }

             ReadOnly Property FormattedBeginText As String

This property returns the text describing the beginning of the alarm event. All dynamically created inserts associated with the call parameters are generated within the text returned.


3.9.1.11FormattedEndText

Home > 3.9.1.11FormattedEndText

3.10.1.11. FormattedEndText

             string FormattedEndText { get; }

             ReadOnly Property FormattedEndText As String

This property returns the text describing the end of the alarm event. All dynamically created inserts associated with the call parameters are generated within the text returned.


3.9.1.12IsAccepted

Home > 3.9.1.12IsAccepted

3.10.1.12. IsAccepted

             bool IsAccepted { get; }

ReadOnly Property IsAccepted As Boolean

This property determines whether the alarm event has been acknowledged by the user.


3.9.1.13IsActive

Home > 3.9.1.13IsActive

3.10.1.13. IsActive

       bool IsActive { get; }

       ReadOnly Property IsActive As Boolean

This property determines whether the event entry relating to the alarm monitored by the object exists in the active alarm log. The value of false means that there is no information about the alarm and all the other properties of AlarmState object have indefinite values.


3.9.1.14IsExcluded

Home > 3.9.1.14IsExcluded

3.10.1.14. IsExcluded

             bool IsExcluded { get; }

ReadOnly Property IsExcluded As Boolean

This property determines whether the alarm is excluded from handling. The excluded alarms are not shown in the alarm tables, but their details are stored in the active alarm log and are available for use in the scripts.


3.9.1.15 IsFinished

Home > 3.9.1.15 IsFinished

3.10.1.15. IsFinished

             bool IsFinished { get; }

ReadOnly Property IsFinished As Boolean

This property determines whether the alarm stored in the active alarm log has already been ended. Depending on the configuration, the active alarm log is able to keep the details of the event that has already been ended. The alarm should be considered as active (not ended) if the IsActive property is true and IsFinished property is false.


3.9.1.16 WasFiltered

Home > 3.9.1.16 WasFiltered

3.10.1.16. WasFiltered

             bool WasFiltered { get; }

ReadOnly Property WasFiltered As Boolean

This property determines whether an alarm event recorded in the log was subjected to the time filter mechanisms.


3.10.1.1. Action

Home > 3.10.1.1. Action

3.11.1.1. Action

             string Action { get; }

ReadOnly Property Action As String

This property returns the contents of the operator action defined for the alarm.


3.10.1.2. DetectionParameters

Home > 3.10.1.2. DetectionParameters

3.11.1.2. DetectionParameters

             string DetectionParameters { get; }

ReadOnly Property DetectionParameters As String

This property returns the Detection parameters attribute of alarm definition. If the external alarm detection strategy is carried out by means of script mechanism, it is possible to use the DetectionParameters as the information source specifying how the alarm state is to be detected.


3.10.1.3. BeginText

Home > 3.10.1.3. BeginText

3.11.1.3. BeginText

             string BeginText { get; }

ReadOnly Property BeginText As String

This property returns the text describing the beginning of the alarm in the original form used in the alarm definition - formatting inserts {} are not converted.


3.10.1.4. EndText

Home > 3.10.1.4. EndText

3.11.1.4. EndText

             string EndText { get; }

ReadOnly Property EndText As String

This property returns the text describing the end of the alarm in the original form used in the alarm definition - formatting inserts {} are not converted.


3.10.1.5. Id

Home > 3.10.1.5. Id

3.11.1.5. Id

             string Id { get; }

ReadOnly Property Id As String

This property returns the ID of the alarm, which attributes are stored in the object.


3.10.1.6. IsStartOnly

Home > 3.10.1.6. IsStartOnly

3.11.1.6. IsStartOnly

             bool IsStartOnly { get; }

ReadOnly Property IsStartOnly As Boolean

This property returns information specifying if the alarm belongs to the notification category. Alarms of this category do not have the events assigned to their ends.


3.10.1.7. Priority

Home > 3.10.1.7. Priority

3.11.1.7. Priority

int Priority { get; }

ReadOnly Property Priority As Integer

This property returns the alarm priority (importance). The following values are available:

· 0 - critical alarm

· 1 - urgent alarm

· 2 - alert alarm

· 3 - warning

· 4 - message


3.10.1.8. Strategy

Home > 3.10.1.8. Strategy

3.11.1.8. Strategy

             string Strategy { get; }

ReadOnly Property Strategy As String

This property returns the name of the alarm detection strategy.


3.11.1.1. TimeStamp

Home > 3.11.1.1. TimeStamp

3.12.1.1. TimeStamp

TimeSpan TimeStamp { get; }

             ReadOnly Property TimeStamp As System.TimeSpan

This property specifies the pattern trend point - specified as the time interval from the beginning of the curve.


3.11.1.2. Value

Home > 3.11.1.2. Value

3.12.1.2. Value

double Value { get; }

             ReadOnly Property Value As Double

This property determines the value of the pattern trend point.


Home > 3. Object Model of Scripts

3. Object Model of Scripts


AddPointsRecord

Home > AddPointsRecord

3.16.1.1. AddPointsRecord

bool AddPointsRecord(params System.Collections.ICollection[] aValues);

Function AddPointsRecord(ByVal ParamArray aValues() As System.Collections.ICollection) As Boolean

This command is used to add point values to the series in the record mode - that is, in a single call one value is added to each point of the series. Prior to execution of the AddPointsRecord command, the points for which values will be added should be defined. To this end, the AddPointValues command with a blank aValues parameter should be executed a required number of times.

The aValues parameter of the AddPointsRecord command is used to transfer a record of point values. It is possible to transfer any collection of objects (a table being the simplest case), which can be converted to a value of the double type. Subsequent elements of a collection specify the values for the points of the series in accordance with the order in which they were added using the AddPointValues command.


AddPointValues

Home > AddPointValues

3.16.1.2. AddPointValues

bool AddPointValues(string aPointName, System.Collections.ICollection aValues);

Function AddPointValues(ByVal aPointName As String, Optional ByVal aValues As System.Collections.ICollection = Nothing) As Boolean

This is a basic command used to add points together with the series data to a measurement series.

The aPointName parameter specifies the point name – a point of this name must be defined in the registration plan to which the series belongs. The aValues parameter is used to transfer the series values for a point. It is possible to transfer any collection of objects (a table being the simplest case), which can be converted to a value of the double type. Subsequent elements of the collection specify subsequent point values for a measurement series.

For the process of adding point values, the following rules apply:

a) The command can be used repeatedly for the same point name – new values will be added to the data entered previously.

b) If data for more than one point is added, then the final number of values for all the points must be identical.

c) It is not necessary to add values to all the points defined in the registration plan. The points with no values added will have the NULL value assigned in all series data.


Asix.Evo_Scripts

Home > Asix.Evo_Scripts

Table of Contents

1. The basics of using scripts

1.1 Creating Script

1.2. Script Edition

1.3. Methods to Run Scripts

1.3.1. Interactive Scripts

1.3.2. Autonomous Scripts

1.4. Active Script Management

1.5. Script Code Structure

2. Examples of Typical Scripts

2.1. One-time Scripts

2.2. Resident Scripts

2.2.1. Loops in Initialize Method

2.2.2. Use of RegisterTimeEvent Function

2.2.3. Creating Threads

2.2.4. Monitoring the Process Variable Changes

2.2.5. Monitoring Alarm Status

2.3. Readout of Script Starting Parameters

2.4. Readout of Current Process Variable Values

2.4.1. Cyclical Readout of Current Process Variable Values

2.4.2. Current Value Readout Controlled by the Variable Refreshing

2.5. Setting Process Variable Values

2.5.1. Calculation of Variable Derivative Values

2.5.2. Obtaining Values from External Sources

2.6. Readout of Archive Values of Process Variables

2.7. Using Array Variables

2.7.1. Array Variables Readout

2.7.2. Saving Array Variables

2.8. Transferring Pattern Trends

2.9. Controlling the Alarm Status

2.9.1. Readout of Active Alarm Status

2.9.2. Active Monitoring of Alarm Status

2.9.3. Alarm Notification

2.10 Using the Context of Script Starting

2.11 Multilingual Scripts

2.12. Creating Window Interface

2.12.1. Message Displaying

2.12.2. Windows Created within Script Contents

2.12.3. Using Built-in Libraries

3. Object Model of Scripts

3.1. IApplication Interface

3.1.1. Properties

3.1.1.1. ApplicationAddonsDirectory

3.1.1.2. ApplicationDirectory

3.1.1.3. ApplicationName

3.1.1.4. ApplicationWorkingDirectory

3.1.1.5. CurrentApplicationLanguage

3.1.1.6. CurrentStationName

3.1.1.7. CurrentUserId

3.1.1.8. CurrentUserName

3.1.1.9. CurrentUserRoles

3.1.1.10 ProgramVersion

3.1.1.11 ScriptName

3.1.1.12 ExecutionContext

3.1.2. Methods

3.1.2.1. ApplicationText

3.1.2.2. CreateThread

3.1.2.3. ExecuteAction

3.1.2.4. GetAlarm

3.1.2.5. GetAlarmDomainController

3.1.2.6. GetAlarmDomains

3.1.2.7. GetAlarmDomainStationMode

3.1.2.8. GetActiveAlarms

3.1.2.9. GetDefinedAlarms

3.1.2.10 GetTrendPatternPoints

3.1.2.11 GetVariable

3.1.2.12 GlobalProperty

3.1.2.13 HasRole

3.1.2.14 RegisterTimeEvent

3.1.2.15 ReportMessage

3.1.2.16 Sleep

3.1.2.17 TerminateScript

3.1.2.18 UnregisterEvent

3.2. IContext Interface

3.2.1. Properties

3.2.1.1. Diagram

3.2.1.2. DiagramObject

3.2.1.3. IsWebBrowser

3.2.1.4. MainVariable

3.2.1.5. ScriptStartTime

3.2.1.6. WebServerAddress

3.3. IVariable Interface

3.3.1. Properties

3.3.1.1. Name

3.3.1.2. IsRefreshed

3.3.1.3. VariableState

3.3.2. Methods

3.3.2.1. OrderArcData

3.3.2.2. Read

3.3.2.3. RegisterStateEvent

3.3.2.4. SetVariableBits

3.3.2.5. SetVariableValue

3.3.2.6. UnregisterStateEvent

3.3.2.7. VariableAttribute

3.4. VariableState Class

3.4.1. Properties

3.4.1.1. FormattedValue

3.4.1.2. IsBad

3.4.1.3. IsGood

3.4.1.4. IsUncertain

3.4.1.5. RawValue

3.4.1.6. Status

3.4.1.7. TimeStamp

3.4.1.8. Value

3.5. ArcQuery Class

3.5.1. Constructor

3.5.2. Properties

3.5.2.1. Aggregate

3.5.2.2. AggregateInterval

3.5.2.3. EndTime

3.5.2.4. ProcessedDataQuery

3.5.2.5. StartTime

3.6. IArcQueryResult Interface

3.6.1. Properties

3.6.1.1. ErrorDescription

3.6.1.2. Query

3.6.1.3. ResultStatus

3.6.1.4. Values

3.6.1.5. VariableName

3.6.2. Methods

3.6.2.1. CancelQuery

3.6.2.2. RegisterQueryResultEvent

3.6.2.3. UnregisterQueryResultEvent

3.6.2.4. Wait

3.7. ArcVariableState Class

3.7.1. Properties

3.7.1.1. IsBad

3.7.1.2. IsGood

3.7.1.3. IsUncertain

3.7.1.4. Status

3.7.1.5. TimeStamp

3.7.1.6. Value

3.8. IAlarm Interface

3.8.1. Properties

3.8.1.1. AlarmState

3.8.1.2. Definition

3.8.1.3. Domain

3.8.1.4. Id

3.8.2. Methods

3.8.2.1. Accept

3.8.2.2. Cancel

3.8.2.3. Raise

3.8.2.4. RegisterStateEvent

3.8.2.5. UnregisterStateEvent

3.9. AlarmState Object

3.9.1. Properties

3.9.1.1. AcceptanceOperatorId

3.9.1.2. AcceptanceStationName

3.9.1.3. AcceptanceTimeStamp

3.9.1.4. BeginDetectionTimeStamp

3.9.1.5. BeginExprValue

3.9.1.6. BeginTimeStamp

3.9.1.7. EndDetectionTimeStamp

3.9.1.8. EndExprValue

3.9.1.9. EndTimeStamp

3.9.1.10 FormattedBeginText

3.9.1.11 FormattedEndText

3.9.1.12 IsAccepted

3.9.1.13 IsActive

3.9.1.14 IsExcluded

3.9.1.15 IsFinished

3.9.1.16 WasFiltered

3.10 AlarmProperties Object

3.10.1. Properties

3.10.1.1. Action

3.10.1.2. DetectionParameters

3.10.1.3. BeginText

3.10.1.4. EndText

3.10.1.5. Id

3.10.1.6. IsStartOnly

3.10.1.7. Priority

3.10.1.8. Strategy

3.11 TrendPatternPoint Object

3.11.1. Properties

3.11.1.1. TimeStamp

3.11.1.2. Value


Asservice

Home > Asservice

3.1.1.9. Asservice

AsserviceAccess Asservice { get; }

ReadOnly Property Asservice As AsserviceAccess

This property returns a reference to the AsserviceAccess class object used to access the data archived in the database of the AsService module.


CreateSeries

Home > CreateSeries

3.15.1.1. CreateSeries

AsloggerSeries CreateSeries(string aPlanName, string aDescription, DateTime aSeriesTimeUtc, int aSamplingTime);

Function CreateSeries(ByVal aPlanName As String, ByVal aDescription As String, ByVal aSeriesTimeUtc As DateTime, ByVal aSamplingTime As Integer) As AsloggerSeries

This command is used in the process of saving new measurement series - it creates an object of the AsloggerSeries class, which is then used for the construction of the series content and its saving.

The aPlanName parameter defines the name of the plan to which the series will belong. The aDescription parameter is used to add a description to the series.

The aSeriesTimeUtc parameter defines the time stamp of the series to be saved in the UTC standard, and the aSamplingTime parameter specifies the time period between consecutive values of the series expressed in microseconds.

NOTE

In order to add a series to the database, a registration plan including all constituent points must be defined previously in the database of the AsLogger module.


ExecuteQuery

Home > ExecuteQuery

4.14.1.1. ExecuteQuery

System.Data.DataTable ExecuteQuery(string aQuery);

Function ExecuteQuery(ByVal aQuery As String) As System.Data.DataTable

This command allows for sending any query defined in the aQuery parameter on the basis of the AsBase data. The database structure and the nomenclature used in the columns can be found in the documentation of the Asbase module.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.

NOTE

Although typically this command is designed to handle queries of Select type, it is also possible to execute commands changing the data in the database. However, great caution is advised – incorrect use may lead to the loss of all data stored.


ExecuteQuery2

Home > ExecuteQuery2

3.15.1.2. ExecuteQuery

System.Data.DataTable ExecuteQuery(string aQuery);

Function ExecuteQuery(ByVal aQuery As String) As System.Data.DataTable

This command allows for sending any query defined in the aQuery parameter on the basis of the AsBase data. The command returns an object of the DataTable class including the records read.

Using this command requires the knowledge of the AsLogger data base structure. This command should only be used when none of the special commands of the AsLoggerAccess class is sufficient.

NOTE

Although typically this command is designed to handle queries of Select type, it is also possible to execute commands changing the data in the database. However, great caution is advised – incorrect use may lead to the loss of all data stored.


GetAlarmAttribute

Home > GetAlarmAttribute

3.11.2.1. GetAlarmAttribute

object GetAlarmAttribute(string aAttributeId);

Function GetAlarmAttribute (ByVal aAttributeId As String) As Object

This function returns a definition of the attribute whose ID is specified by the aAttributeId parameter. This command allows for loading the value of any attribute, including a grouping attribute.


Interfejs IScriptSettings

The IScirptSettings interface features the properties that define the command for control of a script operation by the main application.

The reference to the IScriptSettings interface can be obtained by the readout of the ScriptSettings properties.


ReadArcCounters

Home > ReadArcCounters

3.17.1.1. ReadArcCounters

System.Data.DataTable ReadArcCounters(string aCounterId, string[] aFieldNames, DateTime? aStartTime, DateTime? aEndTime, string aWherePhrase, string aOrderPhrase);

Function ReadArcCounters(ByVal aCounterId As String, ByVal aFieldNames() As String, ByVal aStartTime As DateTime?, ByVal aEndTime As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to read reset history of the counters of the IDs specified in the CounterId parameter. In the content of this parameter special symbols in SQL notation should be used (* and ?) in order to select more than one counter. A blank parameter (or %) denotes data readout for all the counters.

A table with the counter field names transferred in the aFieldNames parameter is used to specify which data referring to the counters is to be readout from the database. It is most convenient to use the field names defined in the AsServiceAcces.Names static class.

The aStartTime and aEndTime parameters are used to specify the time period of the counters' reset for the returned records. The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the counters' IDs and the reset time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read.


ReadArchive

Home > ReadArchive

4.14.1.2. ReadArchive

System.Data.DataTable ReadArchive(string aArchiveId, string aDetailsDataSourceId, int aRecordCount, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, string aOrderPhrase);

Function ReadArchive(ByVal aArchiveId As String, ByVal aDetailsDataSourceId As String, ByVal aRecordCount As Integer, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data stored in the registration set of the ID specified in the aArchiveId parameter. Optionally, it is possible to add the data from a related second registration set or recipe group, defined by the ID specified in the aDetailsDataSourceId parameter. The relation between both the data sources must be provided for in the Asbase application.

The aRecordCount parameter allows to reduce the number of returned records – 0 value means no limitation.

The aStartTimeUtc and aEndTimeUtc are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase allows to optionally change the order of records. As standard, the records are organised in accordance with the registration time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.


ReadCounters

Home > ReadCounters

3.17.1.2. ReadCounters

System.Data.DataTable ReadCounters(string aCounterId, string[] aFieldNames, LimitCheckMode aLimitMode, string aWherePhrase, string aOrderPhrase);

Function ReadCounters(ByVal aCounterId As String, ByVal aFieldNames() As String, ByVal aLimitMode As LimitCheckMode, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data describing the definition, current status and the last reset of the counters of the IDs specified in the CounterId parameter. In the content of this parameter special symbols in SQL notation should be used (* and ?) in order to select more than one counter. A blank parameter (or %) denotes data readout for all the counters.

A table with the counter field names transferred in the aFieldNames parameter is used to specify which data referring to the counters is to be readout from the database. It is most convenient to use the field names defined in the AsServiceAcces.Names static class.

The aLimitMode parameter allows to limit the set of counters to those which exceed the currently selected alarm limits.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the counters' IDs. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read.

Example:

C#

DataTable dt = aApplication.Asservice.ReadCounters("U%", new string[] {

AsserviceAccess.Names.Identifier,

AsserviceAccess.Names.Name,

AsserviceAccess.Names.Value,

AsserviceAccess.Names.OperatingLevel},

AsserviceAccess.LimitCheckMode.Operating, null, null);

VB

Dim names As String() = { _

AsserviceAccess.Names.Identifier, _

AsserviceAccess.Names.Name, _

AsserviceAccess.Names.Value, _

AsserviceAccess.Names.OperatingLevel }

Dim dt As DataTable = aApplication.Asservice.ReadCounters("U%", names, _

AsserviceAccess.LimitCheckMode.Operating, Nothing, Nothing)

The above call reads the data from all the counters whose ID starts from the letter U and whose operating limit is exceeded. The readout fields are the ID and counter's name, the current counter value and operating limit.


ReadLoads

Home > ReadLoads

4.14.1.3. ReadLoads

System.Data.DataTable ReadLoads(string aRecipesId, string aDetailsDataSourceId, string aRecipeName, int aRecordCount, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, string aOrderPhrase);

Function ReadLoads(ByVal aRecipeId As String, ByVal aDetailsDataSourceId As String, ByVal aRecipeName As String, ByVal aRecordCount As Integer, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the data stored in the table registering the recipe load events from the recipe group of the ID specified in the aRecipeId parameter. Optionally, it is possible to add the data from a related registration set, defined by the ID specified in the aDetailsDataSourceId parameter. The relation between both the data sources must be provided for in the Asbase application.

The aRecipeName parameter allows to reduce the number of the records read to those which refer to the recipe of a given name. In this parameter special symbols in SQL notation can be used (* and ?) in order to select more than one name. A blank parameter (or %) means no selection by recipe names.

The aRecordCount parameter allows to reduce the number of returned records – 0 value means no limitation.

The aStartTimeUtc and aEndTimeUtc are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). The null value used means no time limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase allows to optionally change the order of records. As standard, the records are organised in accordance with the registration time. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.


ReadPlans

Home > ReadPlans

3.15.1.3. ReadPlans

System.Data.DataTable ReadPlans(string aPlanName, string aWherePhrase);

Function ReadPlans(ByVal aPlanName As String, ByVal aWherePhrase As String) As System.Data.DataTable

This command is used to read the information regarding registration plans defined in the database of the AsLogger module. The aPlanName parameter is used to define a registration plan name. Transmission of a blank value (null or Nothing) returns the data for all the registration plans. In this parameter special symbols in SQL notation can be used (* and ?) in order to select a plan subgroup.

If selection by plan names is insufficient, the aWherePhrase parameter can be used. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.


ReadPoints

Home > ReadPoints

3.15.1.4. ReadPoints

System.Data.DataTable ReadPoints(string aPlanName, string aWherePhrase);

Function ReadPoints(ByVal aPlanName As String, ByVal aWherePhrase As String) As System.Data.DataTable

This command is used to read the information regarding the points included in a registration plan of the name defined in the aPlanName parameter.

As standard, the data of all plan points is returned. The returned information can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure. In particular, the value of the Name = ’r;P1’ parameter denotes a query about the configuration data of the point called P1 only.


ReadRecipes

Home > ReadRecipes

4.14.1.4. ReadRecipes

System.Data.DataTable ReadRecipes(string aRecipesId, string aRecipeName, int aRecordCount, string aWherePhrase, string aOrderPhrase);

Function ReadRecipes(ByVal aRecipeId As String, ByVal aRecipeName As String, ByVal aRecordCount As Integer, ByVal aWherePhrase As String, ByVal aOrderPhrase As String) As System.Data.DataTable

This command is used to readout the recipes stored in the recipe definition table for a recipe group of the ID specified in the aRecipeId parameter.

The aRecipeName parameter allows to reduce the number of the records read to those which refer to the recipe of a given name. In this parameter special symbols in SQL notation can be used (* and ?) in order to select more than one name. A blank parameter (or %) means no selection by recipe names.

The aRecordCount parameter allows to reduce the number of returned records – 0 value means no limitation.

The aWherePhrase parameter allows to optionally add additional criteria for the selection of records. The parameter syntax must be compatible with the where clause of the SQL language. The column names can be found in the documentation of the Asbase module.

The aOrderPhrase parameter allows to optionally change the order of records. As standard, the records are organised in accordance with the recipe names. The parameter syntax must be compatible with the order by clause of the SQL language.

The command returns an object of the DataTable class including the records read. The nomenclature used in the columns can be found in the documentation of the Asbase module.


ReadSeries

Home > ReadSeries

3.15.1.5. ReadSeries

System.Data.DataTable ReadSeries(string aPlanName, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, bool aAddLocalTimeColumn);

Function ReadSeries(ByVal aPlanName As String, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean) As System.Data.DataTable

This command is used to read the information regarding the the recorded measurement series for a registration plan of the name defined in the aPlanName parameter.

The aStartTimeUtc and aEndTimeUtc parameters are used to specify the time period for the returned records. Time is reported as Coordinated Universal Time (UTC). Transmission of a blank value (null or Nothing) means no time limitation.

As standard, the data of all series from the period defined by the aStartTime and aEndTime parameters is returned. The returned information can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column BeginTimeLocal returning the times of the beginning of series as local time. As standard, only UTC format is available in the BeginTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The IdSerie column is of particular importance in the set of columns included in the DataTable object returned by the command. It includes the series IDs which can be later on used to read the individual series using the ReadSeriesData command.


ReadSeriesAggregates

Home > ReadSeriesAggregates

3.15.1.6. ReadSeriesAggregates

System.Data.DataTable ReadSeriesAggregates(string aPlanName, SeriesAggregateId aAggregate, DateTime? aStartTimeUtc, DateTime? aEndTimeUtc, string aWherePhrase, bool aAddLocalTimeColumn, params string[] aPointsNames);

Function ReadSeriesAggregates(ByVal aPlanName As String, ByVal aAggregate As SeriesAggregateId, ByVal aStartTimeUtc As DateTime?, ByVal aEndTimeUtc As DateTime?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean, ByVal ParamArray aPointsNames() As String) As System.Data.DataTable

This command is used to read the aggregates of the recorded measurement series for a registration plan of the name defined in the aPlanName parameter.

The aAggregate parameter specifies the aggregate type:

SeriesAggregateId.SeriesMinimum - minimum value in a series

SeriesAggregateId.SeriesMaximum - maximum value in a series

SeriesAggregateId.SeriesAverage - average value of a series

The aStartTimeUtc and aEndTimeUtc parameters are used to specify the time period of the measurement series for which aggregates are loaded. Time is reported as Coordinated Universal Time (UTC). Transmission of a blank value (null or Nothing) means no time limitation.

As standard, the aggregates of all series from the period defined by the aStartTime and aEndTime parameters are returned. The set of series can be limited using the aWherePhrase parameter. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column SampleTimeLocal returning the times of the aggregates as local time. As standard, only UTC format is available in the SampleTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The aPointsNames parameter is used to transfer the names of the points in a series, for which aggregates are to be loaded. If this parameter is not used, then the aggregates of all points will be loaded.


ReadSeriesData

Home > ReadSeriesData

3.15.1.7. ReadSeriesData

System.Data.DataTable ReadSeriesData(string aPlanName, AggregateId aAggregate, int? aSeriesId, string aWherePhrase, bool aAddLocalTimeColumn, params string[] aPointsNames);

Function ReadSeriesData(ByVal aPlanName As String, ByVal aAggregate As AggregateId, ByVal aSeriesId As Integer?, ByVal aWherePhrase As String, ByVal aAddLocalTimeColumn As Boolean, ByVal ParamArray aPointsNames() As String) As System.Data.DataTable

This command is used to read the values recorded in a measurement series defined by the plan name ( aPlanName parameter) and the ID of the series (aSeriesId parameter). A set of correct series IDs can be obtained using the ReadSeries command. Transmission of a blank value in the aSeriesId parameter denotes a readout of the values for the last series recorded.

The aAggregate parameter specifies the type of the readout point values:

AggregateId.RawData - raw data

AggregateId.Minimum - periodic minimum value (calculated based on 100 subsequent raw values)

AggregateId.Maximum - periodic maximum value (calculated based on 100 subsequent raw values)

AggregateId.Average - periodic average value (calculated based on 100 subsequent raw values)

AggregateId.SeriesMinimum - minimum value in a series

AggregateId.SeriesMaximum - maximum value in a series

AggregateId.SeriesAverage - average value of a series

The aWherePhrase parameter allows to additionally limit the set of returned values. The parameter syntax must be compatible with the where clause of the SQL language. Using this parameter requires the knowledge of the AsLogger data base structure.

The aAddLocalTimeColumn parameter allows to add to the resultant object DataTable a column SampleTimeLocal returning the sampling times as local time. As standard, only UTC format is available in the SampleTimeUtc column. Adding local time can be particularly useful in case of creating reports using the Report class.

The aPointsNames parameter is used to transfer the names of the points in a series, for which values are to be loaded. If this parameter is not used, then the values of all points will be loaded.


Save

Home > Save

3.16.1.3. Save

bool Save();

Function Save() As Boolean

This command is used to save the content of a measurement series in the database. Prior to execution of the command, its content should be added to the series using the AddPointValues and AddPointsRecord commands.


Send

Home > Send

3.13.1.1. Send

bool Send(string aTo, string aFrom, string aSubject, string aMessage);

Function Send (ByVal aTo As  String, ByVal aFrom As  String, ByVal Subject As  String, ByVal aMessage As  String) As Boolean

The Send command allows for sending an alert through the AsAlert application.

The aTo parameter defines the name of the recipient to whom the alert is to be sent. The recipient must be previously defined in the AsAlert application.

The aFrom, aSubject and aMessage parameters specify the alert content, respectively: the sender's name, alert subject and alert content.

This command returns the status of successful operation execution.

Prior to execution of the Send command, the SetAccessData command should be used in order to define the communication parameters with the AsAlert application (if different from the default ones).


SetAccessData

Home > SetAccessData

3.13.1.2. SetAccessData

void SetAccessData(string aMachineName, string aUserName, string aPassword);

Sub SetAccessData(ByVal aMachineName As  String, ByVal aUserName As  String, ByVal aPassword As  String)

This command is used to define the communication parameters with the AsAlert application server. The aMachineName parameter specifies the system name of the computer on which the AsAlert application is installed. The default blank value means communication with the local server installed on the same computer as the application.

The aUserName parameter allows to specify the name of the user defined in the AsAlert application, to whom an alert will be sent. The default user name is AsixEvo. Using the aPassword parameter causes a password prompt to appear (by default - no password). In order to ensure proper operation, an equivalent user should be created in the AsAlert application.


SetAccessData2

Home > SetAccessData2

3.15.1.8. SetAccessData

void SetAccessData(string aServerName, string aDatabaseName);

Sub SetAccessData (ByVal aServerName As  String, ByVal aDatabaseName As  String)

The SetAccessData command should always be executed as the first one after obtaining access to the AsloggerAccess object. It is used to specify the location of the database of the AsLogger module. The aServerName parameter specifies the name of the SQL server, and the aDatabaseName parameter specifies the name of the database.


Asix.Evo_System_of_Alarms

Home > Asix.Evo_System_of_Alarms

Table of Contents

1 Basic Concepts

2 Alarm System Parameterization

3 Workstation Roles

4 Alarm Definition Database

4.1. Attributes

4.2. Alarm Description Texts

4.3. Alarm Groups

4.4. Import from Excel Spreadsheets

5 Alarm Detection Strategies

5.1. Bitwise Strategy

5.2. Conditional Strategy

5.3. Buffered Strategy

5.4. Asix Strategy

5.5. External Strategy

5.6. External Global Strategy

6 Active Alarm Log

7 Historical Alarm Log

7.1. SQL Alarm Archive

8 Alarm State Visualization

8.1. Active Alarm Tables

8.2. Historical Alarm Tables

8.3. Other Objects

9 Alarm Management

9.1. Alarm Acknowledgement

9.2. Alarm Exclusions

9.3. One-time Exclusions

9.4. Alarm Filtering

9.5. Sound Signalling

9.6. Printing

10 Integration with AsAlert


Home > 5.1. Opening Synoptic Windows

5.1. Opening Synoptic Windows


Asix.Evo_Techniques_of_Diagram_Creation

Home > Asix.Evo_Techniques_of_Diagram_Creation

1 Universal Object Creation Methods

1.1. Suffix Notation of Variable Names

1.2. Using Variable Attributes

1.3. Global Properties

1.4. Templates and Parameterized Diagrams

2 Displaying Process Variable Values in Text Form

2.1. Displaying Formatted Value

2.2. Making the Text Dependent on the Value

2.2.1. Use of Conditional Expressions

2.2.2. Using Multi-State Method

2.3. Using Warning Limits for the Variable Value

2.3.1. The Use of Suffix Notation

2.3.2. Application of Variable Attributes

2.4. Handling Monitored Variable Status

3 Formatting Numerical Values

3.1. Conversion of Numerical Values

3.2. Conversion of Values of the DateTime Type

4 Object Appearance Animation

4.1. Animated Images

4.2. Animation of Pipes, Conveyors and Lines

4.2.1. Pipe

4.2.2. Conveyor

4.2.3. Line

4.3. Implementation of Blinking Effect by Changing Object Properties

5 Rules for Opening and Closing Synoptic Windows

5.1. Opening Synoptic Windows

5.1.1. Opening Window at the Application Start-up.

5.1.2. Opening Window and Diagram with OpenWindow Action.

5.1.3. Opening Diagram Without Use of Predefined Synoptic Window

5.2. Controlling the Location and Size of Windows

5.3. Closing Window and Diagram

5.4. Mutual Overlaying Control of Synoptic Windows

6 Organization of Control Operations

6.1. Immediate Control

6.2. Delayed Control Operations (with Confirmation)

6.3. Control by Using SetVariable Operator Action

6.4. Control Validity Check

6.5. Controlling Permissions

6.5.1. Double Confirmation of Control Operations

7 Parameterization of Interactive Functions of Passive Objects

7.1. Navigation Through Text Links

7.2. Connecting Context Menu to Object

7.3. Diagram Activity Zones

7.4. Self-Repetitive Operations

7.5. Keyboard Support

8 Use of Transparency Effect

8.1. Window Transparency

8.2. Object Transparency

8.3. Hiding Objects

8.4. Use of the Transparent Colour

9 Controlling the Behaviour of Objects

9.1. Using Virtual Variables

9.2. Modifying Object Properties

10 Application of Button Class Objects

10.1. Single-Position Button

10.1.1. Single-Position Button Executing Operator Actions

10.1.2. Single-Position Button Executing Control Actions

10.2. Single-Position Button with Repeat Function

10.3. Single-Position Button with Hold

10.4. Two-Position Button

10.5. Two-Position Button with Delayed Control

10.6. Switch

10.7. Bitwise Control

10.8. Grouping Buttons

11 Control Operations in Text Class Objects

11.1. Controlling the Numerical Value Entered by the User

11.2. Controls From The Selection List

12 Using Sliders in Bar Class Objects

12.1. Using Slider to Control Set Point Values

12.2. Using the Slider to Control Set Value With a New Set Point Preview

13 Motion Animation and Object Resizing

13.1. Changing Position

13.2. Changing Position Within Area Defined by Another Object

13.3. Positioning Groups and Templates

14 Alarm State Indication and Handling

14.1. Single Alarm State Monitoring and Handling

14.2. Indicating States of Alarm Group

15 Controlling Chart Class Objects

15.1. Controlling Time Range of Chart

15.1.1. Modifying Chart Object Properties

15.1.2. Controlling Via Virtual Variable

15.2. Controlling Trend Patterns Displaying

16 Using Templates


Asix.Evo_Visualization_Elements

Home > Asix.Evo_Visualization_Elements

Asix.Evo 7

www.asix.com.pl

LOGO ASIXA EVO 7.png

Asix.Evo - Visualization Components

Doc. No. ENP7E005

Version: 2012-07-25

ASKOM® and Asix® are registered trademarks of ASKOM Spółka z o.o., Gliwice. Other brand names, trademarks, and registered trademarks are the property of their respective holders.

All rights reserved including the right of reproduction in whole or in part in any form. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without prior written permission from the ASKOM.

ASKOM sp. z o. o. shall not be liable for any damages arising out of the use of information included in the publication content.

Copyright © 2012, ASKOM Sp. z o. o., Gliwice

Table of contents

1 Visualization component hierarchy

2 Properties and Events of Visualization Components

3 Windows and Panels

3.1 Window properties

3.2 Panel Parameters

4 Diagrams

4.1 Diagram Properties

4.2 The Diagram Events

4.3 Group Properties

4.4 Group Events

4.5 The Properties of the Embedded Templates

4.6 The Events of the Embedded Templates

5 Menu

5.1 Menu Properties

5.2 Menu Items Properties

6 Objects

6.1 Properties Groups

6.1.1 Basic Properties

6.1.2 Multiple Groups

6.1.3 State Properties

6.2 Object Standard Properties

6.3 The Standard Object Events

7 Templates

8 Global Properties