Setting Up a Cluster Network

IGX Cluster Network module is designed for scaling and distributed configuration. The cluster module is divided into two parts; Cluster Master and Cluster Node. It is suitable for large scale projects with huge amount of IO tags by breaking down the tasks and distributing them across multiple nodes. 

Example of a cluster network.

Part 1: Configuring the Cluster Master

  • Firstly, create a new project with a suitable name.
  • On the Task pane, select Cluster Network. Cluster Network is set to False by default. Change it to True to enable it.
  • Next, provide a Username and Password. Save. The nodes will connect to the master using this username and password.

Cluster Master setting

  • Go to Virtual Tag and create a tag.

Note: All master and nodes needs to have identical virtual tag  to transfer data between them.

 

Part 2: Configuring the Cluster Node

  • Similarly, create a new project with a suitable name.
  • Select Cluster Network, by default, it is set to False. Change it to True to enable it.
  • Insert the same username and password.
  • Next, expand Cluster Network on the Task pane and select Remote Master.

  • Next, create a new node entry. Insert the IP address of the Master under Host. Insert the username and password of the cluster master under Username and Password.

  • Finally, create a virtual tag. Make sure that it is identical to the Master’s tag. Save and run both projects.

Reminder: Data cannot be transferred between Master and Node if the tag is not identical Therefore, please ensure that the tags are identical.

This article will guide users on how to configure a MQTT Publisher and Subscriber using a public broker. It is divided into two parts; Part 1 and Part 2.

 

Part 1: Configuring the Publisher

  • First of all, user need to enable the MQTT Publisher driver. Select IO Server on the left pane and enable the MQTT Publisher and save.
  • To configure a broker, select MQTT Publisher under IO Server. Create an entry and under MQTT server, type in the address of the public broker and save. If user wishes to use a local broker, type “localhost” under MQTT server.

  • To add a publisher tag, first user must create a virtual tag. Select Virtual under Tag and create a string type tag called “Publisher“. Save.
  • Finally, to assign the tag as a MQTT publisher tag, right-click the tag, select Add to IO Server, select MQTT Publisher, Select Broker and select Tag.
  • Under Topic, type in “/ecava/MQTT/test” and save.

  • User can now start to publish messages to the topic.

 

Part 2: Configuring the Subscriber

  • Firstly, user need to create a subscriber tag. To do that, under Tag, select IO Driver. Create an entry named “MQTT” and type in “iot.eclipse.org” or “iot.eclipse.org:1883” under Address. Save.

  • On the left pane, select MQTT under IO Driver. Create an entry with a suitable name and select the desired Timer. Under Driver, select the MQTT driver. Save.

  • Select the entry created from the step above on the left pane and create an entry.This entry will be the subscriber tag. Give a suitable name and type in “/ecava/MQTT/test” under Path.

  • User can now subscribe to the topic. Any messages published to the topic will be retrieve by the subscriber tag.

Check out this great article on how to troubleshoot your project using MQTT Spy software.

This article uses Microsoft Access database that comes with the Demo project. To setup PostgreSQL database for SCADA, refer to this article.

  • In Project Editor, create two database and name it mdb_1 and mdb_2.
  • Open project folder, make two copies of dblog.mdb and rename it to dblog_1.mdb and dblog_2.mdb.
  • Copy the codes below and paste it in the Connection String column for mdb_1 and mdb_2.
Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DBQ=<PROJECT>\dblog.mdb;DefaultDir=<PROJECT>\;Driver={Microsoft Access Driver (*.mdb)};"
  • Change the database name (bold) in the codes above from dblog.mdb to dblog_1.mdb for mdb_1 and dblog_2.mdb for mdb_2.
  • Open project folder, make two copies of alarm.htm and rename it to alarm_1.htm and alarm_2.htm.
  • Go to Screen, create two alarm entries, Alarm Plant 1 and Alarm Plant 2
  • Select alarm_1.htm as path for Alarm Plant 1. Select alarm_2.htm as path for Alarm Plant 2.
  • To assign individual database for each alarm pages, open Alarm Plant 1 screen in Project Editor to view the html codes.
  • Scroll down to the end of the codes. Look for “dbgroup“. 
