29
www.rsf.at
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:
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 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)