HMI and SCADA Archives | DMC, Inc. https://www.dmcinfo.com/blog/category/manufacturing-automation-intelligence/hmi-and-scada/ Tue, 23 Dec 2025 14:46:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://cdn.dmcinfo.com/wp-content/uploads/2025/04/17193803/site-icon-150x150.png HMI and SCADA Archives | DMC, Inc. https://www.dmcinfo.com/blog/category/manufacturing-automation-intelligence/hmi-and-scada/ 32 32 Ignition 8.3–What’s New and Reasons to Upgrade Your Project https://www.dmcinfo.com/blog/15670/ignition-8-3-whats-new-and-reasons-to-upgrade-your-project/ Thu, 13 Feb 2025 16:48:10 +0000 https://www.dmcinfo.com/blog/15670/ignition-8-3-whats-new-and-reasons-to-upgrade-your-project/ Ignition 8.3 is almost here, delivering a wave of powerful new features and enhancements that will make it the most advanced version of Ignition yet. Whether you’re looking for improved performance, enhanced security, or game-changing new tools, Ignition 8.3 delivers innovations that can transform the way you design, deploy, and manage your industrial applications. From […]

The post Ignition 8.3–What’s New and Reasons to Upgrade Your Project appeared first on DMC, Inc..

]]>
Ignition 8.3 is almost here, delivering a wave of powerful new features and enhancements that will make it the most advanced version of Ignition yet. Whether you’re looking for improved performance, enhanced security, or game-changing new tools, Ignition 8.3 delivers innovations that can transform the way you design, deploy, and manage your industrial applications.

From cutting-edge visualization capabilities to streamlined development workflows, this release is packed with upgrades that make it easier than ever to build scalable, efficient, and future-proof systems. In this blog, we’ll dive into the most exciting features of Ignition 8.3 and explore why upgrading to this latest version is a smart move for any organization looking to stay ahead in the world of industrial automation.

Technical Improvements and New Features

The new improvements of Ignition 8.3 can be classified into three broad categories: Applications, Power Historian, and Infrastructure. Each category contains improvements in current features and new features that will be valuable to users. Some features that we are particularly excited about are the event streams, power historian, new Siemens driver, and improved GIT integration. Read on for a detailed look at these exciting features in version 8.3. 

Applications 

The application improvements encompass changes to the Designer and the Gateway that will make the day-to-day development of Ignition a breeze.

Perspective Drawing Tools

The highly anticipated Perspective Drawing Tools have arrived in Ignition 8.3! This release introduces powerful new Drawing Tools alongside a native Drawing Editor, providing a seamless way to create and manage graphics within Perspective. Featuring a robust vector drawing package, these tools make it easier than ever to integrate Scalable Vector Graphics (SVGs) into your projects. Plus, with native binding integration, animating elements has never been more intuitive—enabling developers to craft dynamic, interactive visualizations with ease. 

Perspective Forms

The new Perspective Forms component brings a powerful and flexible way to capture and manage user input. This component allows users to configure the fields in the form, including its layout and validation process to suit the user’s needs. Forms being a popular way of capturing data makes this component an exciting one. Not only will it make the visuals look more consistent, but will also make it easy to handle submissions and validations for the data. 

Perspective Offline Mode

Offline Mode enables users to collect data even without an active network connection. Once the system reconnects, the data is seamlessly synchronized with the Gateway. This feature is particularly useful for entering data in remote locations where network service is unavailable. 

Event Streams

This new feature in Ignition 8.3 is a way to trigger data flow through the system and can function as a method of communication within and outside of Ignition. Event streams get triggered from a source which can be a message handler, API endpoint, Kafka, etc. The event source then goes into the Data Filter & Transform where you can add scripts or filters to your data to massage and transform the data between the source and the handler. Finally, the data goes to the Data Buffer and then the handler sends the data to its destination.  

Event Streams in Ignition

Event Streams are a big shift in the way data is handled in Ignition. This powerful new architecture unifies multiple data sources into a seamless, event-driven framework. By consolidating these elements, Event Streams provides a more efficient and dynamic way to handle data throughout your system. Additionally, with robust error handling methods and a built-in test mode, it makes it easier for developers to build robust data pipelines.

New Gateway UI

With the intent to make Gateway UI work better at scale, Ignition 8.3 is going to have a new Gateway UI designed from scratch. It will have improved search functionality and bulk editing capabilities to make finding and changing gateway configurations a lot easier. 

Power Historian 

Ignition 8.3 introduces a new Historian, streamlining the implementation of the Ignition Historian. The Power Historian enhances integration with platforms like Snowflake and Influx while removing the need for a history splitter between local and remote historians. Good news for the Power Historian is that it is included in the existing Historian Module, so existing users with a support contract will get it when they upgrade to 8.3! 

Features 

  • Supports ~2M tags ingested as compared to ~500k in the existing historian
  • Easy configuration 
  • Richer data modeling capabilities 
  • Open source and cross-platform integration 
  • Ability to change the path of a tag without losing history

Probably one of the most exciting features of Ignition 8.3, the Power Historian will add a lot of value to projects due to its greatly improved capacity and performance.  

Infrastructure 

With Ignition 8.3, IA also promises to bring about “the new SCADA” which include a lot of improvements that we as developers are very excited about. It includes the following new infrastructure features.

Source Control Compatibility and Secret Provider

Source control compatibility is another much-awaited feature added to Ignition 8.3. Along with making collaboration and deployments easier, this feature will also make projects more secure with its secrets management functionality. This feature includes:  

  • New file structure and configuration will enable source control compatibility (easy integration into Git and other platforms). 

  • Source control will also have a Secret Provider capability to keep confidential information such as passwords, keys, and bearer tokens safe. 

  • Secrets management also makes it easier to change passwords since every password usage can be linked to a location in the Secret Provider.

Gateway Settings Configuration via REST API

Gateway settings can be configured via scripting and Ignition will autogenerate a REST API schema document based on the modules installed on the Gateway. 

Deployment Modes

The deployment modes promise to be a huge improvement for the developers and process owners alike. This will give the system the ability to run a Gateway in different modes with alternate settings will make developing, testing and deploying a smoother process. 

  • Users can now define any number of modes on the Gateway to enable ease of deployment across modes. 

  • In each mode (for instance Development, Staging and Production), users can define alternative settings for any configuration. 

    • For instance, Development mode could be set up to use a Simulator while Production mode interacts with an actual device. 

  • All production modes are stored in a single gateway backup. This means one Gateway backup can be used across all Gateways and eliminates the need for tracking differences between Gateways. 

Updates to OPC-UA

With the new Ignition version, users can specify which tags to share with specific OPC UA clients. OPC events will also be added to event streams and will be logged on to the Gateway. 

Other New Features

  • New Siemens S7+ driver will have the capability to browse PLCs for tags with symbolic addressing capability
  • Twilio voice notification and Whatsapp integration 
  • Improved Alarm Aggregation and Security 
  • Improved searching and filtering across Gateway and Designer 
  • Kafka integration 
  • Kubernetes integration with Helm Charts 