"dbgroup":"msql"
  • Change “msql” to “mdb_1” and Save. Do the same for Alarm Plant 2 screen by changing “msql” to “mdb_2“.
  • Under Alarm, select Group and create two new groups, Group_1 and Group_2. Under Log To column, select mdb_1 for Group_1 and mdb_2 for Group_2.
  • Run the project and you will have two individual alarm databases.

Give it a try an let us know if you require any assistance. Check out our blog for more guides and articles. Good luck!

This article will guide users on how to add a client to an Active Directory Domain Services.

For server-sided configuration, see Part 1.

Connect Client To Domain
  • Open Network and Sharing Center. Click Change adapter settings on the left. Right-click on Local Area Connection, select Properties. In the Local Area Connection Properties window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  • Under General tab, make sure that Obtain an IP address automatically is checked. Check Use the following DNS server addresses and key in the server’s IP address. Click OK when done.

  • Right-click My Computer, select Properties.
  • Under Computer name, domain, and workgroup settings, click Change settings and System Properties window will pop up.
  • Under Computer Name tab, click Change and Computer Name/Domain Changes window will pop up. Give a recognizable name for the PC.

  • Check Domain and key in the domain created earlier and click OK.
  • User will be prompt to key in a username and password to join the domain. Key in the user account that is registered to the active directory domain.
  • After successfully joining the domain, user will be prompt to restart the PC.

Note: If you are using a virtual machine, don’t forget to configure the bridged adapter or you won’t be able to connect them to the same network.

In case you haven’t known, IGX allows you to use external user authentication system. So that you can administrate one user database for several systems from different vendors. Active Directory Domain Services developed by Microsoft is a directory service for the Windows domain networks. It turns the server into a domain controller which authenticates and authorizes all users and computers in the domain network.

In Windows Server 2008 R2, the Initial Configuration Task (ICT) window is set to launch during startup. In case it has been closed, it can be opened by running the command “oobe.exe” in command prompt.

Configure Networking
  • In the ICT window, under Provide Computer Information, click Configure networking. Right-click on Local Area Connection, select Properties.
  • Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Give the server a static IP and for the Preferred DNS server, it will be 127.0.0.1. Click OK when done.

Add Roles
  • In the ICT window, under Customize This Server, click Add roles.
  • In Add Roles Wizard, click Next to get to the Server Roles list. Check Active Directory Domain Services and a window will pop up. Click Add Required Features. Click Next, Next and Install. Click Close when done.
Setup Domain Controller
  • Run the command “dcpromo.exe “. An Active Directory Domain Services Installation Wizard will pop up.
  • Click Next until user see Choose a Deployment Configuration. Select Create a new domain in a new forest and click Next. Key in a name and add “.local ” after the name (e.g.: igx.local ) for a local domain and click Next.
  • In Set Forest Functional Level, select Windows Server 2008 R2 and click Next.
  • In Additional Domain Controller Options, make sure that DNS server is checked and click Next. A window will pop up, click Yes to continue.
  • In Location for Database, Log Files, and SYSVOL, user can either change the database folder location or use the default locations. Click Next when done.
  • In Directory Services Restore Mode Administrator Password, key in password of choice for Restore Mode Administrator account and click Next.
  • In Summary, click Next and the installation will begin. Click Finish and click Restart Now.
Create Users
  • Go to Start, Administrative Tools, select Active Directory Users and Computers.
  • Expand the newly created domain on the left pane and double-click Users. All users will be displayed on the right pane. Right-click on an empty space on the right pane, select New, select User.
  • Key in the details of the new user and click Next. Key in a password. User can either uncheck User must change password at next logon or leave it checked and click Next.
