ViewPLUS Editor

SCADA projects are created by ViewPLUS Editor program.

= Creating New Project =

To create a new project:
 * Select File>New File or Project > Mikrodev SCA Project

https://www.mikrodev.com/images/wiki/en/newfile.jpg


 * Select project name and location.

https://www.mikrodev.com/images/wiki/en/newfileselectfolder.jpg


 * After entering the database username and password, you can verify the password by clicking the "Test Connection" button (if you will use PostgreSQL database and the PostgreSQL database is not installed on your system, you need to download and install the relevant version by clicking on "Download PgSQL" link. Likewise if you will use Oracle database, you need to install Oracle database on your system and download oracle runtime from here.)

https://www.mikrodev.com/images/wiki/en/newfile_database.jpg


 * The visual parameters such as screen color, default page size are set.

https://www.mikrodev.com/images/wiki/en/newfilesettings.jpg


 * If you are going to use the SVN version control tool on the next page, the settings will be adjusted accordingly.

https://www.mikrodev.com/images/wiki/en/newfilevercontrol.jpg


 * A new project is created by pressing the "Finish" button. The newly created project consists of 2 files. These are the files with the extension "scapro" where the project configuration parameters are stored. You do not need to make any changes to this file. The other file that is automatically created is the file named "intro.sca". You can design the main screen on this page.

https://www.mikrodev.com/images/wiki/en/projectspanel.png


 * On the far left is navigation buttons that allow you to navigate through the editor's basic interfaces. Using these buttons, you can switch between the SCADA Editor view, Projects view and the Tag/channel Editor view. At the bottom of the navigation buttons is the project selector. If more than one project is open at the same time on the editor, this button can be used to switch between projects

https://www.mikrodev.com/images/wiki/en/editorPane2.jpg

= SCADA Editor View=

Sidebar
The sidebar is available in the SCADA Editor view. Use the sidebar to browse projects, files and insert components.

Project files and components are controlled using panes on the left side of the editor. You can also filter and search the project files via the search box at the bottom of this panel. At the bottom left of the panel is a button that allows you to hide and show panels.

https://www.mikrodev.com/images/wiki/en/editorPane1.jpg

You can select the content of the sidebar in the sidebar menu:
 * Projects shows a list of projects open in the current session.
 * Open Documents shows currently open files.
 * File System shows all files in the currently selected directory.

You can change the view of the sidebar in the following ways:
 * To toggle the sidebar, click ￼ (Hide Sidebar/Show Sidebar) or press Alt+0 (Cmd+0 on macOS).
 * To split the sidebar, click ￼ (Split). Select new content to view in the split view.
 * To close a sidebar view, click ￼ (Close).

Components
ViewPLUS SCADA offers components in different types for visualization of the displayed data. These are; basic components, timers, graphics, database query and text components.

The basic components are located in the "SCADA Components" pane in the left panel of the Editor. The other components can be created using the "components toolbar" on top of the editor window.

https://www.mikrodev.com/images/wiki/en/componentsToolbar.png

Basic Components
Using the "Component Manager", different objects that the user has defined can be added. To insert a component to the current page, press the left mouse button on one of the components in the panel, then press the desired position on the scene with the left mouse button again and the component is added.

https://www.mikrodev.com/images/wiki/en/componentresize.png

To change the size of the added component, you can move the triangle icon in the lower right corner of the component with the mouse. "Object Properties Panel" is used to change the advanced properties of the component.

Text Component
The text component is used to display text in different fonts, colors, and formats. Used for fixed text. You can change the formatting of the text in the "Format" tab in the toolbar.

https://www.mikrodev.com/images/wiki/en/componenttext.png

You can show dynamic content on text component. Please refer to Basic Scripting.

Timer Component
You can control the "Timer Blocks" that you have added to the PLC project with Mikrodiagram software via the "Timer" component. By adding "Timer Tags" you have defined in the Tag/ Channel Editor to the timer component, users can change the timing settings through the client software.

https://www.mikrodev.com/images/wiki/en/componentscheduler.png

Chart Component
Using the chart component, you can graphically view the data of the desired tags. Chart object displays graphs as lines or bar graphs. In the chart settings window, the chart's appearance, behavior, and parameters for the tags to be displayed can be set.

While only the last values of the tags added are shown on the bar chart; historical values of tags can be displayed on the line chart.

https://www.mikrodev.com/images/wiki/en/componentgraphics.png Chart Component : Graphical representation of the added component.
 * Chart View Type: Sets how the chart will work.

Link to Chart : The added component only acts as a button. A separate window chart display is shown when pressed. Line Grid : The trend data of the defined labels are drawn with different colors on the same chart. With new data read from the field, the chart is updated once in a second. Bar Chart: Defined tags are displayed in bar chart format. The chart is updated once in seconds.
 * Chart Type: Selective type for chart type

Database Query Component
This component allows the client to retrieve some specific queries from the database. In the Database query settings window, parameters related to the tag to be queried, query type, range, update frequency, and component visibility can be set.

Database Query Component

Table Component
You can display the data in tabular form on the table component. You can add and remove new columns / rows to table via the table menu.

https://www.mikrodev.com/images/wiki/en/tableComponent.png

Styling Table
You can set font and color for cell text using the format toolbar on the top of the editor:

https://www.mikrodev.com/images/wiki/en/tableComponent2.png

You can also change the appearance of the table itself using stylesheets. Here is a sample stylesheet for changing row colors:

alternate-background-color:#AACA98; background-color: #D3E3D0;

Formulas on Table
You can use excell like formulation on table cells. Please refer to Basic Scripting for inserting tag values into formulas

Supported functions are: SIN COS TAN COT FABS LOG LOG10 SQRT POW ROW COLUMN PI SUM PRODUCT MIN MAX AVERAGE MEDIAN MODE

Image Component
You can add images into your view by using image component. You can resize, rotate and flip the added image.

Web Frame Component
You can add web content into your view by using Web Frame component. You can resize, rotate and flip the added frame. This component is useful, for example when you need to add a web camera view into your SCADA page.

https://www.mikrodev.com/images/wiki/en/webFrame.png

Web frame view is not supported on mobile versions of OperatorClient.

Page Properties Panel
https://www.mikrodev.com/images/wiki/en/pageProperties.png

The basic settings for the page are set via this panel
 * Page Name
 * The name you want to appear for the page in the left panel on the client screen for pages set as tabs.


 * PageID
 * System-assigned unique ID for each page.


 * PageOrder
 * Sets the order in which the page will appear in the left panel on the client screen for pages set as tabs.


 * PageType
 * There are three different page types. "Tab" type pages appear as full screen on the client. At the same time, a button is created in the left-hand navigation panel that provides access to this page. Unlike the "Tab" for the "Linked Page" type, there is no button on the navigation panel. "Dialog" type pages are pages that are configured as popups to be opened in an action repository.


 * GeoView
 * Enables Google Maps api and shows the map. You should provide a map API key to be able to use this feature. First login to Google, go to Google API Key Console and select "Google Maps JavaScript API". After you get the key insert this into "Projects > Project File Paths > Map API Key"


 * GeoCenter
 * This option determines the initial position and zoom level of map when opened. It should be in that format :" Longitude,Latitude,ZoomLevel"


 * Scale at startup
 * Set how to scale scaling when the page is first opened on the client screen.


 * CustomSize
 * This option is checked if a different size will be used in the project settings instead of the default page size.


 * Page Width
 * Width for custom page size


 * Page Height
 * Height for custom page size


 * BackgroundImage
 * An image to be displayed on the client screen for the page in the left panel is displayed for the pages set as tabs.


 * Add Scroll Text
 * Adds a slip at the bottom of the page that allows you to show informative messages.


 * AccessRights
 * Different access rights can be defined to restrict access to the page. For users who do not have these rights, the page is not displayed.

Layers Panel
You can create or delete a new layer on the Layers panel. You can create a hierarchical layout on the page by creating components on the layers you create. You can make complex designs easier by hiding / showing layers. Another benefit provided by the layers is that the visibility of the layers at different zoom levels can be changed.

Hide / Show Layers
You can hide / show the layers you have added using the "Hide / Show Layer" option on the right-click menu of the mouse.

https://www.mikrodev.com/images/wiki/en/layer_properties1.png

Changing the Order of the Components in the Layer
You can change the order of the layers that you have added using the "Bring Layer Components Front" or "Send Layer Components Back" options on the right mouse button menu.

Hide / Show Layers According to Scale Level
You can hide and show the layers defined on the page according to the scale level of the screen. On this scale, you can display more detailed information components when the scale level increases, but you can reduce the complexity of the design and make it easier to use by showing fewer components when the scale level increases. To do this, first select "Layer Properties" in the "Layers Panel"

In the dialog that appears, there are two fields showing scale level parameters.

https://www.mikrodev.com/images/wiki/en/layer_properties2.png

The layer will be visible between the two scale values to be entered here. If you define one of the values as "-1", the layer will be continuously visible in this direction regardless of the scale. For example, if values of "300" and "-1" are considered, the result will be like that: "Make the layer visible if the scale is greater than 3"

The scale is smaller than '3':

https://www.mikrodev.com/images/wiki/en/Zoomedout.png

The scale is higher than '3':

https://www.mikrodev.com/images/wiki/en/Zoomedin.png

