Expanding the Operator Interface (BE1) 08/2005
3 Syntax
© Siemens AG, 2005. All rights reserved
BE1/3-94 SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
Type of fixed call List of data types of fixed call parameters.
parameter The data types are separated by commas.
Type of variable call List of data types of variable
parameter call parameters (variable or register). The
data types are separated by commas.
The data types of return values and call parameters are R, I, S, C, B.
Use of external functions in the further configuration:
Function name (Call parameter)
where:
Function name Name of external function
Call parameter List of all call parameters.
Individual parameters are separated by commas.
Note
An external function must have at least one return parameter.
//M(FORM1)
DEF VAR1 = (R)
DEF VAR2 = (I)
DEF RET = (I)
FCT InitConnection = ("c:\user\mydll.dll"/I/R,I,S/I,S)
;The external function "InitConnection"
;is declared. The data type of
;the return value is Integer, the data types
;of the fixed call parameters are Real,
;Integer and String, the data types of the
;variable call parameters are Integer
;and String.
LOAD
RET = InitConnection(VAR1+SIN(VAR3),13,"Servus",VAR2,
REG[2])
;RET is assigned the value of the external
function "InitConnection" with call
parameters VAR1+SIN(VAR3), 13,
Servus, VAR2 and REG[2].
END_LOAD
Extract from DLL file:
void __export WINAPI InitConnection(ExtFctStructPtr FctRet,
ExtFctStructPtr FctPar, char cNrFctPar)
FctRet->value.i Return value of function
FctPar[0]->value.r 1. parameter (VAR1+SIN(VAR3))
FctPar[1]->value.i 2. parameter (13)
FctPar[2]->value.s 3. parameter ("Servus")
FctPar[4]->value.i 4. parameter (reference to VAR2)
FctPar[5]->value.s 5. parameter (reference to REG[2])
cNrFctPar Number of parameters (5)