Call us! 512-349-0334 or (877) INDUSOFT

Podcast: Developing HMI/SCADA Applications with Fabio Terezinho

This week we get a rare opportunity to speak to an expert in SCADA/HMI application development. Fabio Terezinho has been in the automation industry for nineteen years – seventeen of those years with InduSoft.  Fabio has experience in designing and developing software, as well as in application deployment, so we are excited to present his unique view on best practices for developing HMI/SCADA applications for a multitude of industries and processes. Fabio is one of the patent holders for a method of database gateway communicationmethod, and he is the director of product development and services at InduSoft.

Q: Fabio, Can you tell us more about your background?


Sure. I was born in Brazil and started my career there. I like to say that Industrial Automation picked me, more than the other way around.  I interned with an industrial automation company and fell in love with the process of writing software to control physical things. I’ve been working in the industry for more than 17 years now with InduSoft, and it has been a great pleasure.


Q: You’ve build hundreds of applications for all kinds of industries and customers, as well as demos and templates. What do you need to know before you start building an application?


The nice thing is that each application is unique, and that’s what keeps us fresh and excited in this work. But there are some commonalities that often form the base of any application. The number one important thing we try to do is understand the primary goal on a high level, rather than from a process view. The goal may be productivity, making the process safer, monitor data, control the machine, or all of the above.  We focus our energy on really understanding and achieving the primary goal before we start building anything.

As SCADA/HMI products like InduSoft Web Studio have evolved for better integration with IT and ERP, the project requirements have changed dramatically over the past decade, but to a large extent the project is still connected to physical components like the sensors and PLCs we take the data from.

Once we understand the process or the machine, a common starting point is the I/O. We analyze what kind of information is available and go from there.


Q: Speaking of I/O, Some customers want to know when it’s appropriate to use the native InduSoft Web Studio drivers, versus a protocol like OPC.


That’s a common question, and there is still a lot of misunderstanding about OPC and why we need native drivers when OPC exists. The reality is that there are cases where native drivers are more suitable, and cases where OPC is more suitable.  The reality is that there are a multitude of devices that support multiple protocols, rather than a single standard protocol built into the controller.

So as a rule of thumb, if you want the HMI  or SCADA package to exchange information with those controllers and there is a native communication driver available, it’s best to use the native communication driver. It will usually be faster and easier because there is no middleware, and it’s usually more affordable because you don’t have to spend time installing and maintaining an additional component.  However, in some cases an OPC server or OPC interface is more suitable than a typical driver. For example, when you have several clients and several stations running different software, like a historian or ERP system all communicating with the same device. So instead of communicating with each of the separate devices, you can have the OPC server acting as the central communication method, and OPC clients can exchange information with those nodes. Another typical case is when you need to communicate with a device for which there is no native InduSoft Web Studio driver, the OPC client in InduSoft is a ready-to-use solution.

We use OPC as a generic term for a standard protocol layer, but there are different varieties of OPC, such as OPC DA, OPC UA, or OPC XML. We do suggest that if you use OPC in a project that you use OPC UA, as it’s the most robust version and has many advantages for communication, performance, and security.


Q: Another question we get a lot is how to determine how many tags are needed for a project. Customers often know their I/O requirements, but not how many tags they will need.


I usually add 50% to the number of physical I/O points. So if you have a project with 1,000 physical I/O, I generally recommend a 1,500 tag license or even 2,000 if you want to be very conservative.  The nice thing about the licensing schema for Indusoft Web Studio is that if you miscalculate there’s no extra fee or penalty fee. You can just purchase the higher license level and only pay for the difference in price between one license and another.

How InduSoft Web Studio counts Tags


Q: So once I know how many I/O and how many tags I need, where do I begin building the actual project?


Well, we usually begin with the tag structure and start building the tag database, using classes and arrays when possible to make the tags easy to pull up and reference. There are many tools in InduSoft Web Studio that make it easy to reuse and organize tags.

From there, we go to the graphical interface and user interface, and then after that we go to the scripts that form the backbone of the application to make everything work. Having said that, it’s not a single linear action of creating tags, then graphics, then scripts. We repeat this micro flow many times throughout the project development to evolve the screens, add or link new tags, run tests, adjust the scripts, or anything else that’s necessary.


Q: So how do you ensure that you can re-use functionality and code as you work through this application? How can you apply your work to other projects?


That’s the main difference between an experienced application engineer and a novice – having the vision when you start the project to design it in such a way that it can be used again. You can find tags, scripts, or graphical elements that may be needed several times throughout the project, so you look for commonalities that let you apply it across the project without having to rebuild anything. Object-oriented programming is an old and popular concept but it saves time, and increases quality and efficiency. InduSoft has always been a productivity tool, and this concept has been a goal from day one. InduSoft Web Studio is meant to serve as a productivity tool that allows engineers to create HMI or SCADA applications without having to use a programming language and build everything from scratch. So InduSoft has always aimed to provide object oriented configuration tools, which means you do not have to be a programmer or a developer to use it.