As you can see in the picture, when the scale value goes up to '3', the layer with the buttons becomes visible.

GIS Objects Panel
https://www.mikrodev.com/images/wiki/en/gisObjects.png

You can edit your maps using this panel.


 * Text
 * The marker's name that will show up on map.


 * Location
 * The marker's location on map. It should be in "Longitude,Latitude" format


 * Icon
 * Custom marker icon to be used on map


 * Link to Page
 * Select a page link to go when the marker is clicked. You can enable or disable page linking. When you disable page linking "Go To Page" button will disappear on infowindow. You can also enable/disable of showing alarms of the target page on the marker from this panel.

https://www.mikrodev.com/images/wiki/en/gisPageLink.png


 * Info Window
 * Here you can insert any html content to be shown on Info Window for each marker. You can use ${tag_id} and #{operation} syntax inside html elements. You can use html code for Info Window content click here for details


 * Add Marker Button
 * Click on the map after selecting this button to insert a new marker


 * Remove Markers Button
 * Click on the map after selecting this button to remove markers


 * Import Markers from GeoJson Button
 * You can import markers from a geoJson file using this button. Go to https://geojson.io for more information.

Object Properties Panel
It is a panel that allows you to adjust the SCADA objects added to the page. https://www.mikrodev.com/images/wiki/en/objectProperties.png


 * Object Name
 * A name that makes it easy to distinguish the object.


 * ObjectType
 * Represents the component type of the object.


 * Geometry
 * The position of the object on the screen is the parameters related to the scale and rotation. The top leftmost point of the page is positioned by accepting the point (0,0). Position value increases down and to the right.


 * Constants
 * Contains some settings related to the appearance of the object.

Font X Offset  : Used to add a horizontal offset to the position of the text to be printed on the object, relative to the upper left corner of the object. Font Offset  : Used to add a vertical offset to the position of the text to be printed on the object, relative to the upper left corner of the object. Text Content  : It is the field in which the display format of the "Text Label" defined in "Feature Tags" is configured. The "formatted" text entered here is printed on the component. The text to be entered must be in "printf text format". The following examples can be used for formatting: Integer            :% d    => "1977" Add leading spaces :% 10d  => "1977" Add a leading zero :% 010d => "0000001977" Float numbers      :% 4.2f => "3.14" You can also display date/time values read from a 'seconds' source in desired format. To achieve this you can use "%dt(...)" notation. "%dt(...)" notation assumes that the tag value is in seconds: Date is : %dt(dd.MM.yyyy / hh:mm) will be displayed as: Date is : 13.05.2017 / 12:24 For different formatting styles please refer to Date/Time Formatting section

Font Style Sheet  : By setting the style sheet for the "Font Content" to be displayed, you can make settings such as font, font size and color Here some examples can be found. Text Width  : The maximum width of the text to be displayed on the component. Event Type  : The parameter that determines when the event will be fired. MousePressed: Left mouse button press event MouseReleased: Left mouse button release event   Keystroke: Keyboard push event Event Action  : When "Event Type" is triggered, the function to be operated is selected. SET          : Sets the value of "Target Event Tag" to "1". CLEAR: Makes the value of "Target Event Tag" "0". CHANGE       : Makes "0" if "Target Event Tag" is "1" and "1" if it is "0". LOADVALUE    : If this function is selected, users will have a dialogue page in the client software where they can right-click on this component mouse to change the value of "Target Event Tag". NEXTPAGE PREVIOUSPAGE GOPAGE       : The page that was selected in "Go to Page" opens on the screen. GOLINK       : The link defined in "WebLink" is executed. Target Event Tag  : Defines the tag that is the target of the "Event Action" Go to page  : Page selection for "Go to page" action (Web)link : If this field is defined as a web link, a menu entry will be created to access the related page from the right-click menu of the component. You can also create direct link to Alarms page by writing ":Alarms" expression or to Reports page by writing ":Reports" to this field or to previous page by writing ":Back". Other than that you can directly create a link to a report query in this field.(Click here for details)
 * Events: Contains user interaction settings.

Tags Panel
The values read from the labels selected from this panel are constantly updated according to the values read from the field.

The labels defined here can also be used in macros. For each label, there are predefined "i, o, s, w" values. (Such as i1, i2, o1, o2 ..). You can see the default variable names of the tags by hovering over them with the mouse.

https://www.mikrodev.com/images/wiki/en/componentprop2.png

