Siemens SINUMERIK 840D sl Commissioning Manual page 723

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Structure of the external function
The external function must take into account a certain, specific signature:
Syntax:
Description:
Parameters:
Definition of the transfer structure
union CFI_VARIANT
(
char
short int
double
char*
)
typedef struct ExtFctStructTag
(
char
union CFI_VARIANT
)ExtFctStruct;
typedef struct ExtFct* ExtFctStructPtr;
If the external function is to be developed independently of the platform (Windows, Linux),
then it is not permissible to use the keyword __declspec(dllexport). This keyword is only
required under Windows. For instance, the following macro can be used under Qt:
#ifdef Q_WS_WIN
#else
#endif
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 03/2013, 6FC5397-1DP40-3BA1
external "C" dllexport void InitConnection (ExtFctStructPtr FctRet,
ExtFctStructPtr FctPar, char cNrFctPar)
DLL export, only when implemented in Windows
Specified and transfer parameters are strictly defined. The actual call
parameters are transferred using the transferred structures.
cNrFctPar
FctPar
FctRet
#define MY_EXPORT __declspec(dllexport)
#define MY_EXPORT
Number of call parameters = number of structure
elements in FctPar
Pointer to a field of structure elements, which contain
the particular call parameter with data type.
Pointer to a structure for the function value return with
data type.
b;
i;
r;
s;
cTyp;
value;
Programming commands
6.3 Functions
105

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents