User guide

97
VTB USER GUIDE
12.2 Exporting VARIABLES
We can export the desired variable to FRAMEWORK and then, on PC, write or read them as normal variables of the
project.
To export a variable, when we declare it, enable the CHECK EXP and write the name of the exporting class (default
Generic). The class serves only to group the exporting variables so to make more simple the research of them in the PC
application.
In the example the variables will be contained in Generic.VAR1EXP and it can be read or written on the PC project as a
common variable.
We remember the time of execute th READ or WRITE operation depends by the enabled LINK: serial port RS232 or
ETHERNET. Obviously the second one will be more fast.
Only the INTERNAL VARIABLES can be exported, also if the it is refer to a structure.
In the last case (structures) exporting class isn't considered, but we can get it by the name of the variable (because a
structure is similar to a class).
12.3 Exporting FUNCTIONS
In a similar way as for variables it can be exported also functions.
That must be declared with a specific POSTFIX :
function FunctionName(...Parameters...) as Type $_EXPORT_$ CLASS
. . .
endfunction
$_EXPORT_$ Keyword to enable function exporting
CLASSE Name of the exporting class where the function will be found
Example:
function MyFunction(Val1 As Long,Val2 As Long) as Long $_EXPORT_$ FunzSistem
. . .
endfunction