background image

14

6  DLL FUNCTIONS

6.1  Overview of the DLL Functions

6.1.1 General Functions

Description

Brief reference

Open device driver

integer UFC_OpenDrv 

(void)

Close device driver

integer UFC_CloseDrv 

(void)

Generate reset

integer UFC_SetReset 

(unsigned char card)

Read out firmware version

integer UFC_GetFirmwareVersion 

(unsigned char card, 

  

 unsigned char *major, 

  

 unsigned char *minor, 

  

 unsigned char *version, 

  

 unsigned char *revision)

Read out hardware version

integer UFC_GetHardwareVersion 

(unsigned char card, 

  

 unsigned long *Version)

Read out serial number

(USB ID expansion)  

integer UFC_GetSerialNumber 

(unsigned char card,

  

 unsigned long *Number)

Read out external 

supply voltage

integer UFC_GetVoltExtern 

(unsigned char card, 

 

  unsigned short *Volt)

Read out encoder

supply voltage

integer UFC_GetVoltEncoder 

 (unsigned char card,

  

  unsigned short *Volt)

Table 12: General functions

6.1.2 Functions for Counter and Encoder Mode

 

Description

Brief reference

Write interpolation factor

integer UFC_SetInterpolMode 

(unsigned char module, 

  

unsigned char axis, 

  

unsigned char mode)

Read out interpolation factor

integer UFC_GetInterpolMode 

(unsigned char card, 

  

unsigned char Axis, 

  

unsigned char *Mode)

Write counting direction

integer UFC_SetDirectionMode 

(unsigned char card, 

  

unsigned char Axis, 

  

unsigned char Mode)

Read out counting direction

integer UFC_GetDirectionMode 

(unsigned char card, 

  

unsigned char Axis, 

  

unsigned char *Mode)

Initialize encoder switch limit 

integer UFC_SetSwitchInit 

(unsigned char card, 

  

unsigned char Axis, 

  

unsigned char Init)

Read out encoder limit switch

 initialization

integer UFC_GetSwitchInit 

(unsigned char card,

  

unsigned char Axis, 

  

unsigned char *Init)

Table 13: Functions for counter and encoder mode

Содержание UFC 430

Страница 1: ...USER MANUAL UFC 430 USB INTERFACE MODULE 12 2017 ...

Страница 2: ...n Software 13 6 DLL Functions 14 6 1 Overview of the DLL functions 14 6 1 1 General Functions 14 6 1 2 Functions for Counter and Encoder Mode 14 6 1 3 Functions for Error Messages and Status 15 6 1 4 Functions for load and clear Counter 15 6 1 5 Functions for latching and reading out Count Values 15 6 1 6 Functions for referencing 16 6 1 7 Functions for external Inputs and Outputs 16 6 1 8 Functio...

Страница 3: ...nly use antistatic packaging material For mounting observe that the working place is properly grounded Do not engage or disengage any connectors while the power supply is switched on 1 2 Application The UFC 430 module serves to record and evaluate encoder signals It can also be used as an event counter 1 3 Items supplied UFC 430 interface module Wall power supply option CD with operating instructi...

Страница 4: ...200 x 100 x 25 mm Maximum permissible ambient temperature 40 C 3 D Sub terminal strips female 15 pin HD for counter Inputs 1 D Sub terminal strip male 15 pin HD fot I O signals USB connector type B Low voltage socket 2 2 USB Bus USB interface 2 0 The functions of a USB bus are not described in this manual ...

Страница 5: ...at can be used for ref pulse inhibit counter load signal synchrones or asynchrones latch signal or for special assignment 4 outputs TTL to cascade several cards or for special assignment 2 5 Counter Operating Modes 3 counter channels 32 bits each one load and two latch registers for each channel To count the square wave signals of encoders with TTL signals To count square wave signals and addition...

