Specifications
Comedi
18 / 148
data[0] Description
n (num-
ber of
ele-
ments
in data
array)
Meanings of data[1], ...,
data[n-1]
INSN_CONFIG_ALT_SOURCE
Select an alternate input source.
This instruction is used by
calibration programs to configure
analog input channels which can
be redirected to read internal
calibration references. You need
to set the CR_ALT_SOURCE flag
in the chanspec when reading to
actually read from the configured
alternate input source. If you are
using comedi_data_read(),
then the channel parameter can be
bitwise or’d with the
CR_ALT_SOURCE flag.
2 data[1]: alternate input source.
INSN_CONFIG_BLOCK_SIZE
Specify block size for
asynchonous command data.
When performing streaming input,
many boards accumulate samples
in internal fifos and transfer them
to the host computer in chunks.
Some drivers let you suggest a
size in bytes for how big a the
chunks should be. This lets you
tune how often the host computer
is interrupted with a new chunk of
data.
2
data[1]: The desired block size in
bytes. The actual configured block
size is writen back to data[1] after
the instruction completes. This
instruction acts purely as a query
if the block size is set to zero.
INSN_CONFIG_DIO_QUERY
Queries the configuration of a
DIO line to see if it is an input or
output. It is probably easier to use
the comedilib function
comedi_dio_get_config()
than to use this instruction
directly.
2
data[1]: The instruction sets this
element to either
COMEDI_INPUT or
COMEDI_OUTPUT.
See the comedilib demo program demo/choose_clock.c for an example of using a configuration instruction.
4.4 Instruction for internal triggering
This special instruction has INSN_INTTRIG as the insn member in its instruction data structure. Its execution causes an
internal triggering event. This event can, for example, cause the device driver to start a conversion, or to stop an ongoing
acquisition. The exact meaning of the triggering depends on the card and its particular driver.
The data[0] element of the INSN_INTTRIG instruction is reserved for future use, and should be set to 0.
4.5 Commands for streaming acquisition
The most powerful Comedi acquisition primitive is the command. It’s powerful because, with one single command, the program-
mer launches:
• a possibly infinite sequence of acquisitions,