ABB Operator Graphics Conversion to PI Vision

The ABB Operator graphics is used to view the real time of industrial process data. It utilizes the COM infrastructure in the form of control (*.ocx) that can be embedded into the Windows OS graphics viewing infrastructure.

When the user decides to modify the screen, it uses the Visual Basic Framework to perform editing the task and then when it is deployed, the source is compiled into *.ocx. You can examine this mechanism in my earlier article about ABB graphics deployement.

Since the original graphics is always compiled from the source, it is possible to retrieve the *.ctl and *.ctx file to be parsed by the conversion program to generate the PI Vision Display Script.

There are certain objects that is dynamically generated based on given parameter, for example the AdvantCone object which is part of AdvBpoPrimitives.dll control as well as AdvBpoExtendedPrimitives.dll control for a more complex objects.

For the above objects, the required property can be obtained by parsing the binary file of the related *.ctx file, for example the ConeStrength property can be obtained from certain offset inside *.ctx file.

The conversion program then can create the object on the fly using the COM interop methods and assigned the properties that is already accessed earlier from *.ctx binary file.

To actually generate the image, the conversion program then can use the Draw method of IViewObject which is part of OLE infrastructure, and can be saved into the bitmap file.

This bitmap file then can be transformed into *.PNG file and using base 64 encoding to generate the base64 text string that is handy for the PI Vision script’s image file.

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress and Bootstrap4