Feature Tags * Hex value of "112233" of the RGB color value defined as # 112233 is taken as the integer counter value. You can find some sample hex color values here. And you can use this tool to convert the color valueto integer.
 * Image Index Tag: Shows the image index of the component to display instantly. Which images is in which index can be changed using the "Component Manager" or can be viewed under "Other Tab".
 * Text Tag: The value of the selected tag here is displayed on the component according to the form specified in "Text Content".
 * X Position: The horizontal position coordinate of the component is taken from this parameter. The top left corner of the page is the (0,0) coordinate. As you go to the right, the X value increases.
 * Y Position: The vertical position coordinate of the component's screen is taken from this parameter. The top left corner of the page is the (0,0) coordinate. The Y value increases as it goes down.
 * Width: The width value of the component is read from this label.
 * Height: The height value of the component is read from this label.
 * Rotation Angle: Rotation angle of the component with X axis. Gets value in degrees.
 * Text color: The color of the text to be displayed on the component is taken from this parameter. *
 * Mask color: The color of the mask that will be applied on the component is taken from this parameter. *
 * Mask transparency: A value from 0-255 is taken from this label for the transparency value of the masquerade to be displayed.
 * Custom Labels: The 7 labels you select here will be available to the macros.

Other Settings Panel
https://www.mikrodev.com/images/wiki/en/componentprop3.png https://www.mikrodev.com/images/wiki/en/imageIndexes.png You can move up or down image indexes from the context menu opened by right clicking on the images.
 * Limits: The maximum and minimum values by which users can change the "Target Event Tag" value through the client software are set using these parameters.
 * ToolTip: Adjust the content that will be shown when users bring the mouse over the component in the client software. You can show dynamic content on tool-tips . Please refer to Basic Scripting.
 * Macro: The script for the component is written in this box . For more information about macros, see the corresponding section.
 * Images: The images and index numbers defined for the selected component are displayed in this area. Index number expresses which image to show according to the data value read from the tag value of "Image Index Tag" at "Tags Panel". You can change the index display order of components from this panel

= Projects View=

SCADA Pages
List of all pages created on the project. This view gives detailed information about the created pages for the project. https://www.mikrodev.com/images/wiki/en/pageList.png

Project File Paths
Here are some important folder paths related to the SCADA project https://www.mikrodev.com/images/wiki/en/filePaths.png

View Configuration
Default settings for SCADA pages are configured using this menu https://www.mikrodev.com/images/wiki/en/viewConfig.png

Client Options
Various settings related to Client view can be done on this menu https://www.mikrodev.com/images/wiki/en/clientOptions.png

= Tag and Channel Editor View =

Channels and tags are special definitions that enable the SCADA software to access the data on the field devices. Channels include protocol definitions to provide communication with the device on the field and specific settings for this protocol. Tags consist of address definitions for the registers on the connected device. Alarm management is also done under this view.

Channels
Channels containing connection definitions can be created with a device in the field, as well as special channels defined by virtual connections such as macros or database queries.

To create a new channel, open the "Tag Channel Editor" tab, press the right mouse button on any channel, and select "New Channel" from the popup menu.

In the dialog that is opened, necessary adjustments can be made about the new channel.

Modbus TCP Channel
You must create a new Modbus Channel to communicate with field devices over TCP using ModBus protocol.

Select "Modbus TCP" as the "Protocol Type" in the dialog for creating a new channel

For detailed information on Modbus configuration check here.
 * Channel Parameters
 * - Server Adress
 * The IP address of the device you want to connect to
 * - Server Port
 * Modbus connection port information of the device
 * - Response Timeout
 * It is time value, the Modbus slave waiting for the device to respond after each modbus request, in milliseconds. If no response is received from the slave device during this time, a new request is sent.
 * - Connection Timeout
 * It is the time value in milliseconds to wait until a new connection attempt is made after the request to connect to the device is sent. Typically in GPRS or 3G networks this time may be slightly longer than TCP.
 * - Frame Timeout
 * It is the time value in miliseconds to be waited until the next request is sent, after receiving a response from a Modbus request.


 * Tag Parameters
 * - Function Code
 * The IP address of the device you want to connect to
 * - Device Address
 * Modbus protocol device address
 * - Variable Address
 * Modbus variable address
 * - Variable Size
 * The size of the variable in the identified address
 * - Variable Type
 * The type of the variable in the identified address

IEC 104 Channel
You must create a new IEC 104 Channel to communicate with the field devices over TCP using the IEC 104 protocol.


 * Channel Parameters
 * - W
 * ACK(acknowledge message) sending frequency(sends ACK after W packets)
 * - K
 * The maximum allowed number of unacknowledged packets
 * - T1
 * ACK timeout duration for ASDU packet
 * - T2
 * If no new data will be sent after this time, an ACK is sent
 * - T3
 * Timeout period for test frame
 * - General Interrogation
 * GI message sending frequency
 * - Clock Synchronisation
 * CS message sending frequency
 * - Timezone GMT
 * Timezone information of server computer


 * Tag Parameters
 * - Object Type
 * - InfoObjectAddress'''
 * - InfoObjectAddress'''