Ignition 8.3 promises to be a significant step up in the SCADA platform’s capabilities! 

Why Should You Upgrade 

Still on the fence about upgrading to Ignition 8.3? Beyond the exciting new features, we talked about above, here are some key details to help you decide if an upgrade is right for you. 

First, the upgrade process will be seamless from 8.1 Gateways. If you’re running an older version, it’s best to upgrade to 8.1 first before making the jump to 8.3. 

Additionally, 8.3 is expected to have long-term version support and regular updates. With the release of 8.3, it is expected that releases for 8.1 will slow down and be mainly focused on bug fixes and security updates. While 8.1 is expected to be supported through 2028, active support for 8.1 will end in 2026–meaning now is the time to start planning your transition. 

If you are interested in upgrading your Ignition SCADA project to Ignition 8.3 or building a new one, feel free to contact us today. 

The post Ignition 8.3–What’s New and Reasons to Upgrade Your Project appeared first on DMC, Inc..

]]>
DMC Wins the 2024 ICC Build-a-Thon https://www.dmcinfo.com/blog/15927/dmc-wins-the-2024-icc-build-a-thon/ Mon, 14 Oct 2024 10:50:26 +0000 https://www.dmcinfo.com/blog/15927/dmc-wins-the-2024-icc-build-a-thon/ DMC’s team was proud to win first place at the Ignition Community Conference (ICC) 2024 Build-a-thon in Folsom, CA. After finishing first in a field of 24 Premier Integrators in a preliminary round, we faced BIJC Ltd in the final round of the competition to build a solution in two short days.   Congratulations to […]

The post DMC Wins the 2024 ICC Build-a-Thon appeared first on DMC, Inc..

]]>
DMC’s team was proud to win first place at the Ignition Community Conference (ICC) 2024 Build-a-thon in Folsom, CA. After finishing first in a field of 24 Premier Integrators in a preliminary round, we faced BIJC Ltd in the final round of the competition to build a solution in two short days.  

Congratulations to our team members Brandon Tanner, Sheila Kennedy-Moore, and Nicoli Liedtke for representing DMC and bringing home the win! 

The Competition 

ICC Build-a-Thon 2024

DMC and BIJC Ltd competed live on stage in an industrial automation challenge for the ICC Build-a-thon’s grand finale. To challenge our Ignition programming skills, we had two days to program an Ignition application to control a convenience store. The store had a car wash, gas pump, and food market. 

Opto 22 provided the PLCs and a miniature convenience store that we could control. The goal provided by Inductive Automation was to make it easy to expand our brand of convenience stores and take over the world with our stores. We decided to include a Minion theme in our project, saying that we were hired by Gru to take over the world with our convenience stores. Our tagline was, “This is a first for DMC, being hired by a villain.” 

To accomplish this goal, DMC made a high-level map screen displaying the location and the status of each store. Users could click on a store location on the screen to see more details. In order to verify that each store was profitable for our business expansion, we used simulation logic to simulate transactions. We also tracked the store’s transactions and profitability with custom dashboards. Our solution streamlined configuring new stores by prompting the user to fill out its name and select the location on a map once the project detected new MQTT tags. 

DMC's build-a-thon application
DMC's build-a-thon application

One highlight of our solution was our slick user interface (UI). We implemented custom CSS in our project to give the UI a polished look. This is a complex aspect of Ignition that not everyone has experience with, and we spent extra time on the UI to make our project stand out. 

DMC build-a-thon application

Other fun aspects of the project included creating a car wash button with an animated car and bubbles. We also created a custom SVG to control the store’s lights. Every time the car wash ran, we brought out bubble guns. 

ICC Build-a-Thon 2024

Each member of DMC’s team presented on part of the project. Sheila handled the introduction and the project overview.  Nicoli did the technical project review and Brandon took on the project curveball which was adding a new store to the application. The audience voted on the winner, and we were proud to take home the honors and wear the orange winner’s blazers! 

If you are interested in digging into the code that we made during the Build-a-Thon, we’ve uploaded our project to the Ignition Exchange here.  

ICC Build-a-Thon 2024

Ignition Community Conference 

The Ignition Community Conference's mission is to see new technology, share ideas, and find inspiration. In addition to competing in the Build-a-Thon, DMC led a presentation on Optimizing Load Time in Ignition Perspective by Elizabeth Reed and Casimir Smith. 

DMC and Ignition 

DMC is an Ignition Premier Integrator. We are Ignition 8.1 Gold certified, illustrating our commitment to delivering Ignition expertise. Our partnership allows DMC access to exclusive technical resources which enables us to deliver top-notch customer service to our clients. 

Learn more about DMC’s Ignition partnership and contact us for your next project. 

The post DMC Wins the 2024 ICC Build-a-Thon appeared first on DMC, Inc..

]]>
DMC Presents at ICC: Optimizing Load Times in Ignition Perspective https://www.dmcinfo.com/blog/15963/dmc-presents-at-icc-optimizing-load-times-in-ignition-perspective/ Wed, 25 Sep 2024 11:18:19 +0000 https://www.dmcinfo.com/blog/15963/dmc-presents-at-icc-optimizing-load-times-in-ignition-perspective/ At the Ignition Community Conference, Elizabeth Hill Reed and Casimir Smith presented a series of helpful tips for improving perceived load times in Ignition Perspective. We were excited to see how many people were excited about our findings, so we’ve released our notes here on our blog! Types of Performance Fundamental Principles for Improving Perceived […]

The post DMC Presents at ICC: Optimizing Load Times in Ignition Perspective appeared first on DMC, Inc..

]]>
At the Ignition Community Conference, Elizabeth Hill Reed and Casimir Smith presented a series of helpful tips for improving perceived load times in Ignition Perspective. We were excited to see how many people were excited about our findings, so we’ve released our notes here on our blog!

Types of Performance

  • Perceived Performance: How long do pages feel to load, our focus
  • Responsiveness: How long between user action and result
  • Resource Usage: How much RAM or CPU is being used

Fundamental Principles for Improving Perceived Performance

  • Reduce amount of data and calculation
  • Reduce layout recalculations
  • Reduce initial load actions
  • Reduce heavyweight components
Improving Perceived Performance

Reduce Amount of Data and Calculation

Binding Efficiency

Some binding and transform types are more efficient than others. Make sure you choose the correct type intentionally, especially when you can accomplish the same task with a more efficient type.

Binding Ranking (best to worst)

  • Direct tag binding
  • Indirect tag binding
  • runScript() expression
  • tag() expression

Transform Efficiency Ranking (best to worst)

  • Format transform
  • Map transform
  • Expression transform
  • Script transform (much slower than others)