Setup DHCP
  • Go to Start, Administrative Tools, select Server Manager.
  • In Server Manager, click Roles on the left pane. On the right pane, under Roles Summary, click Add Roles and the Add Roles Wizard will appear.
  • In Add Roles Wizard, click Next to get to the Server Roles list. Check DHCP Server and click Next.
  • In Select Network Connection Bindings, click Next.
  • In Specify IPv4 DNS Server Settings, make sure that the parent domain is the newly created domain which is cool.local. For Preferred DNS server IPv4 address, key in the server’s IP address which is 10.0.2.15 and not the localhost IP (127.0.0.1). Click Validate to check the validity of the IP. For Alternate DNS server IPv4 address, leave it empty and click Next.
  • In Specify IPv4 WINS Server Settings, user can leave it as default and click Next.
  • In Add or Edit DHCP Scopes, click Add on the right to add scope.
  • In Add Scope pop-up window, key in the Scope name, Starting IP address, and Ending IP address. Key in the Default gateway at the bottom. Run “ipconfig” in command prompt to check the default gateway. Click OK to close the Add Scope pop-up window and get back to Add or Edit DHCP Scopes. Click Next.
  • In Configure DHCPv6 Stateless Mode, check Disable DHCPv6 Stateless mode for this server and click Next.
  • In Authorize DHCP Server, make sure that Use current credentials is checked and click Next.
  • In Confirm Installation Selections, click Install. Click Close when done.

For client-sided configuration, see Part 2.

It’s common to know that traditional SCADA can be very pricey when you need to add a little features here and there upon customers’ request. In case you need to work on any traditional SCADA and wish to incorporate some beautiful and affordable features in IGX, you could just use Web Client to house IGX with ActiveX Control. As such this is the guide showing you how to embed IGX into Wonderware Intouch, you could probably do the same with other traditional SCADA using the same concept.

  • Installing Microsoft Web Browser ActiveX Control

First, open the Wizard/ActiveX installation by going to the Special menu. Next, select Configure and select Wizard/ActiveX Installation. A Wizard/ActiveX Installation popup will appear and click on the ActiveX Control Installation tab. Under Available Active controls, look for Microsoft Web Browser and click Install.

  • Inserting Web Explorer into project

Click on the Wizard tool icon to open the Wizard Selection Tool. Next, look for Explorer under ActiveX Controls and click OK.

  • Adding a button to open an IGX project web address

First, create a button. Double-click to open the animation link and click Action. Then, click Insert ActiveX Control icon to bring up the ActiveX Control Browser. Under Control Name, select the correct ActiveX object name if more than one exist. Under Method/Property, select Navigate (“String”,“Pointer”,“Pointer”,“Pointer”,“Pointer”) and click OK.

Next, change the parameters by replacing “String” with the target URL.

  • Changing the version of Internet Explorer (IE)

Microsoft Web Browser ActiveX is by default registered in IE 7 Standards mode. There will be javascript errors if user tries to open IGX project link without changing the IE version first. To change the version, open RegEdit and navigate to the following registry key:

For 32-bit system: HKEY_LOCAL_MACHINE\Software\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

For 64-bit system: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\InternetExplorer\MAIN\FeatureControl\
FEATURE_BROWSER_EMULATION

Next, create two DWord entries named “vm.exe” and “view.exe”. Then set both entries as decimal base with value data of 11000. This will tell the Microsoft Web Browser control to switch its’ emulation to IE 11.

For more info regarding browser emulation, visit Microsoft Internet Feature Controls.

  • Testing your project

Below is the sample screen of how the project looks in run mode. IGX has been embedded successfully in Wonderware Intouch by using Microsoft Web Browser ActiveX function.

Ecava IGX comes with two types of distribution, one is standard MSI installer, added since 2014 is another portable package which you can run out of the box. This mean you can unzip the distribution and carry around in your USB drive or access from virtually anywhere via fast network, as well as many many other benefits that you can discover.

