Referencing the rsbizware calculator component, Writing the calculate() function – Rockwell Automation FactoryTalk Historian Classic User Guide User Manual
Page 138

Chapter 7 Creating RSBizWare Custom Analysis Tools
Next, you must specify to Visual Basic that you are going to be
implementing an RSBizWare custom analysis tool as follows:
1. Add a reference to a COM or ActiveX object in Visual Basic
by selecting Project >References.
2. In the References dialog box, scroll down the list of all
registered COM interfaces until you see the
RSBizWareCalculator 1.0 Type Library. Select it and click
OK.
3. Specify to Visual Basic that a particular class is implementing
the
RSBizWare::IRSBizWareCalculator
interface by adding
the following implements statement in the code window and
pressing the Enter key:
1.
Implements RSBizWareCalculator
4. In the top left list in the code window, select
RSBizWareCalculator. Visual Basic will generate a default
implementation of the only method in the interface:
Calculate()
. You now have an empty shell for writing the
Calculate()
function.
Now that the RSBizWare custom analysis tool interface is registered
with the Visual Basic project, you are ready to implement the
Calculate()
function. Writing the
Calculate()
function involves
a few basic steps:
1. Accessing the passed in data set from the Configuration
Console.
2. Computing the desired algorithm.
3. Returning an output data set to the Configuration Console.
If you look at the parameters passed into the
Calculate()
function,
you will see that they match the parameters listed in the IDL code
shown in "Looking at the Type Library (page 135)". (Note that
Referencing the RSBizWare
Calculator Component
Writing the Calculate()
Function
138
Rockwell Automation Publication HIST-UM001K-EN-E-June 2014