Tutorial Complexity

All posts in "Intermediate"

How To Use Archestra Graphic Wizards

Published August 18, 2019 in Intermediate , Uncategorized - 2 Comments

How To Use Archestra Graphic Wizards

A very powerful and useful feature added in later versions of Archestra is the layering wizard. The layering wizard feature allows you to make versatile graphic symbols fitting multiple scenarios.

Some ways I have seen wizards used is to represent several types of motors in a single symbol, or analog displays with options to change display format when the symbol is dropped on a screen or into another symbol.

The layers can be combined to create some very complex configurations although I would caution you to keep it as simple as possible. I have also witnessed first hand the pain of trying to modify or make updates to these rather complex creations only to find myself playing the “mole game” making a change in one thing only to discover it broke something in the layering that was seemingly unrelated. Keep it simple.

For this tutorial I have chosen a simple dual orientation valve graphic, it’s a commonly used symbol and perfect for wizard layering. In the older versions of Archestra if you wanted a valve symbol to indicate both in a vertical and a horizontal position you had two choices, either place visibility on the elements activated by some external, or build two separate symbols.

Layering solves this problem by giving your symbol intelligent configuration available at design time.

Step 1 to create a simple dual orientation valve symbol is to create your symbol with the necessary elements and properties. In this example I chose to make a valve that would display green if on or dark gray if off.

A public Boolean custom property is added to the valve symbol and default object reference provided that will coincide later with an object attribute. Note: Using a custom property allows you to choose an attribute other than “me.valve” later when the graphic is dropped into a screen or symbol. 

Each valve is represented by two groups of triangle polygons grouped by orientation, vertical or horizontal, then centered on each other.

Each polygon is animated in exactly the same way using the “Value” custom property to manipulate the Fill Style between either green or dark gray.

Step 2 after completing the element animation configuration, is to establish and configure wizard layers.

In the Options pane of the Valve graphic editor select the new folders icon and create an option folder named “orientation”. This will become a configurable property available in the symbol property window at design time.

Now, select the Orientation folder you just created clicking the Add Choice icon  making two choices one named “Horizontal” the other named “Vertical” this will appear in the Orientation property as drop down items at design time.

Now when switching to the Layers menu you will find that  a layer has been created for each of the choices associated with your Orientation choice group.

Each layer has a folder for associated Custom Properties, Graphic Elements, and Named Scripts.

In this example we will need to associate our two symbol groups with appropriate layer folder, since we are not using any scripts that folder is left empty and since our custom property is global to both layers it will associate with both by default. (Note: Once a script, element, or property has been associated with a layer it will only be available to the layer its associated with.)

To associate the two valve element groups all we need to do is drag and drop the group from the Elements pane to the Layers pane.

Now that the two groups are associated properly the valve symbol is complete.

One other thing I wanted to mention is that the small “eyeball” icon  is used to make the layer visible or not while you are working in the symbol. If I want to know how the graphic will appear for each choice I only need to click the eyeball next to the group and toggle its visibility state.  The eyeball on the Layer bar toggles visibility for all layers .This feature is only used at design time with no effect on the symbol at runtime.

When in use the valve graphic orientation is selected from the choice group drop down.

I hope this tutorial has helped you, please leave a comment.  If you would like to learn more about this tutorial you can find the video version of it on my YouTube channel here.

My Free Online training course is here.

I am getting ready to launch the book Step By Step Archestra Scripting in October, I am offering a couple of one time bonuses to anyone pre-ordering the book.  If you pre-order now you will get access to the companion online course at no additional charge and one year access to the online support forum I am launching at the same time. 

You can pre-order the book Step By Step Archestra Scripting here.

Using Alarm Client Filter Favorites

Published August 4, 2019 in Intermediate , Uncategorized - 0 Comments

Using Alarm Client Filters

One of my subscribers asked me to take a look at an issue he was having with the Alarm Client object in Archestra. He wanted to have multiple queries for narrowing down the alarms visible in the alarm history based on the area structure in the alarm model view.

He mentioned that he had read the Alarm Client guide and believed he was following it correctly yet he was unable to filter that alarms like he wanted to.

I know the alarm guide uses examples with the radio button component to switch queries at run time, but please allow me to show you another method which can be just as effective and I believe a bit easier to implement.

The method I’m going to show you is the favorite alarm query established at design time. In this example I configure r area filters and one “All” areas filter triggered with a radio button and data change script.

The key element in this strategy is to pre-configure the queries you want use for narrowing the alarm summary/history. In this case I created 4 area queries matching the areas defined in the model view each one representing a different generator set and another named “All” to show all alarms. The figure below shows the Query Filter dialog.

Once the alarm client query filters are configured you're ready to configure the radio button selector and associated scripting. The figure below shows the configuration for the radio button group. Create a string property on the host symbol named “FavoriteString” which becomes the reference for setting the filter favorite. As each radio button is selected the corresponding filter name is loaded into the “FavoriteString” property which in turn triggers a data change script.

The Data Change script executes the AlarmClient.Favorite method which is the secret sauce to this strategy for alarm filtering. As the filter name is presented the alarm client switches to use the indicated pre-configured alarm filter delivering the desired result.

Another script is placed in the show graphic area to set defaults when the alarm client first presents to the user. The next two figures below show the scripting configuration.

Once these steps have been completed the alarm client is ready for connection to the A2ALMDB.

For a more detailed look at how this method of alarm filtering is implemented you can head over to my you tube channel and watch this video for a complete demonstration.

If you are interested in learning more I offer a free online Archestra training course here.