Now we wish to highlight one of the advantages of having portable edition, whereby you can test drive the latest version, get the portable version authorized, ensure everything runs well before you uninstall the old version. This way you can perform your upgrade with the least disruption to the existing licensed version.

Ecava IGX licensed allows you to have free upgrade within 1 year after purchase. After that you may still purchase version upgrade with major version jump for more benefits and better performance or stability.

To avoid disrupting the existing licensed version, you don’t have to and should not uninstall existing version. But you may use latest portable distribution to run side-by-side and get the new version authorized and start your monitoring.

You may use product key to do online authorization or generate ILR file for offline from the targeted machine. You just need to ensure the latest version can be successfully authorized first. After confirming everything is well with new installation, then you may uninstall the previous version.

IGX could be the first SCADA that offered portable distribution, or have you heard any other SCADA did that since 2014? It’s a big effort for IGX technical team to produce portable distribution for such a complex SCADA system, so do go to download page and choose your portable distribution to enjoy the benefits. And simply write to support if you want different version than the official version from the standard download link.

Image Credit: LiquidSnake

Mr. Wachira has recently asked how to do moving averages in SCADA, that made us recall how troublesome is to do some simple calculations in traditional SCADA. It can be even more painful when you need to deal with proprietary programming language. As such we are more than happy to share how elegant to calculate moving averages in IGX Web SCADA using standard JavaScript.


The trending showing two lines from same source, but one has applied with moving average, and you know exactly which one.

Below is the code listing which is completely self explanatory with 100% comment. Only thing to note is that getTag() & setTag() is the external functions for fetching and storing data from and to your database or real-time system.


//set a constant for total sample, the bigger the more stable but less reactive
var MAX = 10;

//simulate raw input data.
var data = Math.random() *100;

//fetch list of raw data that previously stored in string
var list = getTag( "avg_list") || "";

//convert string to array
var a = list.split(",");

//push in new raw data into array
a.push( data);

//magic code sums up values in array, otherwise a loop is needed.
var sum = a.reduce( function(x, y) {return (+x) + (+y);}, 0);

//variable length to cater for initial values.
var l = a.length;

//Result is sum divide by sample quantity, default 1 to avoid 0 div err.
setTag( "avg_data", (sum/l) || 1);

//shift out oldest data
if (l > MAX) {
    a.shift();
}

//store array back into string
setTag( "avg_list", a +"");

Do you have any inquiry which we should share too?

SCADA Report is good to have selectable column if you have long list of parameter logging, and when you want to do side by side comparison, or narrow down to small group of data for analysis. You can do this for your operator by adding a dropdown list of checkboxes and a standard script snippet. To illustrate the steps, we use snapshot report in the demo as the example for this guide.

Demo showing columns for Part B, D and E only.

Step 1: Add checkboxes

It’s a lot tidy to add checkboxes into a dropdown list. So the dropdown is attached to the existing report title called Production Log.


<div class="container">
<div class="dropdown">
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown">Production Log
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><label><input type="checkbox" class="part-a" /> AAA</label></li>
<li><label><input type="checkbox" class="part-b" /> BBB</label></li>
<li><label><input type="checkbox" class="part-c" /> CCC</label></li>
<li><label><input type="checkbox" class="part-d" /> DDD</label></li>
</ul>
</div>
</div>

Step 2: Associate checkbox with the report column

Associating the checkboxes with the relevant columns is easy, all you need to do is to add the exact same class name into the <th> element like the checkbox in the menu item.


<tr>
<td>Description</td>
<th class="part-a" >Part A</th>
<th class="part-b" >Part B</th>
<th class="part-c" >Part C</th>
<th class="part-d" >Part D</th>
</tr>

Step 3: Copy and Paste Code Snippet

Last step is simple because no modification needed, just paste the code at the end of your HTML report file.


<script>
$(function () {
var $chk = $(".dropdown input:checkbox");
$chk.prop('checked', 1);
$chk.click(function () {
$("table").find('tr :nth-child('+($($("table th").filter("."+$(this).attr("class"))).index()+1)+')').toggle();
});
});
</script>

