6 National Instruments MIO16E-L9   

This National Instruments card can be fully configured by software. The user must choose a valid base address, DMA channels and interrupt lines. The RAPID configuration program only needs to know the base address. The card is then configured via RAPID. So there is no need to use the National Instruments configuration program (NI-DAQ configuration utility) to configure the board.  

The ADC input mode is set by RAPID to differential with no dithering. The ADC input range, polarity and the gain can be set as the user wishes. This done via the RAPID interface during the project definition. The DAC reference is put to internal (default). The DAC output polarity can be set freely via the RAPID interface.

For analog inputs only channel (ACH0-ACH8) and channel (ACH1-ACH9) are used. If only one analog input is selected it must be connected to channel (ACH0-ACH8). If two analog inputs are needed within RAPID channel A in RAPID is connected to channel (ACH0-ACH8) on the MIO16 board, and channel B, in RAPID, is connected to channel (ACH1-ACH9) on the MIO16 board.

If the output of the controller is an analog signal only DAC0 is used.

The MIO16 board contains 2 timer/counters. Counter 0 is always connected to channel A in RAPID if a digital input is selected for this channel. Counter 1 is connected to channel B if a digital input is selected. If a digital output is desired RAPID selects counter 0 first if possible. If not it uses counter 1. This is illustrated in table 6.1


 
Table 6.1: Counter usage for the MIO16E and RAPID
2||c||Channel A 2c||Channel B 2c||Output      
analog digital analog digital analog digital
ACH0-ACH8   ACH1-ACH9   DAC0  
ACH0-ACH8   ACH1-ACH9     CNT0
ACH0-ACH8     CNT1 DAC0  
ACH0-ACH8     CNT1   CNT0
  CNT0 ACH1-ACH9   DAC0  
  CNT0 ACH1-ACH9     CNT1
  CNT0   CNT1 DAC0  
  CNT0   CNT1   IMPOS.
 

Two digital input modes exist. The input can be pulse count or time measurement. In pulse count mode the number of pulses at the source of the counter during the sample interval are counted. For this mode the signal must be connected to GPCTR0_SOURCE or GPCTR1_SOURCE. In time mode the board measures the width of a pulse send to the board via the gate input. At every sample time the last measured pulse width is returned to RAPID. For this mode the signal must be connected to GPCTR0_GATE and GPCTR1_GATE.

There is only one output mode. It is a PWM signal mode. The base frequency of the PWM is defined in RAPID. The control output, in the range $0\%$ to $100\%$, defines the duty cycle of the PWM signal. The output must be connected to GPCTR0_OUT or GPCTR1_OUT on the MIO16E board.

Two control schemes are possible with RAPID. The first is the single loop control mode. Therefore only control loop 1 is used by RAPID. For cascade control RAPID tunes the control loops separately. First control loop 1 since this is the fastest loop and than the slower control loop 2.



Peter Van Overschee
11/26/1997