8 linear comparing, Linear comparing – ADLINK PCI-8124-C User Manual
Page 87

Function Library
77
6.8
Linear Comparing
@ Name
@ Description
_8124_set_linear_compare:
This function is used to configure the linear comparing trigger
function. Before using linear comparing function, you should
enable the source of PWM from linear function by
“_8124_set_pwm_source”. PCI-8124-C has 10 linear sets can
be used for linear and they can be compared with any counter
arbitrarily. Every set has 3 parameters including starting point
(StartPoint), repeat times (RepeatTimes) and trigger interval
(Interval). The total trigger pulse would be (RepeatTimes + 1)
times. For example, if you set the RepeatTimes as 10, the total
output pulse will be 11. The follow formula is show that how do
you calculate the next triggering position.
Next triggering position = StartPoint + Interval x N
N: triggered times, ( N
RepeatTimes)
The Interval can be set as a negative value. The comparing
direction is depending on the signed of Interval. Moreover, if
RepeatTimes is set to 0, the linear comparing will not stop until
stopping counting or reset the linear function.
_8124_set_linear_source:
There are 10 linear sets in PCI-8124-C. Use this function to
assign which sets will be used in the specified trigger channel.
One trigger channel can have more then one linear set.
_8124_set_linear_compare
Set the linear comparing function
_8124_set_linear_source
Set the trigger output sources for linear
functions
_8124_enable_linear_set
Enable/Disable the linear set