Note that transforms always add additional processing time, so runScript() can be a faster way to run a Python script compared to script transforms. Also remember that when reading multiple tag values, using separate custom properties with indirect tag bindings is better than trying to read multiple tags using tag().

Binding Efficiency

Query Efficiency

  • Always include a range limiter on queries that select from large tables
    • Time-based or count-based
  • Avoid polling
    • Use a refresh button that calls refreshBinding() instead
  • Use named queries with caching enabled
  • Use database tools to troubleshoot query performance
    • For Microsoft SQL, use execution plan monitoring and event tracing
    • For PostgreSQL, use tools like pgwatch, pgdash, and datadog

Scripting Efficiency

  • Focus on reducing use of scripting unless necessary
  • Don’t sacrifice readability or maintainability for performance
  • Combine tag read/write into one bulk call
  • Avoid repeating logic in a loop

Reduce Layout Recalculation

The browser performs reflow operations to set the position and layout of the page. When bindings or scripts alter the layout of your page, this forces the browser to recalculate, which slows down your page. Avoid unnecessary use of bindings that alter page layout, such as:

  • Binding that sets the basis property
  • Binding that sets the display property
  • Binding that sets the instances property of a flex repeater directly
  • Binding that alters margin, padding, or border width

Use Persistence to Set Starting Layout

  • Change a bound property to “persistent” to save the starting value instead of initializing to null.
  • Use persistence to set starting layout.
  • Use persistence to avoid red overlays on initial load.

 

Avoid Excessive Embedded View Nesting

  • Avoid nesting more than 3 layers deep
  • Pass in tag paths as parameters, then use indirect tag bindings
  • Try both with-parent and after-parent loading
  • Balance the maintainability of core templates with the performance of fewer nesting layers
Nesting Layers

Reduce Initial Load Actions

It’s best to limit the amount of actions that your page has to perform when it first loads. The best way to do this is by caching data in tags so it can be calculated on the gateway, instead of the session. This has several key advantages:

  • The script only needs to run once on the gateway, instead of once per open session
  • The view has instant access to data, so pages load faster
  • Scripts run faster in gateway scope
Move Calculations to Gateway Scope

Reduce Use of Heavyweight Components

Some Ignition components import large libraries and can take longer to load the resource. Some key heavy components are the XY Chart, Gauge, and Markdown components. This performance is greatly improved by the use of React 18, introduced in Ignition 8.1.31.

If you have many repeated uses of one item on-screen, you can consider replacing a component with a custom svg. The Ignition exchange has many examples of svg objects to replace Ignition ones.

Slow Example: Built-in Ignition Gauge

Built-in Ignition Guage

Fast Example: DMC’s Lightweight SVG Gauge

Advanced Technique: Analyzing Load Time with Chrome DevTools

Chrome has a built-in DevTools option to help test page responsiveness and loading behavior. This can be used to quantitatively test behavior or compare different variants against each other.

DevTools Basics

  • Open your Perspective screen in Chrome and press F12 to open DevTools
  • Resize your window to test responsive design across device screen sizes
  • Throttle network speeds to simulate a slow connection

How to Open Performance Monitor

  1. Open Chrome DevTools
  2. Switch the right sidebar to the “Performance” tab
  3. Press the circle button to start recording
  4. Navigate and perform actions on your page
  5. Stop recording

How to Interpret Performance Monitor

Analyze Loading: Performance Monitor

How to Hide Loading with Fade-In Animations

Creating a fade-in style can make views feel more premium and hide dreaded pop-in effects. This often feels nicer even when the raw time is longer. Create style classes that animate to change the opacity from 0 to 1, and create multiple classes with different delays.

Edit Style

Fade-in Animation Example

Balance Performance vs Maintainability

Don’t forget that maintainability is even more important than performance. Many performance boosts introduce custom or duplicate code. You should always get user feedback, and THEN consider optimizing.

“Premature optimization is the root of all evil” – Donald Knuth

Contact us to unlock the full potential of your industrial automation with DMC and Inductive Automation’s Ignition platform! As an Ignition Premier Integrator, DMC delivers cutting-edge Ignition HMI and SCADA solutions tailored to your needs, whether a small business or a large enterprise.

View or download the complete presentation: Optimizing Load Time in Ignition Perspective

 

The post DMC Presents at ICC: Optimizing Load Times in Ignition Perspective appeared first on DMC, Inc..

]]>
Getting Started with the Paintable Canvas in Ignition Vision https://www.dmcinfo.com/blog/16140/getting-started-with-the-paintable-canvas-in-ignition-vision/ Mon, 15 Jul 2024 15:01:02 +0000 https://www.dmcinfo.com/blog/16140/getting-started-with-the-paintable-canvas-in-ignition-vision/ Inductive Automation’s Ignition is a reliable, proven HMI/SCADA platform with powerful scripting capabilities. Ignition’s most well-known Vision visualization module has been used in plant floor HMIs and desktop screens for over 10 years. One of the most customizable components in Vision’s palette is the Paintable Canvas. While the Paintable Canvas’s heavy reliance on scripting might […]

The post Getting Started with the Paintable Canvas in Ignition Vision appeared first on DMC, Inc..

]]>
Inductive Automation’s Ignition is a reliable, proven HMI/SCADA platform with powerful scripting capabilities. Ignition’s most well-known Vision visualization module has been used in plant floor HMIs and desktop screens for over 10 years. One of the most customizable components in Vision’s palette is the Paintable Canvas.

While the Paintable Canvas’s heavy reliance on scripting might be intimidating for a new Ignition developer, this short tutorial will put you on track to create complex dynamic displays in no time!

Paintable Canvas Overview

The Paintable canvas makes use of the Java2D graphics library, which allows you to create complex shapes, load and edit images, add text, and more.

To add a paintable canvas to your Vision project, simply drag the Paintable Canvas component anywhere on your window. You’ll notice that this component comes with an example script that renders a simple pump graphic. Turn on preview mode to see your paintable canvas area filled with the pump image below. Notice that you can resize the canvas window to any shape or size and the pump will automatically stretch to fill the new area. This is because Java2D is a vector drawing library, allowing components to scale with ease.

 

Graphical user interface, text, application, emailDescription automatically generated

A screenshot of a computerDescription automatically generated with low confidence

Now, let's take a look into how this graphic is being created. Open up the script editor by right-clicking on your paintable canvas component in the project browser.

Graphical user interface, applicationDescription automatically generated

Here you will see that the repaint script is prepopulated with the script that creates our static pump icon. You’ll notice that this script is split up into two sections. The first part defines the Java2D shapes that make up our pump, based on a 100×100 pixel area. Then, the second half scales the shapes to the size of the canvas and renders them using Java graphics.

Notice that the order in which the objects are painted is significant. I recommend you take some time to play around with this script, editing some values to see how the pump graphic changes. See if you can change the shape of the pump from a circle to a square or rotate it upside down.

 

                              

Updating the Canvas from a Dynamic Property