3 easy steps are really all you need to make your Ecava IGX report to have selectable data column. However, be informed that this method is only suitable for fixed row report just like snapshot report that have a constant layout. You may also use this in statement report when opening archieved report from the database.

Viewing dynamic runtime report will witness the truncated layout. Although harmless but not graceful. If you need to have selectable column for real-time report that is still growing, you will need next IGX internal system enhancement. Drop a line to support and we will notify you when it’s released later. Also feel free to write to us if you have any feedback or need something else.

We highly recommend JavaScript as your scripting language despite Ecava IGX do support VB Script for awhile now. As compare to VB Script, JavaScript is the language of the web and for the future. JavaScript is powerful and flexible, but flexibility itself has pros and cons. JavaScript is very linient on syntax, for example it’s OK to skip semicolon at the end of each line, but this flexibility itself might cause you trouble in future.

So it’s good to check out some good practices in the market, like Google Guidelines. They may help you to reduce your chance of making mistakes and hence reducing your troubleshooting time. You don’t have to follow them all, but you must understand what’s the reason behind if you choose to go against them.

One tool that worth take a look is http://jshint.com/. If you copy paste a JavaScript code from a typical IGX project into JsHint, you should only see two undefined variables: that’s getTag() and setTag(). Otherwise it would be any debugging functions like debugTag() and debugString(). You can see the highlighted functions when you mouseover on the warnings.

Yes, in case you haven’t known, do checkout debugTag and debugString which are two debugging functions that we created to ease your troubleshooting work. Just remember to click on Debug button to turn on Debugging mode from Server, and you shall see pink text being logged in Script task.

One simple step to narrow down any of your troubleshooting scope is to start new and do small.

This year we’ve got special season’s greetings from Romania. Yes, Craciun Fericit! that’s how you say Merry Christmas in Romanian. We are very pleased to see many companies from more than 50 countries become very successful after using Ecava IGX.

We have been working hard, we even had our beta release during Christmas Eve. We have just added the nice module called Datamap. Datamap is a small and easy module that can be used for any data viewing or recording purpose. It can be used for equipment/maintenance list, or simply as a data map to any database table for visual, record, reporting or any info management purpose. Sometimes you may just want to have a spreadsheet for operator to record down some notes for operation needs. Datamap can do just that! Check out this common beta link that we keep updating the installer. We can be sure you will get the Xmas Eve version so long you download before New Year eve.

We wish to thank everyone for your continuous support, and we will strive to develop and enhance IGX to another level, so you could win more businesses. Yes, wishing you happy holidays and a more prosperous Year 2018!

How do you ensure your remote client would point to standby server IP when the primary server failed or shutdown for update? It’s common that you want to offer best user experience with seamless transition during any maintenance work. So you would need single IP for remote access although you have multiple servers behind. And Network Load Balancing will help you to achieve just that. This guide shows you how to achieve SCADA redundancy with NLB in Windows Server 2008 R2.

  1. From Window Start menu, point to Administrative Tools, and then click Server Manager. In the Features Summary area of the Server Manager main window, click Add Features.
  2. In the Add Features Wizard, select the check box next to Windows Network Load Balancing.
  3. Click Install.

To create an NLB cluster:

  1. To open Network Load Balancing Manager, click Start, click Administrative Tools, and then click Network Load Balancing Manager.
  2. Right-click Network Load Balancing Clusters, and then click New Cluster.
  3. Connect to the host that is to be a part of the new cluster. In Host, enter the IP address of the host, and then click Connect.
  4. Select the interface that you want to use with the cluster, and then click Next.
  5. In Host Parameters, select a value in Priority (Unique host identifier). This parameter specifies a unique ID for each host. Click Next to continue.
  6. In Cluster IP Addresses, click Add to enter the cluster IP address that is shared by every host in the cluster. This is also the virtual IP addresses by which the cluster will be accessible on the network Click Next to continue.
  7. In Cluster Parameters, enter the full Internet name of the cluster. In Cluster operation mode, click Unicast to specify that a unicast media access control (MAC) address should be used for cluster operations. Click Next to continue.
  8. In Port Rules, click Edit if would like to modify the default port rules. Else, click Finish to create the cluster.