DNP3 Channel
You must create a new DNP3 Channel to communicate with the field devices over TCP using the DNP3 protocol.


 * Channel Parameters
 * - W
 * ACK(acknowledge message) sending frequency(sends ACK after W packets)
 * - K

SNMP Channel
This channel is used to connect to SNMP devices. The NetSnmp library must be installed on your system in order for this channel type to work. You can download NetSnmp library from here


 * Channel Parameters


 * Server Address
 * The IP address of the device you want to connect to
 * Read Comunity
 * The "Read Community" information that will be used to access device information.


 * Tag Parameters

Macro Channel
This channel is used to create virtual tags and modify them with scripts.


 * Channel Parameters


 * - Frame Timeout
 * The time in milliseconds that expresses the frequency of operation of the macro.


 * Tag Parameters

Database Channel
This is the type of channel used to make queries from SCADA's own database
 * Channel Parameters
 * - Response Timeout: The number of milliseconds that represents the frequency at which the database query is executed.

Global Database Channel
It is the type of channel used to connect to different databases to create custom queries and to pass these query results to project tags.


 * Channel Parameters
 * - Response Timeout
 * The number of milliseconds that represents the frequency at which the database query is executed.

An example "Query" expression:
 * Tag Parameters
 * - Query
 * The query expression to be executed in the database. This tag allows retrieving the first line returned from the query. The return values ??for this first row are written into tags respectively into the tags defined in the form of :{${32}, ${33}, ${34}, ${35},....}:

In the above PostgreSQL database query, the latest recorded database values of the tags 19, 20, 29, and 26 are written into the tags with 32, 33, 34, 35 IDs, respectively.

JavaScript Channel
JavaScript functions could be defined JavaScript channel. You can call various Math functions in your script(Reference). You can also use the values of system tags in the form of "${123}". You need to "return" a numeric value for the function result to be written on the "JavaScript Tag"


 * Channel Parameters
 * - Response Timeout
 * The number of milliseconds that represents the frequency at which the JavaScript function is called.

An example "JavaScript" expression:
 * Tag Parameters
 * - Query
 * The JavaScript expression to be called. :

IMPORTANT NOTE You cannot set the values of other system tags in JavaScript tag. You need to use Macros to achieve this. Thus the following script will not work: ${20}= 3 + var1 ;

SOAP API Channel
It is the type of channel used to connect to a SOAP Web Service and to pass the query results into project tags.


 * Channel Parameters
 * - Response Timeout
 * The number of milliseconds that represents the frequency at which the query is executed.

The query expression is composed of 3 parts. The first part identifies the WSDL path of the SOAP server. The second part is the actual SOAP query envelope. And the last part is the tag binding expression for the results to be written into correct tag values. An example "Query" expression:
 * Tag Parameters
 * - Query
 * The API expression to be send to SOAP service. The query result is parsed and the relevant return values are written into tags:

And the response from the server is as following:

The method to write the result of the response into the tags is as follows:

https://www.mikrodev.com/images/wiki/en/soapParser2.png

The parser is defined in the form of :{${tag1 ID}, ; ${tag2 ID},   }: On the last 3 lines of the query, the first parameter is the target tag. The latter part defines how to parse the response. The last element of this part could be used to create an attribute filter for the XML document. The remaining parts are the node hierarchy filter.

If no returnAttribute or filterAttribute is defined, the text value of the node is cast into number and written into tag.

If returnAttribute is defined but no filterAttribute ; the first element of multiple elements is selected and  "returnAttribute" attribute's value is returned. If both returnAttribute and filterAttribute are defined; multiple elements are filtered according to  filterAttribute  and "returnAttribute" of that node is returned.

System Info Channel
By using this channel you can get realtime information from the SCADA server like active alarms count, system time, etc... You need to write a script and return a value to set. You can use javascript to manipulate the data before you set it to a tag instance.

An example "JavaScript" expression to get system information:

The following keywords are supported inside the javascript

:ALARMCOUNT(ClassName)    This will return the number of alarms for "ClassName" alarm class :ACTALARMCOUNT          This will return the number of active alarms defined in the system :ACTALARMCOUNT(ClassName) This will return the number of active alarms for "ClassName" alarm class :ACKEDALARMCOUNT        This will return the number of acknowledged active alarms defined in the system :ACKEDALARMCOUNT(ClassName) This will return the number of acknowledged active alarms for "ClassName" alarm class :SYSTEMTIME             This will return the systemtime of SCADA server in miliseconds since epoch. :CONNECTEDCHANNELS(ChannelName) This will return the number of channels with an active connection and having a name containing "ChannelName" keyword :UNCONNECTEDCHANNELS(ChannelName) This will return the number of unconnected channels and having a name containing "ChannelName" keyword