Now, let's see how we can dynamically update the pump at runtime. First, let's add a custom property to our Paintable Canvas by right-clicking on the Paintable Canvas component in the Project Browser and selecting “Customizers > Custom Properties." 

Then, we will add a toggle button to our window and bind its value to this property. Now we can test pressing our toggle button and verify that our new paintable canvas property changes.

Now it’s time to bring this property into our paintable canvas by editing the “repaint” script below, adding a simple if statement to change the color and text of the status icon based on our new dynamic property.

Now you should be able to change your pump mode at runtime by pressing the toggle button. This works because the repaint script for a Paintable Canvas runs any time a property of the canvas changes, including our custom bAuto property.

Updating Dynamic Properties from the Canvas

Now that we know how to update graphics in the paintable canvas from dynamic properties, let's take a look at writing to properties from within the paintable canvas tool. To do this, we will open back up the component scripting tool and navigate to the mouseClicked event. Let's say we want to change our mode only when the mode indicator circle is clicked. We can do this very easily by using the x and y properties of our mouseClicked event object.

Here, we create a Point2D object with the coordinates of our mouseClicked point (event.x and event.y) and scale it to match the 0-100 scaling of our initial ellipse definition. We can then use the ‘contains’ method of Ellipse2D to determine whether our point lies within the Ellipse. In this case, if the user clicks within the ellipse, we update our mode property.

Now you can click the status ellipse on the pump icon to update the mode, rather than needing a separate toggle button.

Dynamically Resize and Reorient Objects

Now, let's return to our original pump display and let's try updating our canvas to display a dynamic number of pumps. We will again start by adding a custom property to our Paintable Canvas and connect it to a numeric text field on our main window. This will be our user input for number of pumps. Then we will make a few small edits to our repaint script below.

Define a new variable numPumps and link it to your new custom property.

Scale your pump graphic in the X-direction so that each pump takes up 1/numPumps of the screen. The vector-oriented nature of Java2D makes it so easy to resize an entire object all at once, rather than adding a scale factor to each shape within the pump.

Next, add a for loop around the ‘Paint Shapes’ portion of the script to paint each pump one at a time. At the end of the for loop, we will need to ensure any relevant properties (in my case the font size) are reset to the values they are at the start of the loop and then translate our origin to the right by one pump width.

Now try changing your new user input at runtime and see your Paintable Canvas update!

 

Now you have the tools you need to create simple dynamic objects using the Paintable Canvas tool. With the powerful Java graphics library at your disposal, your creativity is your only limit with what objects you can create!

Learn more about DMC's Ignition programming expertise and contact us today.

The post Getting Started with the Paintable Canvas in Ignition Vision appeared first on DMC, Inc..

]]>
FactoryTalk Optix Series 3 – NetLogic Overview and Examples https://www.dmcinfo.com/blog/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/ Tue, 14 May 2024 17:21:41 +0000 https://www.dmcinfo.com/blog/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/ HMI Programming and SCADA Programming are essential for creating efficient and responsive automation systems. When working with Optix, leveraging NetLogic allows for seamless integration between C# code and the SCADA environment, enabling advanced control and data exchange.  NetLogic is C# code that is linked to Optix. Optix can call methods with parameters, set private C# variables, […]

The post FactoryTalk Optix Series 3 – NetLogic Overview and Examples appeared first on DMC, Inc..

]]>
HMI Programming and SCADA Programming are essential for creating efficient and responsive automation systems. When working with Optix, leveraging NetLogic allows for seamless integration between C# code and the SCADA environment, enabling advanced control and data exchange. 

NetLogic is C# code that is linked to Optix. Optix can call methods with parameters, set private C# variables, and has numerous C# Libraries integrated by default to assist with passing data between Optix and your C# code. Optix also allows you to link the monitoring of C# code to an Optix runtime instance.

Linking Variables

When creating NetLogic, you can define variables that interface with the C# code, and can be both written to and read from said C# code. You can also define variable categories to assist with organization.

  • First, Variables are added onto the NetLogic object in Optix.

 Linking Netlogic Variables

An example of variables attached to a NetLogic object

These variables can be referenced in the C# logic by utilizing the “GetVariable” method on our LogicObject.

  • For any variables at the top-most level, simply call: LogicObject.GetVariable(“YourVariable”).
  • For nested variables (such as variables under “Table” in the example above), define a new IUAVariable for the nested name (Tables in this case), and then reference the individual elements of that new variable.
C#

private void ParametersSetup()

{
	DB_SERVER_IP = LogicObject.GetVariable("Server IP").Value;
	DB_SERVER_PORT = uint.Parse(LogicObject.GetVariable("Server port").Value);
	SERVICE_NAME = LogicObject.GetVariable("Service name").Value;
	DB_USERNAME = LogicObject.GetVariable("Username").Value;
	DB_PASSWORD = LogicObject.GetVariable("Password").Value;
	DB_QUERIES_FEEDBACK = LogicObject.GetVariable("Queries feedback");
	TABLES = LogicObject.GetVariable("Tables");

	TABLE_DESTINATION = TABLES.GetVariable("Destination").Value;
	TABLE_DISTANCE = TABLES.GetVariable("Distance").Value;
	TABLE_LOCATIONCHANGE = TABLES.GetVariable("LocationChange").Value;
	TABLE_EQUIPMENTSTATUS = TABLES.GetVariable("EquipmentStatus").Value;
	NUMBER_OF_DEVICES = LogicObject.GetVariable("Number of devices").Value;
	NUMBER_OF_EQUIPMENT_AREAS = LogicObject.GetVariable("Number of equipment areas").Value;
	CONNECTIONSTRING = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={DB_SERVER_IP})(PORT={(int)DB_SERVER_PORT})))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={SERVICE_NAME})));User Id={DB_USERNAME};Password={DB_PASSWORD};";
}
C#

private IUAVariable DB_QUERIES_FEEDBACK;
private string DB_SERVER_IP;
private uint DB_SERVER_PORT;
private string SERVICE_NAME;
private string DB_USERNAME;
private string DB_PASSWORD;
public IUAVariable TABLES;
private string TABLE_DESTINATION;
private string TABLE_DISTANCE;
private string TABLE_LOCATIONCHANGE;
private string TABLE_EQUIPMENTSTATUS;
private Int32 NUMBER_OF_DEVICES;
private Int32 NUMBER_OF_EQUIPMENT_AREAS;

Calling Methods

C# Methods can be called directly from Optix when the [ExportMethod] Line is added above said method. Any parameters associated with the Method will also be exposed, allowing you to set them dynamically from Optix, using a MethodInvocation or by linking them to events.

Invoking C# Methods from Optix

An example method invocation that shows all the [ExportMethod] methods from the Netlogic C# code

C#

[ExportMethod]

public void SelectAllDevicesDestination()

