November 14, 2017 /
0 comments /
in General /
by Luke Williams
If you’ve been using CygNet for even a little while you will have heard discussion and seen presentations about the next CygNet HMI, Canvas. With its impending official release this fall we continue this multi-part series by introducing you to some of Canvas’ new and exciting features.
The last post introduced you to the Object Builder, and showed how it can be used to make managing your screens a breeze.
In this post post we will introduce a feature we’ve touched on a few times already, Relative Facilities.
In the last few posts we’ve covered controls such as the Tag Chooser, designed to drive other controls, and screens.We discussed the Object Builder, a feature that allows for easily managed collections of specific controls. Now we are moving a bit deeper into Canvas, to a behind-the-scenes feature that allows all of these controls and objects to work together to create a wholly new approach to designing and building screens.
Enter Relative Facilities.
The question we set out to answer was, how do we create a simple mechanism that allows a screen to display information about a specific Facility and at the same time be aware of the other Facilities that are logically associated with it?
We wanted to make it easier to display information about Facilities that are related to one another on a single screen, while still supporting a templated screens dynamic nature and without needing to resort to static Facility assignments, or scripting.
The concept is not new, in fact if you’ve ever used the Reference Facility attribute on a Text Tool in Studio you have already been exposed to this idea of Relative Facilities essentially referencing a Facility Attribute that holds a Facility Tag to resolve to a parent Facility. In the CygNet for Production model the idea that a Well was loaded into a screen and values for its associated gas meter could also be shown at the same time has been a function for some time. Though it requires a bit of work to set-up, it can be done.
Going forward we wanted a way to continue to improve the templated nature of a screen while simultaneously increasing the ability to display more meaningful data, no matter how logically disparate it may be.
You may have Facility Tags stored in a Facility Attribute to create some sort of logical relationship, and with Canvas we have a simple way to allow you to define what those relationships are and leverage the information to bring a whole new paradigm to screen building and run-time capability.
The Data Model
Getting into talking about Relative Facilites potentially takes us into a much bigger topic, that of a site data model. Being able to define and reference Facilities and how they relate to one another requires a data model that is well known, and adhered to. In a previous webinar we covered the concept of data models, and why they’re important, we also walked through how to use CygNet Designer to help enforce your site models. If you missed that Webinar you can see the recording of it here.
To help describe this new feature let’s start off by illustrating the site data model we’ll be using.
In this case we have a CDP (Central Delivery Point) that sits at the top of our logical relationship hierarchy. Wells, Tank Batteries, and Compressors link to the CDP. A Plunger and our Gas Meters link to Wells, and Tanks link to Tank Batteries.
This is a simple data model but includes the parent-child relationships you should be familiar with if you’ve used the Reference Facility function in Studio Text Tools.
I would like to build a screen that displays information about the CDP but includes Well pressure information next to my Tank Level values. This isn’t particularly difficult, but it gets challenging when you include the additional request that this screen contain no hardcoded references and can be used for any Facility, oh and you don’t want to use any script. Now we get into a more complex request and one that traditionally would be a very big challenge to try and accomplish. With Relative Facilities, it’s a breeze. At the end of this blog post you’ll see this example in run mode, but first let’s start a bit smaller scale and begin with defining relationships.
Before we begin with screen building we need to define how our Facilities Relate to one another. We will do this using the Relative Facilities feature in the Settings of Canvas.
We can create multiple definition sets based on the number of Facility services we need to connect with. We can define different sets to work with different data models if needed. We begin by defining a set.
For this example we’ll use a single Facility Service and a single definition set, but if you have several sites with different definitions, rest assure they can all work together in the same screen. That’s right, if you have different definitions between sites you can still use the same screen without script!
We begin by creating a definition set. You can have any number of definition sets, but each Facility Service can only be associated with one definition. Multiple Facility Services can be associated with a single definition set.
Next we need to add and define each of our facility types and how they relate to one another. The process you see below is that of creating Definitions, adding a new entry, giving it a name, and providing a definition using the Filter field.
Finally we need to define the child links by adding them to their parent Facility definition. This is done by selecting the Parent Facility definition and clicking the Add Link button. Any configured definitions will appear in the dropdown list until they are associated with a parent or if they already have a child. Click OK and we’re finished!
Now that the bulk of the prep work is complete it’s simply a matter of adding the controls you want and specifying where a control should look for it’s Facility.
For example, a screen configured with a Tag Chooser configured to only display Facilities of type Well, and a Facility Info Object (recognize this from the previous blog post?) placed next to it…
What I want here is to display some of the Gas Meter information for whatever Well is selected, on this same screen. In this case I’ll add a Grid (though just about any control will work, the new Canvas Grid is just too easy to not use it), set the Row Facility source to come from the Tag Chooser and configure a few columns to display meter information. The new piece I’ll need to add is that when I configure the grid columns I will set the Facility Source equal to the Gas Meter Relative Facility.
The resulting screen will function the same as before, with the addition of the Grid control that is configured to display information for a gas meter. Which gas meter? Whichever gas meter is the child of the selected Well, as defined in the Relative Facility definiootn set.
In run mode the screen looks like this…
This functionality is not limited to just working between a Tag Chooser and a Grid. The Relative Facility capability is actually supported on any control type that can accept a Facility source from another control or screen.
Back to that complex screen idea…
What about that more complex example used earlier where a single well was loaded onto a screen its associated CDP, Tanks, Meters, Plungers, and Compressors showed up too?
Below is a screen where a single Well Facility is loaded and all the subsequent Relative Facility relationships show up correctly each with some subset of unique data to illustrate the capability.
This screen while simple looking is actually doing a lot all at once. While the Well Facility is being passed in each of the other controls are resolving points specific to their own configured Relative Facilities.
Obviously this works with more than a Well, and your definitions will provide your own level of detail and relative relationships, but to build a screen that displays detailed information for seven different facilities all relative to one another by simply passing in one Facility and no script is a huge feat and will likely change the entire way you think about screen building in Canvas from now on.
There are a myriad of possibilities when it comes to how Relative Facilites are used for each control type, but we’ll leave those to your imagination for now. This is just the beginning.
Share this entry
Canvas Preview: Object Builder
Upcoming Webinars – CygNet Mobile Operator and CygNet Dispatch
Enter your email address to subscribe to this post and receive notifications of new comments by email.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Announcing the CygNet OPC UA Server
Announcing CygNet 9.5
2020 Weatherford Enterprise Software Conference
Just say “Enhance!” to bring your alarms into crystal-clear focus
Visualizing a Single Point in Canvas