iFix is a SCADA software used in industrial application to write the supervisory applications and sometimes simple process control(http://www.gefanuc.com/as_en/products_solutions/hmi_scada/products/proficy_ifix.html)
iFix run over Microsoft platform and it's programmed using VBA and a set of custom ActiveX which provide access to all SCADA functionalities.
FixDataSystem ActiveX (abbreviated to FDS) is one of the iFix components (ie EDA, etc.) which provides access to the PLCs data.
We found a huge performance lack in FDS in an high-reliable iFix deployment.
From the previous image (a typical high-reliable configuration):
- There is a Front-End iFix with Terminal Server installed. The server is in charge:
- To provide the user interface to operators
- To process all VBA scripts (the scripts are executed in the contexts of an iFix workspace)
- The Back-End iFix servers which are in charge:
- Communication management, I mean getting and sending data within PLCs (Level 1)
- Providing high-Level data access to iFix Terminal Server.
- Active-Node is the node currently connected to iFix Terminal Server
- Stand-By Node is the hot backup and it will be connected to iFix Terminal in case of failure of currently Active-Node.
It's very important to understand that VBA scripts are executed in iFix Terminal Server so FDS ActiveX must create a remote connection to the Active-Node.
With this configuration the performance is very lacking and if you have a lot of tags to be initialized you've to wait tens of seconds which is unacceptable in every operating conditions.
Anyway FDS ActiveX is very fast when it's used locally by the Active-Node (also keep in mind that you can have only 1-instance of FDS for a workspace).
So in the following diagram it's depicted our approach based on COM+ (implemented in .Net using Enterprise Services) which leverage the performance of FDS when it's invoked locally:
As you can see the idea is to create a .Net wrapper (TiQ .Net FDS) to FDS which could be invoked using COM+ (which has good performance for remote calls):
- The wrapper (TiQ .NET FDS) is executed in iFix Active-Node
- The VBA scripts execute by iFix Workspaces call TiQ.Net FDS using a remote COM+ component (in this way the wrapper is also exposed using a COM interface accordingly to VBA requirement on interface).
Well that's not so easy because to to guarantee high-performance:
- We've used hash-tables bypassing FDS COM collection providing access to DataItems.
- Net thread-pooling is used to optimize the threads usage during internal blocking call.
- .Net Object Pooling with Just-In-Time activation is required to guarantee that only 1 instance of FDS is created.
I will not go into implementation details because it's out-of-scope and..., well it's company know-how and there is a little bit of magic from my colleagues in TiQ-Industrial.