Tags
"Tag" refers to point data that is read from the scene or created virtually by the system. Tags are defined under the channels and may have different properties depending on the type of channel they are in.

Creating Tags
To create a tag, open "Tag/Channel Editor Panel". Tag/Channel pane is on the top left of the screen. On the pane, right click on the channel in which you want to create a tag. On the context menu select "New Tag" action

https://www.mikrodev.com/images/wiki/en/tags_1.png

On the "New Tag" dialog write a name and description for the tag. The "tag name" must be unique; if you select an existing tag name, the system will prompt you a warning.

https://www.mikrodev.com/images/wiki/en/tagProperties.png

All tags created in the system have common properties that can be changed. These features are:

General Tag Parameters

 * In Use
 * Tag is ignored by the SCADA server if the tag is not marked as "in use". The tag only becomes a definition in the system.


 * Tag Name
 * Each tag must have a unique name. Clear words and format should be used to describe the tag briefly


 * Description
 * Give a brief description about the tag


 * Unit Name
 * This is an optional property for the tag. It may be useful if you want to group tags by units on the field


 * Tag Type
 * This is an option for selecting "Schedule Tag" which is a special register reserved for calendar operations on Mikrodev devices. For more details see Mikrodiagram documentation

Access Rights
Reading: These are the rights that users have to have in order to see the tag values. Users who do not have the rights set here will not be able to read this tag value. Writing: It is the right that users have to have in order to change tag values. Users who do not have the rights set here can not change this tag value.

Variable
Variable Type: The mathematical type of the variable

Logging

 * Log to Database
 * If this option is not enabled, the tag value will not be logged on the system and historical values will not be visible. Also, historical values can not be viewed on the graph.


 * Log on change
 * Logging is done in case of tag value change. The type of change can be of the type "Percentage" or "Level" change.


 * Percentage Change
 * If "Percentage Change" is selected as the type of change; Logging is done if the tag value changes by the specified percentage value of the latest logged value. If value is set to "0", all kinds of changes are logged.


 * Level Change
 * If "Level Change" is selected as the type of change; if the tag value has changed by the specified value, logging is done. If value is set to "0", all kinds of changes are logged.


 * Log Periodically
 * If this option is enabled, the tag is continuously logged in the specified time period.

Note: Logging type and tags to be logged must be carefully selected to avoid unnecessary increase in the size of the data to be stored. For example; Data Logging Filter
 * The tags should never be logged if you do not need historical values.
 * If a level or percentage change is selected for analog variables, a percentage or level appropriate to the data exchange pattern should be selected.
 * For digital values, "log on change" should be used instead of periodic logging.

By using the data logging filter, you can prevent the measurement values ??collected from the field from being logged according to the filter you selected. So, you will be able to pick up possible false data This filter only allows logging of descending data below the entered maximum value. For example; If the maximum value is entered as 1000: 188, 225 ,(logged) 1500,(not logged) 350 ,(logged) 400 (logged) In this example, the value '1500' is 1275 more than the previous value, so it exceeds the maximum value of 1000. Thus, is not logged. This filter only allows logging of incremental data below the maximum value entered. This filter allows logging only if the value read from the field is in the specified range. This filter allows logging only if the value read from the field is out of the specified range.
 * Only log when decreasing by maximum
 * Only log when increasing by maximum
 * Only log if value is in range
 * Only log if value is out of range

Alarms
Alarms are an integral part of monitoring systems. ViewPLUS can create alarms for users according to field data and user's access rights.

Creating Alarms
To create an alarm, open "Tag/Channel Editor Panel". Alarms pane is on the bottom left of the screen. Right click on alarm pane. On the context menu select "New Alarm" action

https://www.mikrodev.com/images/wiki/en/alarms_1.png

On the "New Alarm" dialog write a name and description for the alarm. If you write an existing "class name" into AlarmClass, the alarm will be added to that class; if you write a new "class name" a new AlarmClass will created and the alrm will be added to that class

https://www.mikrodev.com/images/wiki/en/alarms_1.png

General Alarm Parameters
https://www.mikrodev.com/images/wiki/en/alarms_4.png


 * - Alarm Name
 * Give an apparent unique name for the alarm


 * - Class Name
 * The name of the class which the alarm belongs to. This is useful when grouping the alarms


 * - Description
 * Write a human readable explanation about the alarm


 * - Value Tag
 * The selected tag is the source of the alarm. Condition check will be made on this tag's value.

