Compiling Formula

From Elsys Wiki - Help and Recources for TranAX and TraNET DAQ
(Redirected from Compile Formula)
Jump to: navigation, search

The formula editor offers capabilities to compile a standard formula into a DLL. It gives you the benefit of encapsulating your formula (function blackbox) and optimizing calculation speeds. With the Using-Statement you can include the DLL into any formula.

Easy steps for compiling the formula

1. Encapsulate your formula into a Function (AddTwoNumbers):

CompileFormula1.png

2. Open compile dialog:

CompileFormula2.png

3. Insert the function name into the dialog. Set the filename for the DLL:

CompileFormula3.png


Info.png Return value is empty because we already defined one in the function.

4. Click OK to generate the formula DLL. Go to your formula where you want to include the function and reference the formula DLL with the using statement:

CompileFormula4.png


Info.png If the DLL is loaded with the using statement you can not change/override the formula DLL with a recompile. To change the DLL you have to close the "Formula 2.for - Zip" tab page or uncomment the using statement. After that you have to restart TranAX and repeat the steps 1. - 3.