19
www.rsf.at
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:
Number of the module (0…7)
Axis:
Number of the axis (0…2)
Mode:
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:
Number of the module (0…7)
Axis:
Number of the axis (0…2)
*Mode:
Selected counter operating mode (0–11)