Condition
The conditions are evaluated according to the LIMIT and RANGE values on the right side of conditions pane


 * - VALUE is equal to LIMIT
 * The alarm is activated if the value of the tag is equal to "LIMIT" value.


 * -VALUE is smaller than LIMIT
 * The alarm is activated if the value of the tag is smaller than "LIMIT" value.


 * - VALUE is greater than LIMIT
 * The alarm is activated if the value of the tag is greater than "LIMIT" value.


 * - VALUE is in "RANGE"
 * The alarm is activated if the value of the tag is in "RANGE".


 * - VALUE is out of "RANGE"
 * The alarm is activated if the value of the tag is out of "RANGE".

Subscriptions
Alarms should be assigned to users. A user can monitor an alarm only if the user is subscribed on that alarm.

To add a user subscription on the alarm click on the Subscribed User Selection button.

https://www.mikrodev.com/images/wiki/en/alarms_3.png

On the opened dialog, select the users which you want to be subscribed on the alarm

Other

 * - Require Acknowledge
 * When this option is checked, if a user does not acknowledge the alarm, it will not disappear from alarms list if also alarm condition has gone away


 * - Log into Database
 * When this option is checked, the alarm states will be logged into database


 * - Enabled
 * This option activates/deactivates the alarm

Associating PLC and SCADA Projects
As you develop your project, it becomes more important to associate channels in SCADA with PLC projects to avoid confusion.To do this, you can specify the PLC project path in the upper right corner of the channel menu.

https://www.mikrodev.com/images/wiki/en/plc_project_matching.png

= Import and Export Operations= There are different options for importing/exporting data from/to the project.

Importing/Exporting Projects
This wizard allows the user to import/export tags, channels, alarms, users and pages using a special file format(.scaexp). After opening the project on ViewPLUS, on the File menu select "Export Project" option: https://www.mikrodev.com/images/wiki/en/fileMenuExport.png On the wizard window, select an output folder path for the ".scaexp" file to be generated. After that, when you push on the "Start Export" button, the wizard will create the ".scaexp" file https://www.mikrodev.com/images/wiki/en/exportProject.png
 * Exporting Project

On the File menu select "Import Project" option: https://www.mikrodev.com/images/wiki/en/fileMenuImport.png On the wizard window, select the exported ".scaexp" file and a destination folder for the project files to be extracted: https://www.mikrodev.com/images/wiki/en/importProject1.png After that, when you push on the "Import Project" option, the wizard will ask for database connection settings. The project database will be extracted into the configured database https://www.mikrodev.com/images/wiki/en/importProject2.png When the operation is complete succesfully, the project is ready to be used.
 * Importing Project

Importing/Exporting Tags/Channels/Alarms
Users can import/export tag/channel/alarm definitions from/to other projects. After opening the project on ViewPLUS, on the Tools menu select "Export Tag/Channel Definitions" option: https://www.mikrodev.com/images/wiki/en/exportTagChannel.png When you confirm the export file path selection dialog, a file with ".tcf" extension will be created. You can use this file for importing into other projects. After opening a project on ViewPLUS, on the Tools menu select "Import Tag/Channel Definitions" option: https://www.mikrodev.com/images/wiki/en/importTagChannel.png Important Note: This operation will overwrite existing tags. Thus, this operation may damage your project. Be sure that the exported tag id interval and local project's tag id interval do not intersect!
 * Exporting Tags/Channels/Alarms
 * Importing Tags/Channels/Alarms

Importing/Exporting Users
Users created for a project could be exported to another project. Export/Import users menu could be used for that After opening the project on ViewPLUS, on the Tools menu select "Export Users" option: https://www.mikrodev.com/images/wiki/en/exportUsers.png When you confirm the export file path selection dialog, a file with ".usr" extension will be created. You can use this file for importing users into other projects. After opening a project on ViewPLUS, on the Tools menu select "Import Users" option: https://www.mikrodev.com/images/wiki/en/importUsers.png
 * Exporting Users
 * Importing Users

Important Note: This operation will overwrite existing users. Thus, this operation may damage your project. Be sure that the exported user id interval and local project's user id interval do not intersect!

= Macro Guide = ViewPLUS supports macros in different types. Some of these macros work on the server side, while others work on the client side.

The "macro tags" we define in the Tag/Channel Editor work on the server side. And it acts as a virtual tag. These macros work continuously on the server for the specified period.

On the editor, it is possible to write separate macros for each object. These macros affect the display and behavior of that object and are only executed when the user is watching the object.

Server Side Macro Tags
Macros can take two processing elements at a time and are written line by line.

Example:

[ v0 = $1234 * 2]

The operands that can be inserted into the macro are:

200 seperate variables(vo, v1, …., v199)

Tag values (in "$1234" format)

Constant values (Constant decimal values such as "234,12" can be added)

[ v0 = $1234 * 2]

v0 : The element to the left of “ = ” is the final result of the operation

