Parameters:
Function name Name of external function
File Complete path to DLL file
Type of return Data type of the return value
Type of fixed parame‐
ter
Value parameter
Type of variable pa‐
rameter
Reference parameter
The data types are separated by commas.
The external function can, for example, be called from the LOAD method or executed in the
PRESS method.
Example:
press(vs4)
RET = InitConnection(VAR1,13,"Servus",VAR2,VAR17)
end_press
Structure of the external function
The external function must take into account a certain, specific signature:
Syntax: extern "C" dllexport void InitConnection (ExtFctStructPtr FctRet, ExtFctStructPtr
FctPar, char cNrFctPar)
Description: DLL export, only when implemented in Windows
Specifiers and transfer parameters are strictly defined. The actual call parameters
are transferred using the transferred structures.
Parameters:
cNrFctPar Number of call parameters = number of structure ele‐
ments in FctPar
FctPar Pointer to a field of structure elements, which contain
the particular call parameter with data type.
FctRet Pointer to a structure for the function value return with
data type.
Definition of the transfer structure
union CFI_VARIANT
(
char b;
short int i;
double r;
char* s;
)
typedef struct ExtFctStructTag
(
Programming commands
6.3 Functions
SINUMERIK Integrate Run MyScreens (BE2)
158 Programming Manual, 12/2017, 6FC5397-1DP40-6BA1