So the first step is to evaluate what parts of the application you will need more than once, and then apply this process. For tags, it may mean creating classes, and for screens it may mean including indirect addressing, or indirect array indexes or tags. This will allow you to reuse screens and code for things such as global functions that may be called more than once. Ideally you realize this before you design the project, but if you start working and realize you are doing the same thing more than once, you should take a step back and reexamine why you are writing things multiple times, and organize your project in a way that allows you to reuse those elements. In 99% of cases, there is probably a better way if you’re redoing work. InduSoft was designed to make sure that you don’t have to re-write the same configuration more than once. It may take a bit of thought to create the structure up front, but the effort will be worth it many times over when it comes time to create and test the application.


Q: How is the approach different for building a template that may be used in different lines or different plants?


To clarify the term, we call generic applications that we make available to customers for customization templates. One example is our Business Intelligence dashboard template, which is a self-contained application that customers can run or embed in custom projects, and it provides a lot of built-in functionality like the ability to connect to a database or charts like pie or bar charts. We are developing a template for Pack ML now. So these templates are not built for one specific project, but rather for one specific goal or industry, and can be easily customized to be deployed to a particular machine or project.

Virtually any application we design here – even real-world applications for a single machine or a single project is automatically designed almost like a template. We do this because we know that projects are not static. The process, the machines, or even the demands or technology may change, so we develop every new application with a flexible interface that can not only be repurposed, but can also adapt to changes without having to redesign the entire application. InduSoft Web Studio was designed to accommodate those changes whenever possible. So whenever we develop a new application we take a high level view that will allow us to make changes or expand or include new functionality whenever demands or requirements change.


Q: What is the best way to bring outside images into InduSoft Web Studio for a richer graphic interface?


In a nutshell, the best way is to use a feature called ‘Linked Pictures’. So when you go to the graphic editor in the ribbon interface, there’s a shortcut for linked pictures. This is the tool for importing images from other programs in many different formats and link those pictures to your screen. Then you can apply animations to these images, like size, rotations, visibility, etc. There are many different formats supported, but PNG is usually the best option for linked pictures. It’s not as large as bitmap, which saves space and offers better performance, especially from thin clients. PNG also keeps a lot of quality from the original image, rather than jpegs, which are compressed. In some cases you may have the original AutoCAD files, and those are supported, but for pumps and valves, etc, PNG is usually the best option. Even the symbol library for the product, which includes over 1,000 symbols, uses PNG as the format. Every week on InduSoft we have a symbol of the week where you can download new symbols, and most of these are PNGs or native InduSoft Web Studio objects.


Q: Now that the project is built it needs to be debugged. What are some of the tools and tips you have for debugging projects in Indusoft Web Studio?


My favorite approach is to ask someone else to do that. But more seriously, there are many tools in the project to help do that. The main tool is the database spy, which is a nice interface in the development environment where you can search tag names and it will show you the current quality and value for the tag. There’s also the remote database spy, where you can also type in the IP of a remote device to monitor tag values remotely. You can not only monitor tags, but write values or execute functions or expressions and see the results right there.

But many times in the troubleshooting process, you need to know more than the value of a tag, but also how the tag got that value. So you need to know who wrote the value to the tag, when, or why. The next tool that we have for troubleshooting is called LogWin, which is available for remote monitoring as well, just like the database spy. In the LogWin, you can log not only current values of tags, but also the events of the application. So if you log a tag there, every time that tag changes a value, it will also log where the tag value was changed. These tools are extremely useful, as well as additional tools like the Cross Reference tool that allows you to see everywhere a tag, functions, or other text has been used in the application.

There is also a recent troubleshooting tool, which is the debugging tool for VBScript. It’s fairly unique among HMI/SCADA software. You can run the application in Debug Mode, which allows you to create break points in your scripts. Whenever the script reaches the breaking point it will pause, and you can then go through the script line by line and check the tag values and variables of that tag in the context of the script. It’s very useful and easy to use.

Q: What are your recommendations for testing applications before deploying them live?


I’ve worked in many different departments in the company, and we are always helping one anther  – especially in technical support. It’s not uncommon to have a call at Friday at 5:59 PM, where a system isn’t working or a machine has stopped working and needs to be fixed right away. So my recommendation is always to test as much as you can, in as many conditions as you can, in settings as similar as possible to the production environment. You can do this in a lab or an office outside of work hours, and it will save a lot of time and effort. Some situations can’t be replicated of course, but every minute you spend testing your application in the lab could mean saving hours during startup. Any downtime during startup means costs, and it’s always better if you can avoid that.

