9-10
Batch
flexible
, Manual
C79000-G7076-C650-02
An example of a routine for quadratic adaption follows:
BOOL square( float flNorm, float flMinOrMax, float* pflValue, BOOL bInverse )
{
if( !pflValue )
return FALSE;
if( bInverse ) /* inverse function */
{
*pflValue = *pflValue * ( flMinOrMax / flNorm ) * ( flMinOrMax / flNorm)
}
else
{
*pflValue = *pflValue * (flNorm / flMinOrMax ) * ( flNorm / flMinOrMax );
}
return TRUE;
}
List all adaption routines in the module definition file by the keyword EX-
PORTS.
Example PROJEC.DEF:
LIBRARY PROJECT
EXPORTS Square
Routine2
Routine3
...
Compile your source code file and create the DLL file ’BFUSER.DLL’. Now
copy the DLL file into the BATCH flexible directory or into a directory
which is identified to the Windows system by a PATH entry.
In the BATCH Object Manager use the menu command ”Configure” –>
”Production data...” to open the ”Production data” dialog and select here
the ”Adaption routines” register. Here you can add your adaption routines.
Note
The name of the adaption routine specified in BATCH flexible must be iden-
tical to the function name of its implementation (in the example above:
’square’)!
Example of a
routine
Make the adaption
routine(s) known
for external access
Create
BFUSER.DLL
Make the adaption
routines known to
BATCH
flexible
Project planning with BATCH flexible