2 position compare with trigger output, Position compare with trigger output – ADLINK PCI-8164 User Manual

Page 146

Advertising
background image

134

Operation Theory

4.7.2 Position compare with trigger output

The 5th comparator, whose comparing source can be feedback or
command position counter, performs the position compare func-
tion. Only the first 2 axes (0 and 1) can do a position comparison
with trigger output. The position comparison function triggers a
pulse output via the CMP pin, when the comparing condition
comes into existence.

The comparing condition consists of two parts, the first is the value
to be compared, and the second is the comparing mode. Compar-
ing mode can be “>“, “=“ or “<“. The easiest way to use the posi-
tion comparison function is to call the function:

_8164_set_trigger_comparator (AxisNo, CmpSrc,

Method, Data)

The second parameter, Method, indicates the comparing method,
while the third parameter, Data, is for the value to be compared. In
continuous comparison, this data will be ignored automatically
since the compare data is built by other functions.

Continuously comparison with trigger output

To compare multiple data continuously, functions for building com-
parison tables are provided and are shown below:

1. _8164_build_comp_function(AxisNo, Start, End, Inter-

val)

2. _8164_build_comp_table(AxisNo, tableArray, Size)

3. _8164_set_auto_compare(AxisNo, SelectSource)

Note:

Turn off all interrupt function and reduce accessing 8164 like

get_position or issuing other commands when continuously

comparison functions are running.

The first function builds a comparison list using start and end
points and constant intervals. The second function builds on an
arbitrary comparison table (data array). The third function is a
source comparing selection function. Set this parameter to 1 to
use the FIFO mode. Once it is set, the compare mechanism will
start. Users can check current values used for comparison using
the function_8164_check_compare_data():

Advertising