* : Operators like “+, - , * , / , % , & , |, ^ , > , < , e ,b , k , n , ?“ could be used. Here:

e: Equality check. The result is "1" if the operands are equal to each other, and "0" if not..

n: Not equal check. If the operands are not equal to each other, the result is "1", otherwise it returns "0".

b: Greater than check. If the first operand is greater than the second, the result is "1", otherwise it returns "0".

k: less than check. The result is "1" if the first operand is smaller, and "0" if it is not.

?: This is a special operand.

[ v0 = 1234 ? 0]  : Returns the "RX Count" value of the tag with id 1234 (Read counter value)

[ v0 = 1234 ? 1]  : Returns the "Read Time" value of the tag with id 1234 (the time at which the latest data was read from the field)

[ v0 = 1234 ? 2]  : Checks whether there is communication with the device on which the tag with id 1234 is located

[ v0 = 1234 ? 3]  : Checks whether there is a valid value in the tag with id 1234.(In general, when a SCADA server is started for the first time, it may be late to write a valid value in the tag, or a valid value of the tag may never be written)

[ v0 = v0? 20]  : Writes server datetime into "v0" variable as the number of seconds that have passed since 1970-01-01T00:00:00

[ v1 = v0? 21]  : Writes server year into "v1" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

[ v2 = v0? 22]  : Writes server month into "v2" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

[ v3 = v0? 23]  : Writes server day into "v3" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

[ v4 = v0? 24]  : Writes server hour into "v4" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

[ v5 = v0? 25]  : Writes server minute into "v5" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

[ v6 = v0? 26]  : Writes server seconds into "v6" as "v0" is the number of seconds that have passed since 1970-01-01T00:00:00

Attention: Here the tag id (1234 in the example) must be entered into the macro as a fixed value without "$" at the beginning

Condition check:

In the following example, it is checked whether the variable "v0" is equal to 1. If "v0" is equal to 1, the macro executes the command on the bottom line (makes v1 value 555). If it is not equal to 1, the line is moved down by the second parameter ("2") of the "IF" line. In this example, if "v0" is not equal to 1, the macro will go down 2 lines, that is, it will go to the return value ([E]) line and it will be finished.

[ IF, v0 , 2]

[ v1 = 555]

[ E ]

Another condition control operand is “NI” (NOT IF). This checks the equality to 0 as the opposite of "IF"..

In the following example, it is checked whether the variable "v0" is equal to 0. If "v0" is equal to 0, the macro executes the command on the bottom line (makes v1 value 555). If it is not equal to 0, the line is down by the second parameter ("2") on the "NI" line. In this example, if "v0" is not equal to 0, the macro will go down 2 lines, that is, it will go to the return value ([E]) line and it will finish

[ NI, v0 , 2]

[ v1 = 555]

[ E ]

In order for macros to work correctly, a return ([E]  return) must be added

Client Macros
Client Macros: This macro is written in the same format as the "server macros". However, only tags defined on that object can be used within those macros The tags defined on the tag tab of objects are used as follows:

For each tag "i, o, s, w" values exist. i (in) : The raw value of the tag read from the field o (out):The value to display on the screen after the tag has been passed through the macro operations s (set):The value set by the user for the tag w(write): The value to be written to the field device after the value that the user wants to set is passed through the macro operations

i ---Macro>o, s---Macro>w If there is no macro operation 'i' is equal to 'o', 's' is equal to 'w'.

Display Tag Value
You can add dynamic content on some components. To achieve this, you should use the '$' operator and 'braces' ($ {....}): ${Tag_ID} As an example, you should write '${1234}' onto your component to display the value of a tag with the tag ID '1234' in your system.

Tank Level is ${1234}

this expression will be shown on the component like:

Tank level is 78

While working with "double precision" numbers, you can use "printf text format"(see section Object Properties Panel) to change the precision of the displayed value:

Tank Level is ${1234,%.3f}

If the value of the tag with ID '1234' is a double precision number like "567.123456", this expression will be displayed on the component like:

Tank level is 567.123

Performing Arithmetic Operations
You can perform arithmetic operations using the '#' operator and 'braces'(#{....}). In the examples below you can see how you can do an arithmetic operation:

Example: Elapsed time is #{ ${1150} / 3600 } hours or #{ ${1150} / 60 } minutes Will be displayed as: Elapsed time is 5 hours or 300 minutes

= Installing the License File =

To get a valid license please send your "hardware id" to sales@mikrodev.com. To learn your hardware id; select Help > User License Generator from the application menu. https://www.mikrodev.com/images/wiki/en/getLicense.png

After you receive a valid "license.dat" file, copy this file into bin folder of ViewPLUS application

https://www.mikrodev.com/images/wiki/en/binFolderPath.png

The licence will automatically be loaded when you restart the Editor