{



Monitoring Code

When NetLogic is created, Optix automatically configures the codespace (if utilizing VSCode) to attach to the Optix runtime instance, allowing you to monitor your C# card while the Optix application is running.

Monitoring an Optix Project in Visual Code

Visual Code is attached to the Optix Runtime when monitoring

Logging and Error Handling

Optix has a C# library for logging code that should be utilized, as it will output to the console in FT Optix Studio, as well as to the log file for the Optix application.

C#

catch (System.Exception ex)
{
	Log.Error(MethodBase.GetCurrentMethod().Name, ex.Message);
}

 Location of Optix Log Files

The location of Optix log files for an emulated project

Learn more about our experience with Rockwell FactoryTalk and contact us today for your next project.

The post FactoryTalk Optix Series 3 – NetLogic Overview and Examples appeared first on DMC, Inc..

]]>
FactoryTalk Optix Series 2 – Variables, Attributes, Dynamic Links, and Converters https://www.dmcinfo.com/blog/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/ Tue, 14 May 2024 17:15:21 +0000 https://www.dmcinfo.com/blog/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/ Overview Variables, Attributes, Dynamic Links, and converters are the building blocks of Optix UI design. Each variable has a number of attributes associated with it, and Dynamic links and Converters can be used to define a relationship between two or more variables/attributes. A map of the relationships between Variables, Attributes, Dynamic Links, and Converters Variables […]

The post FactoryTalk Optix Series 2 – Variables, Attributes, Dynamic Links, and Converters appeared first on DMC, Inc..

]]>
Overview

Variables, Attributes, Dynamic Links, and converters are the building blocks of Optix UI design. Each variable has a number of attributes associated with it, and Dynamic links and Converters can be used to define a relationship between two or more variables/attributes.

Variables, Attributes, Converters, and Dynamic Link Relationships

A map of the relationships between Variables, Attributes, Dynamic Links, and Converters

Variables and Scope

Variable scope is influenced by the containers they are in. All variables with a given container (screen or panel) can access each other. Variables in nested panels have access to the variables in other nested panels and parent/children panels, and vice versa.

Nested Variables in Scope

An example of variable scope extending to variables nested in other related panels

However, scope is limited when variables are not contained within a shared container, which happens most commonly with panels utilized in popups and panel loaders. However, the scope of panel loaders is unrestricted, so variables can be added to panel loaders and modified/updated anywhere in the Optix application, and the panels being loaded by said panel loader can then reference its variables to dynamically display information.

Out of Scope for the Selected Variable

An example showing the limitations of scope when creation relationships between variables

To see an example of a panel loader utilizing variables to allow the Main UI to interact with individual panels being loaded by a panel loader, stay tuned for our upcoming Optix Series – Device Sidebar Example blog.

Attributes

Understanding attributes and their relationship to their parent variable is necessary to form complex Dynamic Links for UI functionality. Below is a list of the most common variable attributes.

BrowseName

Name of the variable in the project.

DataType

Data type of the variable.

DataType BrowseName

Name of the DataType of the variable.

Description

Description of the variable (as set in FT Optix).

DisplayName

Translatable variable name that can appear on the interface at runtime.

NodeId

Automatically assigned unique identifier.

Value

Value of the variable.

To see an example of different attributes being used to create a clean, complex solution, stay tuned for our upcoming Optix Series – Device Sidebar Example blog, which utilizes NodeId, BrowseName, and DataType BrowseName attributes.

Converters

  • Conditional Converter
    • Sets the output variable’s value based on a true/false evaluation of the input.

Conditional Converter

  • Engineering Unit Converter
    • Scales the output linearly based on the input.

Engineering Unit Converter

  • Linear Converter
    • Scale the output based on a defined slope and intercept.

Linear Converter

  • Key-value Converter
    • Matches an output value to the input “Key”.

Key-Value Converter

  • Expression Evaluator
    • Evaluates an expression consisting of one or more input variables.
    • To see all of the valid operators that can be used in an expression, see Rockwell’s documentation.

Expression Evaulator

  • String Formatter
    • Outputs a string that can be defined using variables and various formatting options.

String Formatter

Dynamic links are defined relationships between two or more variables. Dynamic links can implement converters to create complex relationships and can be pointed at both variables and attributes.

Aliases

Aliases are a unique property type that allows you to specify the structure of a variable.  This is useful when creating panels that should be referencing a specific Data Types, such as a motor or valve Data Type. An alias allows you to reference all the elements of the defined Data Type, while still allowing the alias variable to be linked dynamically, allowing graphics to be updated in real time, such as being able to swap which motor a panel is pointing to.

Aliases

An example of an alias to a Motor Data Type

An example use case of aliases is for a device sidebar that utilizes a panel loader to swap in faceplates panels for different types of devices. The panel loader would have a NodeId variable (Let’s call it “Device Tag”) that would be updated at runtime to point to a desired device tag. For each device type, one panel would be created with a tag alias with the “Kind” attribute bound to the UDT of said device and the “NodeID” attribute bound to the “Device Tag” Attribute on the panel loader. Typically, you cannot create property bindings between variables that are not within the same window or screen (or the same panel for panels that are not directly placed on windows or screens), but panel loaders can be referenced regardless of project scope, allowing us to make use of the “Device Tag” variable we attached to ours.

For an in-depth example, Stay tuned for our upcoming Optix Series – Device Sidebar Example blog.

Learn more about our experience with Rockwell FactoryTalk and contact us today for your next project.

The post FactoryTalk Optix Series 2 – Variables, Attributes, Dynamic Links, and Converters appeared first on DMC, Inc..

]]>
FactoryTalk Optix Series 1 – Getting Started with FactoryTalk Optix https://www.dmcinfo.com/blog/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/ Mon, 25 Mar 2024 08:56:32 +0000 https://www.dmcinfo.com/blog/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/ FactoryTalk Optix is the next generation of visualization software from Rockwell Automation, meant to provide a higher degree of customized development with its integrated C# support and flexibility for HMI and SCADA applications. This blog series covers the essentials to creating your own HMI and SCADA applications using Optix as well as some helpful examples […]

The post FactoryTalk Optix Series 1 – Getting Started with FactoryTalk Optix appeared first on DMC, Inc..

]]>
FactoryTalk Optix is the next generation of visualization software from Rockwell Automation, meant to provide a higher degree of customized development with its integrated C# support and flexibility for HMI and SCADA applications.

This blog series covers the essentials to creating your own HMI and SCADA applications using Optix as well as some helpful examples for common applications.

Installation

FactoryTalk Optix Studio is installed via FactoryTalk Hub, and it is the IDE used to program Optix projects. You can either download the IDE application or utilize a web-based IDE if your license supports it.

The Optix Runtime tools are also installed via FactoryTalk Hub, and they are required on any machine that is going to run an Optix application.

FactoryTalk Optix Hub

FactoryTalk Hub: which hosts a number of FT applications (including FactoryTalk Design Studio for Optix)

Licensing and Pricing