Страница 6: ... 2 X4 D Sub terminal strip male 15 pin for I O interface 3 X5 USB connector type B 4 X6 Low voltage connector for external power supply Note Table 1 Overview of the connecting elements No Description 5 Rdy Lights up as soon as the UFC430 module is ready for operation 6 Pwr Lights up as soon as the external power is present Table 2 Overview of the Ready LED V GND 3 4 5 6 1a 1b 1c 2 ...

Страница 7: ... 9 Shield 10 Trigger signal S1 11 Trigger signal S2 12 Power supply 5V sensor 13 GND sensor 14 Interference signal S 15 not connected Table 3 Connector pin assignment X1 X2 X3 Connector pin assignment X4 Pin Signal 1 IN 1 2 IN 2 3 IN 3 4 IN 4 5 IN 5 6 IN 6 7 IN 7 8 IN 8 9 Power supply 5V 10 GND 11 Out 1 12 Out 2 13 Out 3 14 Out 4 15 GND Table 4 Connector pin assignment X4 ...

Страница 8: ... are available Event counter with direction input and clear input Counting of square wave signals with times 1 times 2 or times 4 evaluation for encoders with TTL signals Counting of square wave signals with times 1 times 2 or times 4 evaluation and additional times 20 25 50 or times 100 interpolation can be programmed Used DLL function Name Page Function UFC_SetInterpolMode 19 Switch between the ...

Страница 9: ... for each counter channel or simultaneously for several counter channels either by a software command or by a hardware event Used DLL functions Name Page Function UFC_SetLatchMode 23 Select a hardware source to transfer the contents of the count value to the latch register UFC_LatchImpuls 24 Generates a pulse that can be applied simultaneously to all latch registers and to the OUT 4 output X4 pin ...

Страница 10: ...se inhibit for X2 4 IN 4 Asynchronous latch signal for X2 5 IN 5 Ref pulse inhibit for X3 6 IN 6 Asynchronous latch signal for X3 7 IN 7 Load signal for X1 X3 8 IN 8 Synchronous latch signal for X1 X3 SyncIN 11 OUT 1 Free 12 OUT 2 Free 13 OUT 3 Free 14 OUT 4 Cascading signal to cascade several modules CascOUT Table 8 I O functions The following DLL functions are used to set the I O functions Name ...

Страница 11: ... the Sync signal directly follows the input If the timer value is 0 the timer is triggered each time the input signal is activated If the input signal t2 is inactive longer than the timer t3 the Sync signal is deactivated as soon as the timer has run off Notes The time t3 must be programmed longer than the time for the signal drops t1 If the CascOUT output X4 pin 14 is programmed such that it is t...

Страница 12: ...4 2 2 DC Parameters Parameter Symbol min max Unit Input voltage LOW VIL 0 0 7 V HIGH VIH 2 8 30 V Output voltage LOW VOL 1 V HIGH VOH 2 8 V Output voltage LOW IOL 5 mA HIGH IOH 5 mA Table 11 DC Parameters ...

Страница 13: ...WS XP VISTA 7 8 After the booting procedure the operating system automatically detects the UFC430 module Now the appropriate drivers need to be installed Insert the CD labelled UFC430 Driver into your CD ROM drive Follow the instuctions on the screen After the drivers were successfully installed an entry is made to the registry and the following files are copied to the system directory e g C WINdo...

Страница 14: ...der supply voltage integer UFC_GetVoltEncoder unsigned char card unsigned short Volt Table 12 General functions 6 1 2 Functions for Counter and Encoder Mode Description Brief reference Write interpolation factor integer UFC_SetInterpolMode unsigned char module unsigned char axis unsigned char mode Read out interpolation factor integer UFC_GetInterpolMode unsigned char card unsigned char Axis unsig...

Страница 15: ...contents of load register to counter integer UFC_LoadCounter unsigned char card unsigned char Load Write load register integer UFC_SetLoadReg unsigned char card unsigned char Axis unsigned long Data Table 15 Functions for load and clear counter 6 1 5 Functions for latching and reading out Count Values Description Brief reference Write latch register mode integer UFC_SetLatchMode unsigned char modu...

