Home
Example Calculation Dll PDF Print E-mail
Saturday, 06 December 2008 09:49

As per our previous article about the different methods of using calculations within Exaquantum I have created an example Exaquantum Calculation DLL for you to get started with.

This DLL has been created with Visual Basic 6 (I will update it to .net soon).

The DLL only has one calculation contained within that checks to see if the year fed to it is a leap year or not. If you look at the code it is very simple the only caution is that you must ensure that your functions are public so they can be accessed from Exaquantum.

To embed this DLL within Exaquantum you must add a row to the Exaquantum database when the Exaquantum service is shutdown to find out more about this please read section 12.2 (Expressions/Concepts) of the Exaquantum PIMS users manual. We have configured our DLL to be global but if you do this you must ensure that any function names you create are not already being used by Exaquantum.

If you want to call your newly created calculation within Exaquantum here the code. [Result] = isLeapYear("2008").

If you want the year to come from another tag instead of being hard coded here is the code. [Result] = isLeapYear(YourTag)

The example code is here for you.

 
Calculated Tags PDF Print E-mail
Saturday, 06 December 2008 08:32

Exaquantum has 3 main options to choose from when running calculations each of these different styles of running a calculation has a different target application, this is a balance of ease of programming, frequency of calculation modifications and performance.

 

Standard calculated tags: This is by far the most common type of calculation that is used within Exaquantum due to ease of development.

The Standard calculations within Exaquantum as based on VBscript which makes it very easy for a programmer or non-programmer alike to quickly and easily get calculations up and running.

The main disadvantage of this style is that by nature scripting languages thus these are interpreted each time the calculation is ran.

Calculation Library: It is possible to create you own compiled DLL which can be embedded within Exaquantum that can be called from a standard calculation tag.

One of the main advantages of this approach is the performance that is gained when working on highly complex calculation such as those that may require database access. But this also allows debugging in an external program, use of 3rd party DLL's containing the calculations required and you can easily reuse existing code.

But there are a couple of disadvantages to this approach you will need to have some knowledge of either VB6, VB.NET or C in order to do the required programming. Also if any changes are made to the DLL you will need to restart the Exaquantum system before installing the new DLL.

Event Handler:  There are 3 different event types that can be handled by the Event Handler I will outlined the basic functionality of each of these below. Currently only 8 parameters can be passed to an Event. 

Exaquantum OPC AE Pump
The standard Exaquantum installation can read Alarm and Events from an OPC Gateway but the really good thing about this is we can get Exaquantum analyze these events and take an action when they meet certain criteria. For example if your site does not have an DCS/PLC engineer on site 24/7 you could get the system to automatically email an engineer if a major failure status is recieved.

Exaquantum Aggregation Completion
This event allows you to run a calculation at the end of a specified Aggregation period (IE Shift, Hour, Day etc)

Exaquantum Standard Calculation

From any Standard Exaquantum Calculation you can make a request to the Event Handler to run a certain task. This will allow you to run certain Complex or potentially long calculations to be run that are not time dependent.
 
 
So now you know all the different ways to do a calculations from within Exaquantum how do you choose which way to go.
 
 Conditions  Standard Calcs    Calc Library    Event Handler  
Large/Slow CalcsNoLarge onlyYes
External Calcs NoYesYes
Frequent changes to calcYesNoYes
RealtimeYesYesNo
Proprietary Code  NoYesYes

Standardise code across

Multiple sites

MaybeYesYes

Last Updated on Saturday, 06 December 2008 10:07
 
Welcome PDF Print E-mail
Monday, 01 December 2008 13:45

Welcome everyone to Exaquantum Central.

Here at Exaquantum Central we hope to build a community of Exaquantum users from around the world to help exchange ideas and share our experiences we have all had with this product.

 Some of what we would like to do here is:

  • Talk through in detail about each of the different features that are available with the the product.
  • Share different Explorer Mimics that we have all created.
  • Share complex DLL's that can extend Exaquantum's calculations.
  • Share ideas about what we have or would like to do.
As you can see Exaquantum Central is really all about sharing the information that is out there so we can all benefit from it and hopefully utilize this product to its full potential.

Thank You

Editor

 


Copyright © 2009 Exaquantum Central. All Rights Reserved.
Disclaimer. The information contained in this archive is provided 'as is' without warranty of any kind. The entire risk as to the results and the performance of the information is assumed by the user, and in no event shall Exaquantum Central be liable for any consequential, incidental or direct damages suffered in the course of using the information in this archive. Use of the information contained in this archive are governed by their respective license agreements and may contain restrictions on use. Exaquantum Central are not affiliated with or endorsed by Yokogawa. Exaquantum is a registered trademark of the Yokogawa Electric Corporation. Images are property of their respective owners.