To add more hosts to the cluster :

  1. Right click on the cluster name and select Add Host to Cluster.
  2. Enter the IP address of the host to be added as a new cluster node and click on Connect.
    Select the interface that you want to use with the cluster, and then click Next.
  3. Configure the host parameters (specify the unique ID/ priority for the new node). Click Next to change any of the cluster port rule settings.
  4. Click Finish to add host to the cluster.

Once finished, the new host will be listed in the manager screen with a status of Pending, followed by Converging and finally Converged.

Additional References:
Microsoft Technet

Techotopia – Building a Windows Server 2008 Network Load Balancing Cluster

Youtube Video Guide

Ecava IGX SCADA is committed to support all Windows versions that is currently supported by Microsoft, including Windows 10. When we say support doesn’t just mean running well and installing smoothly, but also mean uninstall without hassle, Windows 10 has launched its successor for old “Programs and Features” with brand new ‘Apps & features”. And you may find that the uninstall button for IGX may appear to be disabled in ‘Apps & features’.

Apparently all you need to do is got to Windows Start menu then right click on Ecava IGX to call out the good old “Programs and Features”, you can then proceed to uninstall as usual.

Since Ecaca follows Microsoft policy on discontinued Windows version, this also mean Ecava IGX version 6 and above no longer support Windows XP. In any case that you need to use Windows XP, do fallback to previous version 5 instead.

Note that you don’t have to uninstall for version upgrade, but only when you need to downgrade to previous version. Otherwise we trust that the reasons for you to uninstall are for migrating to another machine. In any case that you find IGX doesn’t fit in your application now, do share with us and write to support. We shall work hard to meet your requirement, so that you can reinstall and enjoy the benefits of Ecava IGX like many others soon.

It’s common requirement to indicate device status or trigger alarm upon any communication failure. You can easily check for device connection status using app.device[X], whereby X is the entered device name. However, there are times that your sensors or devices could be connected behind other gateway or any server. Hence you may always get a good connection status from gateway even though the sensor is down. So the only way to check for connection status is to monitor for timeout since the targeted sensor or device’s data change.

The first step is to associate current time as virtual tag, which will be used as limit reference and will be keep on shifting dynamically.


//seconds since 1970 in integer
setTag( "sec1970", ((new Date()).getTime()/1000)|0);

The second step is to update the last known timestamp added with timeout limit, whenever good data is received.


var LIM = 5;
var d = (new Date()).getTime();
setTag( "sensor001_time", (d/1000+LIM)|0); //last known update time plus timeout.

Finally you just need to add 2 tags into alarm for tag to tag comparison.

You only need to trigger this script every second or slower, depending what’s the additional delay that you can accept. Everytime the tags are changed, the Alarm task will be triggered to check. If you have a slow machine, then try to trigger as slow as possible.

TIPS: The trailing |0 in above examples is just the shortest and fast syntax to convert floating point to integer. You may convert a floating point tag to integer tag with expression just like this: $my_float_tag|0

In order to use SCADA modules / features like Trending, Alarm and Report for your project, it is required to create the database in PostgreSQL before configuring other database dependent module in IGX Project Editor.
The steps to create a database in PostgreSQL are simple.

  1. Launch pgAdmin from your Windows. (You can simply click on Windows Start and search for “pgAdmin”.
  2. After the user interface loaded, right click on “Databases” and select “Create” > “Database”.
  3. A configuration window shall be opened (as shown below). Enter your desired database name for your dedicated SCADA report, and click on “Save”.
  4. That’s it. Your report database has been created. You may verify it by expanding the “Databases” branch and locate your newly created database.

In case you wonder, you don’t have to create any table for SCADA, as all required tables will be automatically generated for you.