Optix licensing is done on a token-based system, with more features requiring more tokens, and, therefore, a larger license. Generally speaking, the largest contributors to token usage are multiple concurrent web clients, OPC-UA connections, or database connections.

Examples of features that affect the sizing of your application include the following:

  • Controller connections
  • Multiple web clients
  • Alarming
  • Recipes
  • PDF reports
  • Data logging
  • Database connectivity
  • OPC UA connectivity

For more information on tokens and licensing, please see Rockwell’s documentation.

Presentation Engines

Presentation engines are responsible for rendering and displaying UI elements during runtime. There are two available presentation engines that can be used simultaneously – the native presentation engine and the web presentation engine.

The native presentation engine launches the project in its own window as an application.

The web presentation engine hosts the application on a web server, accessible via the defined web page. Multiple concurrent web clients can access the application (if multiple connections are defined in the web presentation engine), but more concurrent clients require more tokens.

Optix can make use of session-specific tools to allow concurrent clients to have different screens/panels open, have different users logged in, and display different information, provided that the Optix project was designed with multiple clients in mind.

Optix Presentation Engine

An example configured Web Presentation Engine

Style Sheets

Style sheets allow the definition of default colors, shapes, sizes, and other UI element configurations. A project’s style sheet can be swapped during runtime. Some properties can be defined both in the style sheet and in an individual UI element. In the case that a property is explicitly defined for an individual element, it will override the style sheet.

Style Sheet Example

An example Style Sheet

Screens and Panels

FT Optix uses screens, panels, and popups as the main methods for displaying UI elements. Screens and popups can both contain multiple panel loaders, which can be used to dynamically change displayed content when a defined action is performed, such as hitting a button.

To see panel loaders being implemented to create a dynamic device sidebar that changes what device it controls (and the associated UI elements) at the push of a button, stay tuned for our upcoming FactoryTalk Optix – Dynamic Device Faceplate blog post.

Panel Loader

A panel loader that is a part of the main overlay of an application. It has the ability to load either a Motor or a GroundRack panel into the panel loader.

Motor Panel Loaded 

A runtime instance with the "Motor" panel loaded into the panel loader

Rack Panel Loaded

A runtime instance with the "Ground Rack" panel loaded into the panel loader

Converters

Converters allow you to modify variables dynamically based on other variables. For instance, a key-value converter could change the text displayed in a string variable when a different integer variable’s value changes, and an engineering unit converter can be used to scale variable values differently.

There are more converter types and use cases that were not mentioned above. For more information on converters, stay tuned for our upcoming FactoryTalk Optix – Variables, Attributes, Dynamic Links, and Converters blog post.

Converter

A Key-Value converter that parses an integer out into valve status strings

Dynamic Links

Dynamic links are used to define relationships between two or more variables or attributes within the FT Optix project. Complex dynamic links allow the use of built-in converters, allowing further customization of UI elements.

For further information on Property Bindings, stay tuned for our upcoming FactoryTalk Optix – Variables, Attributes, Dynamic Links, and Converters blog post.

For an example of leveraging complex dynamic links, stay tuned for our upcoming FactoryTalk Optix – Dynamic Device Faceplate blog post.

Dynamic Link

A dynamic link that performs mathematical operations on several variables to return an adjusted distance

Events

Events call methods when a specific trigger happens, such as a button being pressed or a variable's value changing. Events can be added onto most UI elements, and they can trigger multiple methods.

Example Event

Methods

Methods are called by events. FT Optix has a number of built-in methods, but custom methods can be defined through NetLogic as well.

You can also create pre-defined method invocations, which allow the calling of methods with pre-defined parameters.

Methods

A list of common methods available in FT Optix

Method Invocation

A custom method invocation for renaming a MySQL Database table

NetLogic

NetLogic allows C# code to be integrated and run in an FT Optix project. FT Optix can call parameterized methods, and they can send and receive variables with the C# project.

For further information on NetLogic, stay tuned for our upcoming FactoryTalk Optix – NetLogic Overview and Examples blog post.

Net Logic

An example NetLogic snippet that returns a localized time

Data Stores

Data stores are databases used to store values from different loggers and NetLogic (if you so choose). You can either use an embedded database, which is a simple SQLite database created with minimal overhead, or you can choose to create a connection to a database (SQL Server or MySQL). Other database types may be supported through ODBC connections, but they have not been tested or confirmed yet.

Loggers can be linked directly to a data store and will automatically configure tables for themselves on said database.

Data Store Table

An example data store with an "Alarm Logger" linked to it, auto generating the necessary tables

Communication Drivers

Communication Drivers allow defining communication paths to PLCs and other devices, as well as the importing of tags and other information to be used in the Optix project. A list of the currently available communication drivers is available below.

Available Comm Drivers

All available communication drivers in Optix

Comm Driver

The tag importer display from an example Rockwell Ethernet Driver linked to a PLC

Template Library

Template Library

Optix's Template Library

The template library stores templates created by Rockwell and allows you to create/import your own libraries as well. Some examples of useful templates that are included with Optix are:

  • Alarm Grid
  • Alam History
  • Alarm Banner
  • User Login Popup
  • Confirmation Dialog
  • Date and Time Display
  • File Selector
  • File System Browser
  • Alarm Importer and Exporter
  • Alarm Logger

Read the Other Articles in this Series

Learn more about our experience with Rockwell FactoryTalk and contact us today for your next project.

The post FactoryTalk Optix Series 1 – Getting Started with FactoryTalk Optix appeared first on DMC, Inc..

]]>
Integrating Mitsubishi GX Works3 with Ignition Using the Ignition Mitsubishi TCP Driver https://www.dmcinfo.com/blog/16599/integrating-mitsubishi-gx-works3-with-ignition-using-the-ignition-mitsubishi-tcp-driver/ Tue, 13 Feb 2024 09:22:48 +0000 https://www.dmcinfo.com/blog/16599/integrating-mitsubishi-gx-works3-with-ignition-using-the-ignition-mitsubishi-tcp-driver/ Mitsubishi GX Works3 is a platform for programming Mitsubishi PLCs, and it is possible to directly integrate the PLC's tags into Ignition with the recent release of the Ignition Mitsubishi driver. Ignition offers native support for Mitsubishi devices through its new Mitsubishi TCP Driver, allowing direct communication between the PLC and the SCADA system. Ignition has […]

The post Integrating Mitsubishi GX Works3 with Ignition Using the Ignition Mitsubishi TCP Driver appeared first on DMC, Inc..

]]>
Mitsubishi GX Works3 is a platform for programming Mitsubishi PLCs, and it is possible to directly integrate the PLC's tags into Ignition with the recent release of the Ignition Mitsubishi driver.

Ignition offers native support for Mitsubishi devices through its new Mitsubishi TCP Driver, allowing direct communication between the PLC and the SCADA system. Ignition has a published guide for setting up connection from the Ignition side. 

