Recently I have been working on an ArchestrA system where unfortunately many of the objects do not conform to any sort of standard.  This makes designing graphic templates difficult.  Often it is desired to only show a small amount of information via a graphic, and then have a popup window with a complete list of IO attributes for an object.  In InTouch we did all of this manually, but with ArchestrA we wanted to automate this tedious process.

The problem boils down to three main steps:

  1. Enumerate the IO attributes (by filtering for those with "InputSource" at the end.
  2. Retrieve the runtime values
  3. Display the values.

Enumerating the attributes of an object can be achieved with the GRAccess toolkit.  Runtime values are fetched using the MXAccess toolkit and displaying the values can be done by writing a windows forms control.

To prove the concept, I wrote a user control that performed all three steps above, but it proved to be very slow to create a connection to the galaxy, retrieve the attributes and query the values.  This created an unacceptable delay when showing a popup before the data showed up in the list, nevertheless it did work rather well.  Furthermore, the GRAccess toolkit only works on the Galaxy node, so some sort of server/client architecture is required for a production implementation.

Version 2:

Version 2 consists of a server component that resides on the galaxy, and a client control that communicates with it.  The server component maintains one connection to the galaxy for all objects and attributes, and serves data over http in the JSON format.  This has the added benefit that one can simply browse to to http://servername:port/myobject and recieve a list of the objects IO attributes.  The end result of this is very snappy opening and closing times for the popup, with only a slight delay when first requesting data from an object.  However, there is still room for improvement...

Left - using a web browser to access attributes, and an ArchestrA/InTouch popup on the right.

Left - using a web browser to access attributes, and an ArchestrA/InTouch popup on the right.

Version 3:

So Version 2 works well, but there are some improvements that could be made.  These are the things that I have in mind for future development:

  • Turn the server side component into an ArchestrA object (written using the ArchestrA Object Toolkit), this would make for much simpler deployment.
  • Add more options to the query string, for example myobject?attributeType=output to get output attibutes only.
  • Fetch custom labels from galaxy and use them in place of True/False for boolean types.
  • Fetch units for values
  • Fetch descriptions for attributes

Source code for this project is available at, read the readme for usage instructions.

| November 22nd, 2015 | Posted in SCADA |

Leave a Reply