Home
External Time Base Analog Input External Time Base

Analog Input Time Base

Establishes a hardware time-base for the model by automatically triggering A/D conversions using the COUNTER of the Q8 data acquisition system.

Library

qctools

Description




The Analog Input 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. The block programs the COUNTER 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 doing very fast analog I/O or synchronizing sampling of analog inputs among multiple computers. 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 the CNTR_EN is an active-low input. Otherwise it is active-high. The CNTR_EN line has a pullup resistor to bring it high when the input is unconnected. Hence, this option is normally checked to enable the counter by default.

Enable External Output

When this option is checked, the square wave counter output will appear on the external CNTR_OUT pin of the CONTROL header of the Q8 terminal board.

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.

       
External Time Base Analog Input External Time Base