Analog Input
External Time Base
Establishes a hardware time-base for the
model by automatically triggering A/D conversions using the external
CNTR_EN line of the Q8 data acquisition system.
Library
qctools
Description

The Analog Input External Time Base block
for the Q8 series of I/O cards provides a mechanism for making the
most efficient use of the available CPU time while synchronizing with
an external interrupt source. The block programs the CNTR_EN input to
trigger A/D conversions simultaneously on all selected channels. The
end-of-conversions flag from the A/D is then used to interrupt the
CPU and execute the real-time code. The output of the block is the
analog readings. Since the CPU does not become involved until all the
conversion results are available, the time spent doing conversions is
available for doing computations. This block is typically used when
synchronizing sampling of analog inputs among multiple cards or
computers, or when synchronizing the real-time code with an external
periodic event, such as a microcontroller clock or motor crankshaft
and analog input is required. To synchronize analog I/O of multiple
Q8 cards (on the same computer or different computers), use an Analog
Input Time Base block on the "master" with the "Enable
external output" option checked, and use Analog Input External
Time Base blocks on all the "slaves". Connect the CNTR_OUT
line of the master to the CNTR_EN lines of the slaves.
-
|

|
Note
that Time Base blocks may only
be used in Windows if the Q8 Windows driver has been converted
to an RTX driver using Convert To RTX in the RTX Properties
control panel.
|
Parameters and Dialog Box

Board Number
The board number of the I/O card. If
there is only one Q8 board in your system, then the board number
should be zero. The second Q8 board in your system is board number 1,
etc.
Channel(s) to Use
The channel numbers corresponding to
each output. For example, if there are 3 outputs, then the entry
[4,2,0] assigns output 1 to A/D input 4, output 2 to A/D input 2 and
output 3 to A/D input 0. The channel numbers may range from 0 to 7,
since there are 8 single-ended A/D channels on the Q8 I/O boards.
Output Volts
The output of the Analog Output block
is in units of Volts when this option is checked. If this option is
not checked, then the output is the raw 14-bit conversion result from
the A/D chip. The 14-bit twos-complement conversion result is
sign-extended.
CNTR_EN Polarity
Polarity of the CNTR_EN input. If this
option is not checked then a falling edge on the CNTR_EN input
triggers the A/D conversions. Otherwise a rising edge triggers A/D
conversions. The CNTR_EN line has a pullup resistor to bring it high
when the input is unconnected. Hence, this option is normally checked
by default.
Simulation Input
When the Simulation Input box is
checked, the block will have an input port. During normal simulation
(as opposed to running real-time), the signal at this input will be
quantized to the resolution of the A/D and produced at the output.
This checkbox has no effect on the real-time code.
|