17
www.rsf.at
6.2 Reference of the DLL Functions
The DLL uses the following data types:
unsigned char: 8 bits (no sign)
unsigned char *: Pointer to 8 bits (no sign)
unsigned short: 16 bits (no sign)
unsigned short *: Pointer to 16 bits (no sign)
integer:
16 bits (no sign)
unsigned long: 32 bits (no sign)
unsigned long *: Pointer to 32 bits (no sign)
Every function returns a 16-bit integer:
return = (integer)
return = 0
a
Data transfer faulty or module time-out
return = 1
a
Data transfer successful
return = -1
a
Driver not open
return = -2
a
Driver still open but UFC430 module no longer connected
Up to 8 modules (cards 0-7) can be connected:
card = (unsigned char)
Each module features three counter inputs (axes 0–2).
Axis = (unsigned char)
6.2.1 General Functions
UFC_OpenDrv
Open device driver
Prototype:
return = UFC_OpenDrv (void);
return:
0 = Driver not found
1 = Driver opened
UFC_CloseDrv
Close device driver
Prototype:
return = UFC_CloseDrv (void);
return:
1 = Driver closed
UFC_SetReset
Creates a software reset in the specified module
Prototype:
return = UFC_SetReset (unsigned char card);
return: (-2…1)
card:
Number of the module (0…7)