In this blog we will focus on the configuration of a Mitsubishi PLC project in Gx Works3 to connect to an Ignition server as well as some basic troubleshooting tips. Additionally, we will go over the concept of a useful tool DMC developed DMC to quickly convert assigned labels within global label lists to Ignition addresses in a .csv file and that can be directly imported into the Ignition Gateway. 

Configuring a Mitsubishi PLC for Connecting With Ignition:

After you’ve added your PLC to a Gx Works3 project, navigate to the Module Parameter of your PLC. 

Navigation Module Parameter

In the “Own Node Settings,” first make sure your PLC is on the same network as your Ignition Gateway, and then make the following changes:

  1. Enable/Disable Online Change > Enable All (SLMP)
  2. Communication Data Code > Binary

Then press “Apply” at the bottom right corner. 

Own Node Settings Enable All Binary

Next, double click on the “<Detailed Settings>.”

Own Node Settings Detailed Settings

A new window will pop-up labeled “Ethernet Configuration.” Navigate to the right of the window and click on “Ethernet Device (General).” Next, click and drag a “SLMP Connection Module” to the table portion of the window. A new SLMP Connection Module will be added. 

Ethernet Configuration Built-in Ethernet Port

Set the Protocol to “TCP” and then set the Port Number to the same port number that was chosen in the Ignition Mitsubishi Driver. 

Press “Close with Reflecting the Setting” at tool bar located at the top of the window. Finally, write the new configuration changes to the PLC and do a power cycle.

Troubleshooting Connection Issues: 

In the tool bar at the top, navigate to “Diagnostics” > “Ethernet Diagnostics” to troubleshoot any connection issues. Here you can see any error codes or statuses. You need to be connected to the PLC to use this. 

Module Parameter Ethernet Diagnostics

Converting Gx Works3 Global Label Lists to Ignition Addresses: 

Quick reminder that, for your tags to be seen by your Ignition project, they need to have device assignments. Here is an example where the labels are assigned to D devices: 

Assign Device Label

For the Ignition side, you can find the formatting for these addresses in the “Determining Addresses” section in the Ignition document linked at the top of this blog.

Determining Addresses Section in the Ignition document

If your project has a lot of tags, it can be worthwhile to create an automated script/program to convert the label list exports from Gx Works3 to Ignition addresses and compile them into one .csv file to import into the Mitsubishi driver on the Ignition gateway. This will be much faster than manually adding in one tag at a time. 

Device Connections/Mitsubishi PLC Load Configuration

You can choose to use one .csv file to keep track of all your PLC tags or append new .csv files each time you add new tags. 

On a recent DMC project, we designed a Python tool to help us automate this task. Our Python tool would read the exported .xml files from Gx Works3, pull out the tag names, data types, and assigned device numbers, and then use that information to construct the Ignition addresses. 

Our tool was custom made for a particular project, but here is the overall workflow for our tool for guidance if you are looking to create your own:

  1. Right click on HMI tag lists from Gx Works3 project and export as XML.

Export to XML File

2 . Move them into the designated folder where our Python script is accessing unprocessed tag lists.

3. Run Python script.

4. Grab converted .csv file and import (without appending) into Mitsubishi Driver in Ignition gateway.

5. Repeat process if new tags/lists were added to the unprocessed tag folder.

In this project, we changed the mapping for our tags often during development due to changing scope/issues we were encountering. It was beneficial for us to re-run our Python conversion script on all the .xml HMI tag list files and import a new converted .csv file each time instead of appending an additional file. It was easier to keep track of changes and to update any tag mappings that might have changed as we just needed to export and overwrite the same tag list in the unprocessed tag list folder. 

Learn more about our Manufacturing Automation and Intelligence and PLC Programming expertise and contact us for your next project. 

The post Integrating Mitsubishi GX Works3 with Ignition Using the Ignition Mitsubishi TCP Driver appeared first on DMC, Inc..

]]>
Programming a PLC to be a Game Console https://www.dmcinfo.com/blog/16605/programming-a-plc-to-be-a-game-console/ Thu, 08 Feb 2024 12:48:45 +0000 https://www.dmcinfo.com/blog/16605/programming-a-plc-to-be-a-game-console/ PLC Code This past week, I took on the challenge of turning one of our IO demo kits connected to a Siemens PLC into a working game system. I chose to program the classic games Bop It and Simon Says as they would be easy to understand while still presenting their own challenges in both […]

The post Programming a PLC to be a Game Console appeared first on DMC, Inc..

]]>
PLC Code

This past week, I took on the challenge of turning one of our IO demo kits connected to a Siemens PLC into a working game system. I chose to program the classic games Bop It and Simon Says as they would be easy to understand while still presenting their own challenges in both programming and playing.

I first created a simple infrastructure that would allow users to select which game they would like to play using one of the two colored push buttons on the IO kit. I associated each game with a different LED flash sequence to indicate which game had been selected.

Physical IO trainer used for BopIt game

The first game I decided to tackle was Bop It. In place of the original game’s “Twist it,” “Pull it,” etc., I used the IO kit’s toggle switches and push buttons.  I wrote a simple logic sequence that would randomly illuminate one of the four colored LEDs and wait for the user to press/toggle the corresponding button/switch. Like the original game, if the user waited too long or selected the wrong button or switch, they would lose the game and the program would play a failure LED sequence and return to the game selection sequence. After enough correct button pushing and switch flipping, the program would display a winning LED sequence and return to game selection.

Simon Says used similar code but with a few differences. These changes were needed due to the game’s sequence, stored using an array, which would be flashed by the LEDs then input by the user. The LED flash was accomplished using a counter up to the current length of the sequence, reading the index of the array at the current count and flashing the corresponding LED. The user input used similar logic, comparing the user’s selection to the array after each button push or switch flip. After successfully repeating a sequence of 10 LED flashes the program displays the winning sequence and returns to the game selection.

User Interface

I created a project in Ignition to graphically display the state of the game and monitor some key statistics. This endeavor added some useful functionality to the PLC code through the powerful tools provided by Ignition Perspective.

Main Ignition screen for Bop It game

The perspective session has three main views: an overview screen and two screens for the games. It is set up so that additional games can be added easily. The overview screen offers navigation to both games, as well as a leaderboard and a popup that explains the games. Each game screen displays a brief description of the game, the status of each digital output, and the player’s current progress. Additionally, a timer shows the player how much time is remaining to make a move, a feature that is not available on the physical kit. Each game screen displays the current high score for that game. This data is pulled from a PostgreSQL database of player initials, scores, and dates. This database is also used to populate the leaderboard.

Leaderboard used to show Bop It and Simon Says high scores

This project utilizes several of Ignition’s powerful features. Perspective can pull data from the PLC with OPC tags. These tags are then used with both built-in and custom graphics, in combination with Ignition scripting to display the status of the game. Ignition also connects to the database to create the leaderboard and high score features, through additional scripting and SQL queries. Additionally, popups are used in combination with scripts and event handlers to provide a seamless navigation experience for the user. This project uses one PLC, one database, and six windows, but these features can easily be applied to much larger automation applications.

