ViewPLUS Editor/en

SCADA projects are created with ViewPLUS Editor program. New visual components can be created using "Component Manager". User and group access rights are also changed through "User Manager".

= User Interface =

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 hide all panels.

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

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 interface editor, the tag/channel editor and the project configuration tools. At the bottom of the navigation buttons is a 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

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

= Creating New Project =

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

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


 * Select project name and location.

http://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 the PostgreSQL database is not installed on your system, you need to download and install the relevant version by clicking on "Download PgSQL" link)

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


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

http://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.

http://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". On the SCADA system you can design the main screen on this page.

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

= Tag and Channel Editor =

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.

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 PROTOCOL
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

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.

For detailed information on Modbus configuration check here.
 * 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 PROTOCOL
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 : ...

SNMP PROTOCOL
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.

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.

DATABASE CHANNEL
This is the type of channel used to make queries from SCADA's own database 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.

"Parameters"

Response Timeout: The number of milliseconds that represents the frequency at which the database query is executed.

Tag Settings
An example "Query" expression: WITH t1 AS ( SELECT  data_value from logs.tag_log  l where tag_id=19 AND data_value IS NOT NULL ORDER BY logtime DESC limit 1 ), t2 AS ( SELECT  data_value from logs.tag_log  l where tag_id=20 AND data_value IS NOT NULL ORDER BY logtime DESC limit 1), t3 AS ( SELECT  data_value from logs.tag_log  l where tag_id=29 AND data_value IS NOT NULL ORDER BY logtime DESC limit 1), t4 AS ( SELECT  data_value from logs.tag_log  l where tag_id=26 AND data_value IS NOT NULL ORDER BY logtime DESC limit 1) SELECT t1.data_value data1, t2.data_value data2, t3.data_value  data3, t4.data_value  data4 FROM t1, t2 ,t3,t4; : {${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.
 * 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},....}:

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

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

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.

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

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

Tag
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

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: Tag value and logins 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

= Page Features Panel =

http://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.
 * 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.

http://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.

http://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':

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

The scale is higher than '3':

http://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.

= Object Properties Panel =

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

Object Properties Panel 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" 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 -generator.html 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
 * 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.
 * 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.

http://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 =

= Email Server Settings = E-mail can be sent in case of an alarm to the user whose "e-mail send option" is marked as active from the user manager. For this, e-mail configuration settings must be made on the server. In addition, the smtp server to be used should allow "less secure application access". The configuration file "ServerEngine.ini" where the e-mail server settings can be found in the following folder: C:\Users\ \AppData\Roaming\Mikrodev\ ScadaServer\ \ServerEngine.ini In this file, the following variables must be set correctly under [SMTP]:
 * 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.
 * Macro: The script for the component is written in this box . For more information about macros, see the corresponding section.
 * 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 mouse.
 * Pictures: The images and index numbers defined in this component are displayed in this area.

[SMTP] SMTP_user = SMTP_pwd= SMTP_host= SMTP_port= SMTP_mailDelay=

You can use the this program to test the settings you have made.

= SCADA Visual 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.

SCADA Components

Basic Components
The basic components are located in the "SCADA Components" pane in the left panel of the Editor.

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.

http://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. "Component Properties Panel" is used to change the advanced properties of the component.

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.

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

Chart Component
Using the chart component, you can graphically view the data of the desired ethics. 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.

http://www.mikrodev.com/images/wiki/en/componentgraphics.png Chart Component : Graphical representation of the added component. 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 View Type: Sets how the chart will work.
 * 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

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

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

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.

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

Display Tag Value on Table
To add dynamic content into the table you should use the '$' operator and 'braces' ($ {....}): As an example, you should write '${1234}' to your table to display the value of a tag with the tag ID '1234' in your system.

Making Arithmetic Operations in the Table Cell
You can make arithmetic operations using table cells. You should use the '#' operator and 'braces' for this (#{....}). In the examples below you can see how you can do an arithmetic operation:

= 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)

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'.

Tooltip Macro: ${ID} : Returns the current value of the tag. ID is the id of the tag that is defined in the system.

Example: Pressure value is ${4004} bars : Pressure value is 5 bars


 * 1) {…..}  : Performs the arithmetic operation in parentheses.

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