Страница 16: ..._GetPosRef unsigned char card unsigned char Axis unsigned long Data Table 17 Functions for referencing 6 1 7 Functions for external Inputs and Outputs Description Brief reference Initialize mode of external inputs outputs X4 integer UFC_SetExtINit unsigned char card unsigned short Init Read out mode of external inputs outputs X4 integer UFC_GetExtINit unsigned char card unsigned short Init Write e...

Страница 17: ...turn 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_Close...

Страница 18: ...mber fo the module 0 7 Version Hardware version UFC_GetSerialNumber Provides the serial numer of the UFC430 module USB ID expansion Prototype return UFC_GetSerialNumber unsigned char card unsigned long Number return 2 1 card Number of the module 0 7 Number Serial number of the module UFC_GetVoltExtern Provides the voltage read out external power supply Prototype return UFC_GetVoltExtern unsigned c...

Страница 19: ...de 1 3 Counter input with phase discriminiator for encoders with TTL signals only 1 times1 evaluation 2 times2 evaluation 3 times4 evaluation operating mode 4 11 Counter input with phase disriminator only for encoders with 1 Vpp signals 4 times20 interpolation 5 times25 interpolation 6 times40 interpolation 7 times50 interpolation 8 times80 interpolation 9 times100 interpolation 10 times200 interp...

Страница 20: ...0 7 Axis Number of the axis 0 2 Mode Selected counting direction UFC_SetSwitchInit Initialization of the encoder limit switches Prototype return UFC_SetSwitchInit unsigned char card unsigned char Axis unsigned char INit return 2 1 card Number of the module 0 7 Axis Number of the axis 0 2 INit 0 a Encoder limit switch LO active 1 a Encoder limit switch HI active UFC_GetSwitchInit Read out initializ...

Страница 21: ... the axis 0 2 Status Bit 0 0 a Encoder track A inactive 1 a Encoder track A active Bit 1 0 a Encoder track B inactive 1 a Encoder track B active Bit 2 0 a Encoder track R inactive 1 a Encoder track R active Bit 3 0 a Encoder signal monitoring inactive 1 a Encoder signal monitoring active Encoder input pin 14 of encoders with TTL signals amplitude monitoring for encoders with analog input 1 Vpp Bit...

Страница 22: ...lses 6 Clear counter with all encoder reference pulses and additionally load counter on negative zero crossover 7 Load counter with external signal X4 pin 8 UFC_GetLoadClearMode Read out counter and clear mode Prototype return UFC_GetLoadClearMode unsigned char card unsigned char Axis unsigned char Mode return 2 1 card Number of the module 0 7 Axis Number of the axis 0 2 Mode Selected counter load...

Страница 23: ... 1 card Number of the module 0 7 Axis Number of the axis 0 2 Data 32 Bit value for load register 6 2 5 Functions for latching and reading out count values UFC_SetLatchMode Write latch register mode Prototype return UFC_SetLatchMode unsigned char card unsigned char Axis unsigned char Reg unsigned char Mode return 2 1 card Number of the module 0 7 Axis Number of the axis 0 2 Reg Latch register 0 or ...

Страница 24: ...ware sources see UFC_SetLatchMode on page 23 Prototype return UFC_LatchCounter unsigned char card unsigned char Latch return 2 1 card Number of the module 0 7 Latch Bit 0 1 a Store value of counter 1 axis 0 in the corresponding latch reg 0 Bit 1 1 a Store value of counter 1 axis 0 in the corresponding latch reg 1 Bit 2 1 a Store value of counter 2 axis 1 in the corresponding latch reg 0 Bit 3 1 a ...