Currently, the Perspective session only reads data from the PLC. An interesting next step could be to use Ignition to write to the plc, maybe with inputs more realistic to Bop It (i.e. twisting and pulling). This project takes advantage of some of the functionality of Ignition, but there are numerous other features that could be utilized for additional functionality.

The post Programming a PLC to be a Game Console appeared first on DMC, Inc..

]]>
How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server https://www.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/ Fri, 05 Jan 2024 10:47:21 +0000 https://www.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/ This two-part blog series is intended to be a step-by-step overview on how to set up and utilize an MS SQL Server and WinCC OA’s NextGen Archive (NGA). Information for a general setup exists via the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary […]

The post How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server appeared first on DMC, Inc..

]]>
This two-part blog series is intended to be a step-by-step overview on how to set up and utilize an MS SQL Server and WinCC OA’s NextGen Archive (NGA). Information for a general setup exists via the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary steps.

  1. How To Create a Microsoft SQL Server Install for NextGen Archiving
  2. How to Configure NextGen Archiving in WinCC OA to use Microsoft SQL Server

Table of Contents:

  1. Notes/Prerequisites
  2. WinCC OA
    1. 2.1 Project Setup
    2. 2.2 NGA Configuration
    3. 2.3 Archive Group Configuration
    4. 2.4 DPE Archive Configuration
    5. 2.5 Data Retrieval
  3. Further Reading/References

1. Notes/Prerequisites

Required programs

This demo was implemented using:

  • WinCC OA 3.18 P006
  • Microsoft SQL Server 2022 Express
    • NOTE: Other versions of MS SQL may work with NGA, but it has not yet been verified by DMC.
  • Microsoft SQL Server Management Studio 18
  • Windows 11

Assumptions:

  • Proper licensing for NGA is configured.
  • The OS user has Windows administrator privileges.

2. WinCC OA

2.1 Project Setup

Back to Table of Contents

  1. Create a new project with NGA configured.
    1. When creating a new project, proceed with the project setup as normal.
    2. Under the “General Settings” step, ensure that the Use NextGenArchiver option is selected.
    3. For this demo, I’m creating a project titled NGA_Demo located in the “C:/WinCC_OA_Proj” directory.

Screenshot 1

If converting an existing project from HDB/RDB to NGA, then follow these steps in the “Converting existing project to NextGen Archiver Project” section: NGA Notes and Restrictions

2.2 NGA Configuration

Back to Table of Contents

It’s time to fire up OA and open GEDI.

  1. Create new back-end.
    1. Navigate to the “Database Engineering” window via “SysMgm/Database/Database Engineering”.
    2. Under the “Backend list”, click the + icon (Add new backend).
    3. Name the Backend a user-friendly name.
      1. I used the title MSSQLEXPRESS.
      2. NOTE: The Backend name does not need to match the server name, so use a name that makes most sense for your application.

Screenshot 2

Screenshot 3

2. Configure the MS SQL Backend “General Settings – Basic Configuration”. 

  1. Specify the following parameters:

Parameter

Value

Name

<User-friendly backend name>

Profile

MSSQL_nonRedundant

Database Connection

<host>/<SERVER NAME>

Database Username

<winccoaUsername from db.windows.config>

  1. NOTES:
    1. The Profile option cannot be changed later.
    2. If using a redundant server, use the MSSQL option for Profile.
    3. Don’t worry about specifying the Password, the field will clear upon initial configuration saving.
  2. Click the Password field, enter the winccoaPassword from db.windows.config, and click OK.

Screenshot 4

Screenshot 5

3. Configure the MS SQL Backend “Extended Settings”.

  1. Specify the following parameters:

Parameter

Value

Database Control/ Execution File

NGAMSSQLServerBackend

Database specific configuration/db.database

< dbName from db.windows.config>

Screenshot 6

4. Finish MS SQL Backend setup

  1. Select the Active option.
  2. Click Save.

Screenshot 7

2.3 Archive Group Configuration

Back to Table of Contents

Now that the database connection has been established, we can set up Archive Groups.

  1. Create new archive group
    1. Navigate to the “Runtime Engineering” window via “SysMgm/Database/Runtime Engineering”.
    2. Under the “Archive Groups”, click the + icon (Add a new group).
    3. Name the Archive Group.
    4. I used the title DEMO.
    5. Ensure the Active option is selected.
    6. Configure the “Storage Settings” section as desired.
    7. Click Save.

Screenshot 8

Screenshot 9

Screenshot 10

Screenshot 11

2. Verify SQL Archive Group Creation

  1. Open Microsoft SQL Server Management Studio.
  2. Right click dbo.archive_groups and select the Select Top 1000 Rows option.
    1. The new archive group should be visible in the “Results” section.

Screenshot 12

2.4 DPE Archive Configuration

Back to Table of Contents

Now that we’ve created an archive group, we can apply the archive group to a DPE so that its historical data can be logged and tracked.

  1. Insert _archive config
    1. Within PARA, right click the target DP or DPE and select the Insert config option.
    2. Select Archive settings.
    3. Click OK.

Screenshot 13

Screenshot 14

2. Select archive group

  1. Underneath the target DP/DPE, select the new _archive option.
  2. Select the desired archive group in the “Archive Group” drop-down.
  3. Ensure the Active option is selected.
  4. Click OK.

Screenshot 15

3. Verify SQL Archive Group Application

  1. Open Microsoft SQL Server Management Studio.
  2. Right click dbo.elements and select the Select Top 1000 Rows option.
    1. The newly configured DPE(s) should be visible in the “Results” section. 

Screenshot 16

2.5 Data Retrieval

Back to Table of Contents

Now that DPEs have been configured with archiving capabilities, we can now retrieve DPEs’ historical data.

  1. Verify SQL DPE Archiving.
    1. Open Microsoft SQL Server Management Studio.
    2. Right click dbo.event_<segment_id>_a and select Select Top 1000 Rows.
      1. The segment_id for each archive group can be found in the dbo.segments table.
    3. If values have been changed since archiving was configured, entries should be visible in the “Results” section.

Screenshot 17

2. Retrieve historical data.

  1. The WinCC OA functions dpGetPeriod() and dpQuery() can be used to retrieve historical data.
    1. The two examples below demonstrate a test panel running each of the two aforementioned functions and printing the results to the Log Viewer.
    2. The returned data should reflect what is viewed in the Microsoft SQL Server Management Studio tables.
  2. Be sure to understand your server’s backup and retention policy to determine what data and how much historical information can be accessed.

NOTE: For help writing SQL queries, use the SQL Panel found in SysMgm/Reports/SQL-Query

Screenshot 18

Screenshot 19

Screenshot 20

3. Further Reading/References

Learn more about our Manufacturing Automation and Intelligence expertise and contact us for your next project. 

The post How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server appeared first on DMC, Inc..

]]>