Compiling Formula

From Elsys Wiki - Help and Recources for TranAX and TraNET DAQ
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):


2. Open compile dialog:


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


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:


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.