Страница 25: ... Read out initialization of the external inputs for ref pulse inhibit Prototype return UFC_GetRefINit unsigned char card unsigned char Axis unsigned char Init return 2 1 card Number fo the module 0 7 Axis Number of the axis 0 2 Init Setting for ref pulse inhibit 0 or 1 UFC_ClearRef Ref pulse enable deletes the reference status Prototype return UFC_ClearRef unsigned char card unsigned char Clear re...

Страница 26: ...he reference marks RefOffset Reference offset Ref1 Current count on first reference mark Ref2 Current count on second reference mark PosOffset Counter offset EncOffset Encoder offset UFC_GetPosRef Read out count values in consideration of the distance coded reference mark Prototype return UFC_GetPosRef unsigned char card unsigned char Axis unsigned char Reg unsigned long Data return 2 1 card Numbe...

Страница 27: ...utput 4 Casc Out triggered by X4 pin 8 Sync In Bit 3 0 a Output 4 Casc Out LO active 1 a Output 4 Casc Out HI active Bit 4 0 a Input 1 LO active 1 a Input 1 HI active Bit 5 0 a Input 2 LO active 1 a Input 2 HI active Bit 6 0 a Input 3 LO active 1 a Input 3 HI active Bit 7 0 a Input 4 LO active 1 a Input 4 HI active Bit 8 0 a Input 5 LO active 1 a Input 5 HI active Bit 9 0 a Input 6 LO active 1 a I...

Страница 28: ...ut 4 active UFC_GetExtIn Read out external inputs X4 Prototype return UFC_GetExtIn unsigned char card unsigned short Input return 2 1 card Number fo the module 0 7 Input Bit 0 0 a Input 1 inactive 1 a Input 1 active Bit 1 0 a Input 2 inactive 1 a Input 2 active Bit 2 0 a Input 3 inactive 1 a Input 3 active Bit 3 0 a Input 4 inactive 1 a Input 4 active Bit 4 0 a Input 5 inactive 1 a Input 5 active ...

Страница 29: ...FC_SetTimer unsigned char card unsigned short Timer return 2 1 card Number fo the module 0 7 Timer Preload value 0 65535 UFC_GetTimer Returns the run time remaining until the next zero crossover of the timer During the zero crossover of the timer a signal is generated that can be used for a variety of functions depending on the initialization e g synchronous latching of count values load counter o...

Страница 30: ...tions load register 9 Table 7 DLL functions latch register 9 Table 8 I O functions 10 Table 9 DLL functions external I O port 10 Table 10 Delay timer 11 Table 11 DC Parameters 12 Table 12 General functions 14 Table 13 Functions for counter and encoder mode 14 Table 14 Functions for error messages and status 15 Table 15 Functions for load and clear counter 15 Table 16 Functions latching and reading...

Страница 31: ...C_ClearRef 16 25 UFC_CloseDrv 14 17 UFC_GetCounterStatus 15 21 UFC_GetDirectionMode 14 20 UFC_GetExtI 16 28 UFC_GetExtInit 16 27 UFC_GetFirmwareVersion 14 18 UFC_GetHardwareVersion 14 18 UFC_GetInterpolMode 14 19 UFC_GetLatchMode 15 24 UFC_GetLatchReg 15 24 UFC_GetLoadClearMode 15 22 UFC_GetPosRef 16 26 UFC_GetRefInit 16 25 UFC_GetSerialNumber 14 18 UFC_GetSwitchInit 14 20 UFC_GetTimer 16 29 UFC_G...

Страница 32: ...ales heidenhain se internet www heidenhain se SWITZERLAND HEIDENHAIN SCHWEIZ AG Vieristrasse 14 8603 Schwerzenbach 41 44 806 27 27 41 44 806 27 28 e mail verkauf heidenhain ch internet www heidenhain ch CHINA DR JOHANNES HEIDENHAIN CHINA Co Ltd Tian Wei San Jie Area A Beijing Tianzhu Airport Industrial Zone Shunyi District Beijing 101312 86 10 80 42 0000 e mail sales heidenhain com cn internet www...

Отзывы: