Specifications

Comedi
27 / 148
4.7.8 One source plus auxiliary counter configuration
(Status: design. No driver implements this feature yet.)
The insn field of the instruction data structure has not been assigned yet.
The chanspec field of the instruction data structure is used to . . .
The data field of the instruction data structure is used as follows:
data[1] is flags, including the flags for the command triggering configuration. If a command is not subsequently issued on the
subdevice, the command triggering portion of the flags are ignored.
data[2] determines the mode of operation. The mode of operation is actually a bitfield that encodes what to do for various
transitions of the source signals.
data[3], data[4] determine the primary source for the counter, similar to the ..._src and the ..._arg fields used in the
command data structure.
Notes: How to specify which events cause a latch and push, and what should get latched?
4.7.9 National instruments RTSI trigger bus
A number of NI boards support the RTSI (Real Time System Integration) bus. It’s primary use is to synchronize multiple DAQ
cards. On PXI boards, the RTSI lines correspond to the PXI trigger lines 0 to 7. PCI boards use cables to connect to their
RTSI ports. The RTSI bus consists of 8 digital signal lines numbered 0 to 7 that are bi-directional. Each of these signal lines
can be configured as an input or output, and the signal appearing on the output of each line can be configured to one of several
internal board timing signals (although on older boards RTSI line 7 can only be used for the clock signal). The ni_pcimio,
ni_atmio, and ni_mio_cs drivers expose the RTSI bus as a digital I/O subdevice (subdevice number 10).
The functions comedi_dio_config() and comedi_dio_get_config() can be used on the RTSI subdevice to set/query
the direction (input or output) of each of the RTSI lines individually.
The subdevice also supports the INSN_CONFIG_SET_CLOCK_SRC and INSN_CONFIG_GET_CLOCK_SRC configuration
instructions, which can be used to configure/query what source the board uses to synchronize its master clock to. The various
possibilities are defined in the comedi.h header file:
Clock Source Description
NI_MIO_INTERNAL_CLOCK Use the board’s internal oscillator.
NI_MIO_RTSI_CLOCK
Use the RTSI line 7 as the master clock. This source is only
supported on pre-m-series boards. The newer m-series
boards use NI_MIO_PLL_RTSI_CLOCK() instead.
NI_MIO_PLL_PXI_STAR_TRIGGER_CLOCK
Only available for newer m-series PXI boards.
Synchronizes the board’s phased-locked loop (which runs
at 80MHz) to the PXI star trigger line.
NI_MIO_PLL_PXI10_CLOCK
Only available for newer m-series PXI boards.
Synchronizes the board’s phased-locked loop (which runs
at 80MHz) to the 10 MHz PXI backplane clock.
NI_MIO_PLL_RTSI_CLOCK(n)
Only available for newer m-series boards. The function
returns a clock source which will cause the board’s
phased-locked loop (which runs at 80MHz) to syncronize
to the RTSI line specified in the function argument.
For all clock sources except NI_MIO_INTERNAL_CLOCK and NI_MIO_PLL_PXI10_CLOCK, you should pass the period of
the clock your are feeding to the board when using INSN_CONFIG_SET_CLOCK_SRC.
Finally, the configuration instructions INSN_CONFIG_SET_ROUTING and INSN_CONFIG_GET_ROUTING can be used to
select/query which internal signal will appear on a given RTSI output line. The header file comedi.h defines the following
signal sources which can be routed to an RTSI line: