RSF Elektronik UFC 430 USB Interface Module User Manual
Below you will find brief information for USB Interface Module UFC 430. The UFC 430 module serves to record and evaluate encoder signals. It can also be used as an event counter. This module features three equivalent counter channels (X1, X2, and X3) each with an interpolator, a counter, two latch registers, one load register, one control and one status register. Three counter operating modes 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; and 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.
Advertisement
Advertisement
USER MANUAL
UFC 430
USB-INTERFACE MODULE
02/2013
TABLE OF CONTENTS
1. General Information ....................................................................................................................................................03
1.1 Important Information ...................................................................................................................................................................................03
.......................................................................................................................................................................................................03
1.3 Items supplied ..................................................................................................................................................................................................03
2. Specifications ............................................................................................................................................................04
2.1 Mechanical Design and Ambient Conditions ...............................................................................................................................................04
2.2 USB Bus ...........................................................................................................................................................................................................04
2.3 Counter Interface (X1, X2, X3) .......................................................................................................................................................................04
2.4 I/O Interface (X4) .............................................................................................................................................................................................04
2.5 Counter Operating Modes ...............................................................................................................................................................................04
2.6 Latch Logic .......................................................................................................................................................................................................05
...................................................................................................................................................................06
3.1 Connecting Elements and "Ready" LED .......................................................................................................................................................06
3.2 Connector Pin Assignments ...........................................................................................................................................................................07
4. Description of the Functions ........................................................................................................................................08
4.1 Counter Interface .............................................................................................................................................................................................08
4.2 I/O Interface .....................................................................................................................................................................................................10
4.2.1 Delay Timer for external Sync-In ....................................................................................................................................................................11
4.2.2 DC Parameters .................................................................................................................................................................................................12
5. Instructions for Installation .........................................................................................................................................13
5.1 Installing the Hardware ..................................................................................................................................................................................13
5.2 Installing the Drivers .......................................................................................................................................................................................13
5.3 Installing the enclosed Demonstration 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 Functions for the Timer ..................................................................................................................................................................................16
6.2 Reference of the DLL Functions .....................................................................................................................................................................17
6.2.1 General Functions ............................................................................................................................................................................................17
6.2.2 Functions for Counter and Encoder Mode ....................................................................................................................................................19
6.2.3 Functions for Messages and Status ..............................................................................................................................................................21
6.2.4 Functions for load and clear Counter ............................................................................................................................................................22
6.2.5 Functions for latching and reading out Count Values .................................................................................................................................23
6.2.6 Funcions for referencing .................................................................................................................................................................................25
6.2.7 Functions for external Inputs and Outputs ...................................................................................................................................................27
6.2.8 Functions for the Timer ..................................................................................................................................................................................29
List of Figures ................................................................................................................................................................................................................30
List of Tables .................................................................................................................................................................................................................30
History ............................................................................................................................................................................................................................31
List of the DLL Functions .............................................................................................................................................................................................32
02
1. GENERAL INFORMATION
1.1 Important Information
Danger to components if these notes are not observed
Please observe the safety precautions according to DIN EN 100 015
when handling ESD components (electrostatic discharge)
Only 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 instructions, demo program and driver software www.rsf.at
03
2. SPECIFICATIONS
2.1 Mechanical Design and Ambient Conditions
Dimensions of the UFC 430 module: approx. 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
04
2.3 Counter Interface (X1, X2, X3)
The definitions below apply for each of the encoder inputs!
3 RS422 (line driver) or analog Inputs (1 Vpp) for square-wave encoder signals and reference marks;
Input frequency:
Encoders with TTL signals: max. 500 kHz (aslope time ≥0.5 µs)
Encoders with analog signals (1Vpp):
• max. 200 kHz at times 20 interpolation
• max. 160 kHz at times 25 interpolation
• max. 200 kHz at times 40 interpolation
• max. 160 kHz at times 50 interpolation
• max. 200 kHz at times 80 interpolation
• max. 160 kHz at times 100 interpolation
• max. 80 kHz at times 200 interpolation
• max. 40 kHz at times 400 interpolation
1 TTL input for encoder interference signal
2 TTL inputs for encoder trigger signals
Encoder power supply: 5.2 V; max. 0.2 A
2.4 I/O Interface (X4)
8 inputs (3–30 V) that 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 additional interpolation of encoders with analog signals (1 Vpp)
Event counter
Integrated timer for pulse widths, frequency and speed measurements as well
as cyclic storage of counter values in the latch registers
2.6 Latch Logic
Asynchronous latching of the counter values for each encoder channel
by software, reference mark of the encoder or external hardware signal
Synchronous storage of several counters by software, timer or external signal
Output signal for cascading several modules; can be programmed for software,
timer or external hardware synchronisation
Storing time: 62.5 ns www.rsf.at
05
3. HARDWARE
3.1 Connecting Elements and "Ready" LED
1a 1b 1c
2
5
Fig. 1: Connecting elements and "Ready" LED
6
No.
3
4
1a; 1b; 1c
2
Description
X1; X2; X3 = D-Sub terminal strip, female, 15-pin for counter interface
X4 = D-Sub terminal strip, male, 15-pin for I/O interface
X5
X6
= USB connector, type B
= Low-voltage connector for external power supply
Note!
GND
V+
Table 1: Overview of the connecting elements
3
No.
5
6
Description
Rdy:
Pwr:
Table 2: Overview of the "Ready" LED
Lights up as soon as the UFC430 module is ready for operation
Lights up as soon as the external power is present
4
06
www.rsf.at
3.2 Connector Pin Assignments
Connector pin assignment X1, X2, X3:
11
12
9
10
13
14
15
6
7
8
3
4
5
Pin
1
2
Signal
Input A+
Input A-
Input B+
Input B-
Input R+
Input R-
Power supply +5V
GND
Shield
Trigger signal S1
Trigger signal S2
Power supply +5V sensor
GND sensor
Interference signal Snot connected
Table 3: Connector pin assignment X1, X2, X3
Connector pin assignment X4:
10
11
12
7
8
9
13
14
15
4
5
2
3
6
Pin
1
Table 4: Connector pin assignment X4
Signal
IN 1
IN 2
IN 3
IN 4
IN 5
IN 6
IN 7
IN 8
Power supply +5V
GND
Out 1
Out 2
Out 3
Out 4
GND
07
4 DESCRIPTION OF THE FUNCTIONS
4.1 Counter Interface
Fig. 2: Block diagram
The UFC 430 module features three equivalent counter channels (X1, X2, and X3) each with an interpolator, a counter, two latch registers, one load register, one control and one status register.
Counter operating modes
Three counter operating modes 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
UFC_SetInterpolMode 19
Function
Switch between the three operating modes and simultaneously set the interpolation factor
Table 5: DLL functions, counter operating modes
08
www.rsf.at
Load register
For each counter channel a 32-bit load register is available. The counter preset value must be written to the load register from where it is transferred to the counter by means of a software command or by a hardware event.
Used DLL functions:
Name
UFC_SetLoadReg
UFC_LoadCounter
Table 6: DLL functions, load register
Page
23
23
UFC_SetLoadClearMode 22
Function
Write to load register
Software commend to transfer the value from the load register to the counter
Select a hardware source to transfer the contents of the load register to the counter
Latch register
For each counter channel two latch registers are available. Before the count values can be read out, they must be stored in one of the latch registers. The values can be stored either individually for each counter channel or simultaneously for several counter channels, either by a software command or by a hardware event.
Used DLL functions:
Name
UFC_SetLatchMode
UFC_LatchImpuls
UFC_LatchCounter
Page
24
24
23
Function
Select a hardware source to transfer the contents of the count value to the latch register
Generates a pulse that can be applied simultaneously to all latch registers and to the OUT 4 output (X4, pin 14)
Software command to transfer a count value into a latch register
Table 7: DLL functions, latch register
Status register
The following information can be obtained from the status register:
Counter input signals (tracks A, B and R)
Encoder interference signals (that may be present on encoders with TTL signals)
Encoder amplitude monitoring (only active for encoders with 1 Vpp signals and integrated in the UFC 430 module)
Encoder trigger signals (option for linear encoders)
Monitoring of the encoder chain of steps
Reference status (1st or 2nd reference mark traversed)
09
4.2 I/O Interface
The UFC430 module features an external I/O port (X4) with 8 inputs and 4 outputs. All inputs of the port are assigned special functions. If you do not need these special functions, the inputs are available to your requirements.
The outputs of the port have no special functions (exception: OUT 4) and therefore they are always available.
If OUT 4 is not required, it is also at your dispostion.
The special functions of the external I/O port are listed in the table below:
6
7
4
5
2
3
PIN
1
12
13
8
11
14
IN 4
IN 5
IN 6
IN 7
Signal
IN 1
IN 2
IN 3
IN 8
OUT 1
OUT 2
OUT 3
OUT 4
Special function
Ref. pulse inhibit for X1
Asynchronous latch signal for X1
Ref. pulse inhibit for X2
Asynchronous latch signal for X2
Ref. pulse inhibit for X3
Asynchronous latch signal for X3
Load signal for X1…X3
Synchronous latch signal for X1...X3 (SyncIN)
Free
Free
Free
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
UFC_SetLoadClearMode
UFC_SetRefInit
UFC_SetExtInit
UFC_SetLatchMode
UFC_SetExtOut
Table 9: DLL functions, external I/O port
Page
22
25
27
23
28
Function
Select a hardware source to transfer the contents of the load register to the counter
Activates ref. pulse inhibit
Initializing of I/O port
Select a hardware source to transfer the contents of the count value to the latch register
Sets the outputs
10
www.rsf.at
4.2.1 Delay Timer for external Sync-In
Timer value (8-bit)
0
1...255
Table 10: Delay-Timer
Timer
Timer off
Timer on
Fig. 3: Delay timer t1 < t3 < t2 t3 = timer value * 128 µs
The delay timer serves to activate a drop-out delay and thus a debouncing of the Sync-In input.
If the timer value is zero, the delay timer is in active and 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 triggered in synchronism with SyncIN (X4, pin 8)
(see DLL function "UFC_SetExtInit" on page 27), the delay timer can be measured at CascOUT.
11
4.2.2 DC Parameters
Parameter
Input voltage LOW
HIGH
Output voltage LOW
HIGH
Output voltage LOW
HIGH
Table 11: DC Parameters
I
OL
I
OH
Symbol
V
IL
V
IH
V
OL
V
OH
-5
5
min
0
-
2.8
2.8
-
-
-
30
1
max
0.7
V
V
Unit
V
V mA mA
12
5 INSTRUCTIONS FOR INSTALLATION
5.1 Installing the Hardware
Before installation please observe the safety precautions according to DIN EN 100 015 when handling ESD components (electrostatic discharge)!
Connect the encoder and possibly available I/Os to the UFC 430 module. Before doing so
make sure that you have disconnected the UFC 430 module from the main supply,
since otherwise the encoders or the UFC 430 module may be damaged
Connect the UFC 430 module to a personal computer using a USB cable
Connect the UFC 430 module to the main supply via a wall power supply (12 VDC)
5.2 Installing the Drivers
WINDOWS 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:\WINdows\System32\Drivers\ UFC430.SYS
The enclosed disk contains also the DLLs.
The corresponding DLL should be included directly in the application.
5.3 Installing the enclosed Demonstration Software
The demonstration program uses the previously installed drivers.
No software installation is required here. You can start the demonstration program immediately from the CD-ROM or - after having copied it - from your computer hard disk.
www.rsf.at
13
6 DLL FUNCTIONS
6.1 Overview of the DLL Functions
6.1.1 General Functions
Description
Open device driver
Close device driver
Generate reset
Read out firmware version
Read out hardware version
Read out serial number
(USB ID expansion)
Read out external supply voltage
Read out encoder supply voltage
Brief reference
integer UFC_OpenDrv integer UFC_CloseDrv integer UFC_SetReset integer UFC_GetFirmwareVersion integer UFC_GetHardwareVersion integer UFC_GetSerialNumber integer UFC_GetVoltExtern integer UFC_GetVoltEncoder
Table 12: General functions
6.1.2 Functions for Counter and Encoder Mode
Description
Write interpolation factor
Read out interpolation factor
Write counting direction
Read out counting direction
Initialize encoder switch limit
Read out encoder limit switch
initialization
Brief reference
integer UFC_SetInterpolMode integer UFC_GetInterpolMode integer UFC_SetDirectionMode integer UFC_GetDirectionMode integer UFC_SetSwitchInit integer UFC_GetSwitchInit
Table 13: Functions for counter and encoder mode
14
(void)
(void)
(unsigned char card)
(unsigned char card,
unsigned char *major,
unsigned char *minor,
unsigned char *version,
unsigned char *revision)
(unsigned char card,
unsigned long *Version)
(unsigned char card,
unsigned long *Number)
(unsigned char card,
unsigned short *Volt)
(unsigned char card,
unsigned short *Volt)
(unsigned char module, unsigned char axis, unsigned char mode)
(unsigned char card, unsigned char Axis, unsigned char *Mode)
(unsigned char card, unsigned char Axis, unsigned char Mode)
(unsigned char card, unsigned char Axis, unsigned char *Mode)
(unsigned char card, unsigned char Axis, unsigned char Init)
(unsigned char card, unsigned char Axis, unsigned char *Init)
www.rsf.at
6.1.3 Functions for Error Messages and Status
Description
Clear error messages
Read out counter status
Table 14: Functions for error messages and status
Brief reference
integer UFC_ClearError integer UFC_GetCounterStatus
6.1.4 Functions for load and clear Counter
Description
Write counter load and clear mode
Read out counter load and clear mode
Clear counter
Load contents of load register to counter
Write load register
Brief reference
integer UFC_SetLoadClearMode integer UFC_GetLoadClearMode integer UFC_ClearCounter integer UFC_LoadCounter integer UFC_SetLoadReg
Table 15: Functions for load and clear counter
6.1.5 Functions for latching and reading out Count Values
Description
Write latch register mode
Read out latch register mode
Generate latch pulse
Copy count value to latch register
Read out latch register
Brief reference
integer UFC_SetLatchMode integer UFC_GetLatchMode integer UFC_LatchImpuls integer UFC_LatchCounter integer UFC_GetLatchReg
Table 16: Functions for latching and reading out count values
(unsigned char card, unsigned char Clear)
(unsigned char card, unsigned char Axis, unsigned short *Status)
(unsigned char module, unsigned char axis, unsigned char mode)
(unsigned char card, unsigned char Axis, unsigned char *Mode)
(unsigned char card, unsigned char Clear)
(unsigned char card, unsigned char Load)
(unsigned char card, unsigned char Axis, unsigned long Data)
(unsigned char module, unsigned char axis, unsigned char reg, unsigned char mode)
(unsigned char card, unsigned char Axis, unsigned char Reg, unsigned char *Mode)
(unsigned char card)
(unsigned char card, unsigned char Latch)
(unsigned char card, unsigned char Axis, unsigned char Reg, unsigned long *Data)
15
6.1.6 Functions for referencing
Description
Initialize reference mode
Read out reference mode
Enable reference pulse(s)
Write to parameters for encoders with distance-coded referencemarks
Read out count values in consideration of the distance-coded refernce mark
Table 17: Functions for referencing
Brief reference
integer UFC_SetRefINit integer UFC_GetRefINit integer UFC_ClearRef integer UFC_RefPar integer UFC_GetPosRef
6.1.7 Functions for external Inputs and Outputs
Description
Initialize mode of external inputs/outputs (X4)
Read out mode of external inputs/outputs (X4)
Write external outputs (X4)
Read out external inputs (X4)
Brief reference
integer UFC_SetExtINit integer UFC_GetExtINit integer UFC_SetExtOUT integer UFC_GetExtIN
Table 18: Functions for external inputs and outputs
6.1.8 Functions for the Timer
Description
Write timer value
Read out timer value
Table 19: Functions for the timer
Brief reference
integer UFC_SetTimer integer UFC_GetTimer
16
(unsigned char card, unsigned char Axis, unsigned char Init)
(unsigned char card, unsigned char axis, unsigned char *Init)
(unsigned char card, unsigned char Clear)
(unsigned char card, unsigned char Axis, unsigned short RefDis, unsigned short RefOffset, long Ref1, long Ref2, long PosOffset, long *EncOffset)
(unsigned char card, unsigned char Axis,
unsigned long *Data)
(unsigned char card, unsigned short Init)
(unsigned char card, unsigned short *Init)
(unsigned char card, unsigned char Out)
(unsigned char card, unsigned short *Input)
(unsigned char card, unsigned short Timer)
(unsigned char card, unsigned short *Timer)
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)
17
UFC_GetFirmwareVersion
Provides the firmware version of the UFC430 module
Prototype: return = UFC_GetFirmwareVersion (unsigned char card, unsigned char *major, unsigned char *mINor, unsigned char *version, unsigned char *revision);
return: (-2…1) card:
*major:
*mINor:
*version:
*revision
Number of the module (0…7)
Firmware major
Firmware minor
Firmware version
Firmware revision
UFC_GetHardwareVersion
Provides the hardware version of the UFC430 module
Prototype: return = UFC_GetHardwareVersion (unsigned char card, unsigned long *Version);
return: (-2…1) card:
*Version:
Number fo the module (0…7)
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:
Number of the module (0…7)
Serial number of the module
UFC_GetVoltExtern
Provides the voltage (read out external power supply)
Prototype: return = UFC_GetVoltExtern (unsigned char card, unsigned short *Volt);
return: (-2…1) card:
*Volt:
Number of the module (0…7)
Suppy voltage of the module [0.1 V]
UFC_GetVoltEncoder
Provides the amplitude of the encoder supply voltage
Prototype: return = UFC_GetVoltEncoder (unsigned char card, unsigned short *Volt);
return: (-2…1) card:
*Volt
Number of the module (0…7)
Encoder supply voltage [0.1 V]
18
6.2.2 Functions for Counter and Encoder Mode
UFC_SetInterpolMode
Write interpolation factor
Prototype: return = UFC_SetInterpolMode (unsigned char card, unsigned char Axis, unsigned char Mode);
return: (-2…1) card:
Axis:
Mode:
Number of the module (0…7)
Number of the axis (0…2)
Counter operating mode (0–11) operating mode 0:
Counter input without phase dicriminator (event counter)
Track A = Counting-direction signal
Track B = Counter clock signal
Track R = Counter load or latch signal operating mode 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 interpolation
11 = times400 interpolation
UFC_GetInterpolMode
Read out interpolation factor
Prototype: return = UFC_GetInterpolMode (unsigned char card, unsigned char Axis,
unsigned char *Mode);
return: (-2…1) card:
Axis:
Number of the module (0…7)
Number of the axis (0…2)
*Mode: Selected counter operating mode (0–11) www.rsf.at
19
UFC_SetDirectionMode
Write counting direction
Prototype: return = UFC_SetDirectionMode (unsigned char card, unsigned char Axis, unsigned char Mode);
return: (-2…1) card:
Axis:
Mode:
Number of the module (0…7)
Number of the axis (0…2)
Counting direction
0 = normal
1 = inverted
UFC_GetDirectionMode
Read out counting direction
Prototype: return = UFC_GetDirectionMode (unsigned char card, unsigned char Axis, unsigned char *Mode);
return: (-2…1) card:
Axis:
*Mode:
Number of the module (0…7)
Number of the axis (0…2)
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:
Axis:
INit: 0
Number of the module (0…7)
Number of the axis (0…2)
UFC_GetSwitchInit
Read out initialization of the encoder limit switches
Prototype: return = UFC_GetSwitchInit (unsigned char card, unsigned char Axis, unsigned char *Init);
return: (-2…1) card:
Axis:
*Init:
Number of the module (0…7)
Number of the axis (0…2)
Setting of encoder limit switch (0 or 1)
20
www.rsf.at
6.2.3 Functions for Error Messages and Status
UFC_ClearError
Clear error messages (status bit 4)
Prototype: return = UFC_ClearError (unsigned char card, unsigned char Clear);
return: (-2…1) card:
Clear:
Number of the module (0…7)
Bit 0 = 0 a Do not clear error for counter 1 (axis 0)
Bit 1 = 0 a Do not clear error for counter 2 (axis 0) a
Clear error for counter 2 (axis 1)
Bit 2 = 0 a Do not clear error for counter 3 (axis 0) a
Clear error for counter 3 (axis 2)
UFC_GetCounterStatus
Read out counter status
Prototype: return = UFC_GetCounterStatus (unsigned char card, unsigned char Axis, unsigned short *Status);
return: (-2…1) card:
Axis:
*Status:
Number of the module (0…7)
Number of the axis (0…2)
Bit 0 = 0 a Encoder track A inactive a
Encoder track A active
Bit 1 = 0 a Encoder track B inactive a
Encoder track B active
Bit 2 = 0 a Encoder track R inactive a
Encoder track R active
Bit 3 = 0 a Encoder signal monitoring inactive
1
(Encoder input pin 14 of encoders with TTL signals, amplitude monitoring for encoders with analog input (1 Vpp))
Bit 4 = 0 a Encoder frequency monitoring inactive a
Encoder frequency monitoring active
Bit 5 = 0 a First reference mark not traversed a
First reference mark traversed
Bit 6 = 0 a Second reference mark not traversed a
Second reference mark traversed
Bit 7 = 0 a Reference pulse inhibit inacitve a
Reference pulse inhibit active
Bit 8 = 0 a Encoder trigger signal S1 inactive a
Encoder trigger signal S1 active
Bit 9 = 0 a Encoder trigger signal S2 inactive a
Encoder trigger signal S2 active
21
6.2.4 .Functions for load and clear Counter
UFC_SetLoadClearMode
Write counter load and clear mode
Prototype: return = UFC_SetLoadClearMode (unsigned char card, unsigned char Axis, unsigned char Mode);
return: (-2…1) card:
Axis:
Mode:
Number of the module (0…7)
Number of the axis (0…2)
Counter load/clear mode (0–7) with hardware signal
0 = Hardware signals locked
1 = Clear counter with next encoder reference pulse
2 = Clear counter all encoder reference pulses
3 = Clear counter with integrated timer
4 = Load counter with next encoder reference pulse
5 = Load counter all encoder reference pulses
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:
Axis:
*Mode:
Number of the module (0…7)
Number of the axis (0…2)
Selected counter load/clear mode (0–7)
UFC_ClearCounter
Clear counter
Prototype: return = UFC_ClearCounter (unsigned char card, unsigned char Clear);
return: (-2…1) card:
Clear:
Number of the module (0…7)
Bit 0 = 0 a Do not clear counter 1 (axis 0)
1 a Clear counter 1 (axis 0)
Bit 1 = 0 a Do not clear counter 2 (axis 1)
1 a Clear counter 2 (axis 1)
Bit 2 = 0 a Do not clear counter 3 (axis 2)
1 a Clear counter 3 (axis 2)
22
UFC_LoadCounter
A seperate load register is available for each counter channel. With this function the individual counters can be loaded with the contents of these registers. The counters can also be loaded by a number of hardware sources (see UFC_SetLoadClearMode on page 22).
Prototype: return = UFC_LoadCounter (unsigned char card, unsigned char Load);
return: (-2…1) card:
Load:
Number of the module (0…7)
Bit 0 = 1 a Counter 1 (axis 0) is loaded with the contents of its load register
Bit 1 = 1 a Counter 2 (axis 1) is loaded with the contents of its load register
Bit 2 = 1 a Counter 3 (axis 2) is loaded with the contents of its load register
UFC_SetLoadReg
Write to load register
Prototype: return = UFC_SetLoadReg (unsigned char card, unsigned char Axis, unsigned long Data);
return: (-2…1) card:
Axis:
Data:
Number of the module (0…7)
Number of the axis (0…2)
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:
Axis:
Reg:
Mode:
Number of the module (0…7)
Number of the axis (0…2)
Latch register (0 or 1)
Counter latch mode (0–7) with hardware signal
0 = Hardware signals locked
1 = Latch current count with software pulse (UFC_LatchImpuls)
2 = Latch current count with integral timer
3 = Latch current count via external Sync-In at X4 (pIN 8)
4 = Latch current count via external signal at X4
IN 2 (Pin 2) for counter channel 1 (axis 0)
IN 4 (Pin 4) for counter channel 2 (axis 1)
IN 6 (Pin 6) for counter channel 3 (axis 2)
5 = Latch current count with next encoder reference pulse
6 = Latch current count with second encoder reference pulse
7 = Latch current count with all encoder reference pulses www.rsf.at
23
UFC_GetLatchMode
Read out latch register mode
Prototype: return = UFC_GetLatchMode (unsigned char card, unsigned char Axis, unsigned char Reg, unsigned char *Mode);
return: (-2…1) card:
Axis:
Reg:
*Mode:
Number of the module (0…7)
Number of the axis (0…2)
Latch register (0 or 1)
Selected counter latch mode (0–7)
UFC_LatchImpuls
Generate latch pulse
Prototype: return = UFC_LatchImpuls (unsigned char card);
return: (-2…1) card: Number of the module (0…7)
UFC_LatchCounter
For each counter channel two seperate latch registers (reg. 0 and 1) are available.
With this function the individual count values can be loaded into the latch registers by software.
The count values can also be loaded into a latch register by a number of hardware sources
(see UFC_SetLatchMode on page 23).
Prototype: return = UFC_LatchCounter (unsigned char card, unsigned char Latch);
return: (-2…1) card:
Latch:
Number of the module (0…7)
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 Store value of counter 2 (axis 1) in the corresponding latch reg. 1
Bit 4 = 1 a Store value of counter 3 (axis 2) in the corresponding latch reg. 0
Bit 5 = 1 a Store value fo counter 3 (axis 2) in the corresponding latch reg. 1
UFC_GetLatchReg
Read out latch register
Prototype: return = UFC_GetLatchReg (unsigned char card, unsigned char Axis, unsigned char Reg, unsigned long *Data);
return: (-2…1) card:
Axis:
Reg:
*Data:
Number of the module (0…7)
Number of the axis (0…2)
Latch register (0 or 1)
Contents of the latch register
24
6.2.6 Functions for referencing
UFC_SetRefInit
Initializing of external inputs as reference-pulse inhibitor.
Prototype: return = UFC_SetRefInit (unsigned char card, unsigned char Axis, unsigned char Init);
return: (-2…1) card:
Axis:
INit: 0
Number of the module (0…7)
Number of the axis (0…2)
IN 1 (pin 1) for counter channel 1 (axis 0)
IN 3 (pin 3) for counter channel 2 (axis 1)
IN 5 (pin 5) for counter channel 3 (axis 2)
UFC_GetRefInit
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:
Axis:
*Init:
Number fo the module (0…7)
Number of the axis (0…2)
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);
return: (-2…1) card:
Clear:
Number fo the module (0…7)
Bit 0 = 0 a Do not clear ref. status of counter 1 (axis 0)
Bit 1 = 0 a Do not clear ref. status of counter 2 (axis 1) a
Clear ref. status for counter 2 (axis 1)
Bit 2 = 0 a Do not clear ref. status of counter 3 (axis 2) a
Clear ref. status for counter 3 (axis 2) www.rsf.at
25
UFC_RefPar
Write to parameters for encoders with distance-coded reference marks
Prototype: return = UFC_RefPar (unsigned char card, unsigned char Axis, unsigned short RefDis, unsigned short RefOffset, long Ref1, long Ref2, long PosOffset, long *EncOffset);
return: (-2…1) card:
Axis:
RefDis:
RefOffset:
Ref1:
Ref2:
PosOffset:
*EncOffset:
Number of the module (0…7)
Number of the axis (0…2)
Basic spacing of the reference marks
Reference offset
Current count on first reference mark
Current count on second reference mark
Counter offset
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:
Axis:
Reg:
*Data:
Number of the module (0…7)
Number of the axis (0…2)
Latch register (0 or 1)
Contents of latch register set against the reference parameters
26
6.2.7 Functions for external Inputs and Outputs
UFC_SetExtInit
Initialization of the polarity for the external inputs and outputs at X4
Prototype: return = UFC_SetExtInit (unsigned char card, unsigned short Init);
return: (-2…1) card:
Init:
Number of the module (0…7)
Bit 0 = 0 a Output 4 (Casc-Out) not triggered by software latch impuls
1 a Output 4 (Casc-Out) triggered by software latch pulse
Bit 1 = 0 a Output 4 (Casc-Out) not triggered by internal timer
1 a Output 4 (Casc-Out) triggered by internal timer
Bit 2 = 0 a Output 4 (Casc-Out) not triggered X4/pin 8 (Sync-In)
1 a Output 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 Input 6 HI-active
Bit 10 = 0 a Input 7 LO-active
1 a Input 7 HI-active
Bit 11 = 0 a Input 8 LO-active
1 a Input 8 HI-active
UFC_GetExtInit
Read out initialization of the polarities for the external inputs and outputs at X4
Prototype: return = UFC_GetExtInit (unsigned char card, unsigned short *Init);
return: (-2…1) card: Number of the module (0…7)
*INit: Setting the polarities (0…65535) www.rsf.at
27
UFC_SetExtOut
Write external outputs (X4)
Prototype: return = UFC_SetExtOut (unsigned char card, unsigned char Out);
return: (-2…1) card:
OUT:
Number fo the module (0…7)
Bit 0 = 0 a Output 1 inactive
Bit 1 = 0 a Output 2 inactive a
Output 2 active
Bit 2 = 0 a Output 3 inactive a
Output 3 active
Bit 3 = 0 a Output 4 inactive a
Output 4 active
UFC_GetExtIn
Read out external inputs (X4)
Prototype: return = UFC_GetExtIn (unsigned char card, unsigned short *Input);
return: (-2…1) card:
*Input:
Number fo the module (0…7)
Bit 0 = 0 a Input 1 inactive
Bit 1 = 0 a Input 2 inactive a
Input 2 active
Bit 2 = 0 a Input 3 inactive a
Input 3 active
Bit 3 = 0 a Input 4 inactive a a a a a
Input 4 active
Bit 4 = 0 a Input 5 inactive
Input 5 active
Bit 5 = 0 a Input 6 inactive
Input 6 active
Bit 6 = 0 a Input 7 inactive
Input 7 active
Bit 7 = 0 a Input 8 inactive
Input 8 active
28
6.2.8 Functions for the Timer
UFC_SetTimer
Sets the preload value for the timer. If the preload value is set to "0", a running timer is stopped at the next zero crossover. If the preload value is <> 0, a non-running timer is immediately started with the specified value; a running timer receives the new value at the next zero crossover.
Time = (Preload value + 1) * 5µs
Prototype: return = UFC_SetTimer (unsigned char card, unsigned short Timer);
return: (-2…1) card:
Timer:
Number fo the module (0…7)
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 or generating a pulse at the CascOut output.
Prototype: return = UFC_GetTimer (unsigned char card, unsigned short *Timer);
return: (-2…1) card: Number fo the module (0…7)
*Timer Remaining the time (0…65535) www.rsf.at
29
LIST OF FIGURES
Fig. 1: Connecting elements and "Ready" LED .................................................................................................................................................... 6
Fig. 2: Block diagram .............................................................................................................................................................................................8
Fig. 3: Delay timer .................................................................................................................................................................................................11
LIST OF TABLES
Table 1: Overview of the connecting elements .................................................................................................................................................. 6
Table 2: Overview of the "Ready" LED ................................................................................................................................................................. 6
Table 3: Connector pin assignment X1; X2; X3 .................................................................................................................................................. 7
Table 4: Connector pin assignment X4 ............................................................................................................................................................... 7
Table 5: DLL functions, counter operating modes ............................................................................................................................................ 8
Table 6: DLL functions, 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 out count values ..........................................................................................................................15
Table 17: Functions for referencing ..................................................................................................................................................................16
Table 18: Functions for external inputs and outputs ......................................................................................................................................16
Table 19: Functions for the timer ......................................................................................................................................................................16
30
www.rsf.at
HISTORY
Date
10/2006
01/2007
02/2013
Revision
Revision of the user manual 05/2006 - 12/2006
accurate listing of input frequencys for encoders with TTL signals and analog signals (1Vpp)
corrected the formular for the timer
Revision of the user manual 12/2006 - 01/2007
corrected input frequency for encoders with analog signals (1Vpp)
Revision of the user manual 01/2007 - 02/2013
insert table of history
insert technical drawing of UFC 430-controller housing
update of the installation instructions
31
04
13
Seite
05
29
05
31
LIST OF THE DLL FUNCTIONS
UFC_ClearCounter ...............................................................15, 22
UFC_ClearError ....................................................................15, 21
UFC_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_GetVoltEncoder ............................................................................. 14, 18
UFC_GetVoltExtern ................................................................................ 14, 18
UFC_LatchCounter ................................................................................. 15, 24
UFC_LatchImpuls ................................................................................... 15, 24
UFC_LoadCounter .................................................................................. 15, 23
UFC_OpenDrv .......................................................................................... 14, 17
UFC_RefPar ............................................................................................. 16, 26
UFC_SetDirectionMode ......................................................................... 14, 20
UFC_SetExtInit ........................................................................................ 16, 27
UFC_SetExtOut ....................................................................................... 16, 28
UFC_SetInterpolMode ............................................................................ 14, 19
UFC_SetLatchMode ............................................................................... 15, 23
UFC_SetLoadClearMode ........................................................................ 15, 22
UFC_SetLoadReg ................................................................................... 15, 23
UFC_SetRefInit ....................................................................................... 16, 25
UFC_SetReset ......................................................................................... 14, 17
UFC_SetSwitchInit ................................................................................. 14, 20
UFC_SetTimer ......................................................................................... 16, 29
32
www.rsf.at
33
DISTRIBUTION CONTACTS
AUSTRIA
Corporate
Head Quarters
FRANCE
RSF Elektronik Ges.m.b.H.
A-5121 Tarsdorf 93
HEIDENHAIN FRANCE sarl 2 Avenue de la Christallerie
92310 Sèvres
GREAT BRITAIN
ITALY
NETHERLANDS
SWEDEN
HEIDENHAIN (GB) Ltd.
200 London Road
Burgess Hill
West Sussex RH15 9RD
HEIDENHAIN ITALIANA S.r.l.
Via Asiago, 14
20128 Milano (MI)
HEIDENHAIN NEDERLAND B.V.
Copernicuslaan 34
6710 BB EDE
HEIDENHAIN Scandinavia AB
Storsätragränd 5
SE-12739 Skärholmen
SWITZERLAND
CHINA
JAPAN
KOREA
USA
+43 62 78 81 92-0
+43 62 78 81 92-79 e-mail: [email protected]
internet: www.rsf.at
+33 1 41 14 30 00
+33 1 41 14 30 30
+44 1444 247711
+44 1444 870024
+39 02 27075-1
+39 02 27075-210
+ 31 318 58 18 00
+ 31 318 58 18 70 e-mail: [email protected]
internet: www.heidenhain.fr
e-mail: [email protected] internet: www.heidenhain.co.uk
e-mail: [email protected]
internet: www.heidenhain.it
e-mail: [email protected]
internet: www.heidenhain.nl
RSF Elektronik (Schweiz) AG Vieristrasse 14
CH-8603 Schwerzenbach
+46 8 531 933 50
+46 8 531 933 77
+41 44 955 10 50
+41 44 955 10 51 e-mail: [email protected]
internet: www.heidenhain.se
e-mail: [email protected]
internet: www.rsf.ch
RSF Elektronik
HEIDENHAIN K.K.
HEIDENHAIN LTD.
HEIDENHAIN CORPORATION
Tian Wei San Jie, Area A,
Beijing Tianzhu Airport Industrial Zone
Shunyi District, 101312 Beijing
P.R. China
333 East State Parkway
Schaumburg, IL 60173-5337
+86 10 80 42 02 88
+86 10 80 42 02 90
Hulic Kojimachi Bldg.,
9F 3-2 Kojimachi, Chiyoda-ku
Tokyo, 102-0083
+81 3 3234 7781
+81 3 3262 2539
202 Namsung Plaza, 9th Ace Techno
Tower, 130, Digital-Ro, Geumcheon-Gu,
Seoul, Korea 153-782
+82 2 20 28 74 30
+1 847 490 11 91 e-mail: [email protected]
internet: www.rsf.cn
e-mail: [email protected]
internet: www.heidenhain.co.jp
e-mail: [email protected]
internet: www.rsf.co.kr
e-mail: [email protected]
internet: www.rsf.net
Date 02/2013
Art.Nr.1063885-01
Dok.Nr. D1063885-00-A-01
Technical adjustments in reserve!
Linear Encoders
Cable Systems
Precision Graduations
Digital Readouts
Certified acc. to
DIN EN ISO 9001
DIN EN ISO 14001
Ges.m.b.H.
A-5121 Tarsdorf
+43 (0)6278 / 8192-0
FAX
+43 (0)6278 / 8192-79 e-mail: [email protected] internet: www.rsf.at

Download
Advertisement
Key features
- 3 counter channels
- Event counter
- Integrated timer
- 8 inputs
- 4 outputs
- USB interface
- RS422 input
- Analog input
- External I/O port
- Delay timer