One nice thing that we built into InduSoft Web Studio specifically for these tests is that you can link the tag to many different data sources. In most HMI software products you link the tag to the driver which then sends the information out. But this can be difficult to test, because in many cases, you may not actually have access to the PLC or sensors when testing your HMI or SCADA application.

So in InduSoft, the data source for the tag can come from many sources, including the driver or even from scripts. So when we develop a project we set up communication with the PLC using the drivers, but when we need to test how the parts interlock with one another we create scripts in the application and disable the driver for the test. In the script we write what the process is supposed to do with the tags, and it should have the same effect as what the process is supposed to do with the actual PLC. It takes a bit of extra work to set up, but any hour that you spend in the office testing is saved many times over in deployment.


Q: How do you back up an application once you’ve gotten it ready to deploy?


Fortunately there is a very easy way to back up projects in InduSoft Web Studio. The best was is just to make a zipped file copy of the folder where the project is stored. When you create a project with InduSoft Web Studio you’ll find a folder of the project in the directory. If you don’t know where it is, you can always execute the function ‘getapppath’ in the database spy to get the location. Then you can zip the folder and have a backup of the entire project. Internally we make a backup of our projects every day as a matter of policy. We have a convention of naming the file with the project name, the folder name, and a suffix of the numerical date.  So for example is the project is named ABC, the backup will be titled something like  We recommend keeping the backups for at least the full week, and creating daily backups if possible.

If you have challenges in creating daily backups, or if you have several engineers working on the same project at the same time, I strongly recommend using the InduSoft Web Studio Collaboration Server , which has built-in revision control and allows more than one engineer to work on the project at one time. So as you make changes and check in and check out, all the changes are stored on the server and backups are made automatically. It’s an add-on to the license for InduSoft Web Studio and works with Microsoft’s Team Foundation Server.

Q: Security is a huge issue – too big to go into all the details, but if I connect my system to the enterprise, is there a way to access the existing authentication structure?


Security is one of the foundations of InduSoft Web Studio and we have been incorporating security tools from day one. Security is a continuous project as new technologies and new requirements become available. So just to brush on the security features of InduSoft Web Studio, there is the ability to configure user groups and policies either locally in Local Mode, or linked to the Active Directory using a standard LDAP protocol. This is especially important in pharmaceutical and food and beverage industries, which have very strict regulations. It’s a common requirement to be able to access the security system without having to manage everything locally.

With this functionality all the HMI stations on the same network can share the same security settings, so it’s very easy and time-saving to incorporate your network-level security and auditing logs, etc. to InduSoft Web Studio projects.  This can be leveraged to create applications compliant to standards like FDA 21 CFR Part 11, which need to include the ability to add comments when you acknowledge an alarm, or have a built-in event logger for actions taken by the users. Especially when you get to thin clients, authentication and verification can be very important.

There are many aspects of security, but one that is typically overlooked by HMI packages is the intellectual property of the system integrators.  In InduSoft Web Studio, it’s very easy to create a password that encrypts the whole application. So even if someone else has access to the application and a licensed version of InduSoft they won’t be able to open or view the screens without the password.


Q: How do you predict Industrial Automation will change in the next ten years?


Whenever I try to think about how the industry will change in the future as we address the product roadmap, what I try to do is put myself in the customer’s shoes. So instead of thinking as a supplier, we try to think as a customer and ask what we’d demand from the product that we don’t have today. And I think for me, the answer is aligned with what we are seeing in the industry, which is more global connectivity. So the Internet of Things is obviously a hot trend, and will create a real revolution. The islands of automation are being integrated and now we are seeing the same integration on the enterprise level. I see this going beyond a single application or a single facility, but also looping in vendors, suppliers, and even consumers.

So we are seeing an explosion of hardware protocols and solutions for the Internet of Things, and InduSoft Web Studio is positioning itself to keep the same principals of easy-to-use tools that help customers achieve goals quickly. We want to allow engineers to achieve their process goals with minimal technical requirements.

Another big revolution I see is virtualization. Software is being sold more as a service now – it’s not a matter of releasing a static product anymore. The notion of versions will obsolete for customers. I anticipate that they will subscribe to a software services and all version changes and updates, patches, etc, will be delivered behind the scenes.


Q: There are many students who use our software. What advice do you have for someone entering the industry now?


One thing that I heard when I was young that seems more and more true is that “You need to have 1% Inspiration, and 99% Perspiration.” So even when we talk about exciting new technologies and changing the world in InduSoft, it all comes after a lot of hard work. So it’s very exciting to design and build novel new things, but be patient, have good ethics, and wait to see the results.

Comments are closed.