UEI PDXI-MFS 12-Bit Series Frame Analog Input

PDXI-MFS 12-Bit Series Frame Analog Input block


Simulink® Real-Time™ Library for UEI

Scaling Input to Output

I/O Module Input

Block Output Data Type





Block Parameters

Board type

Select the specific board type from the list provided.

Channel vector

Enter a vector of numbers that make up one scan. For example, to read the first and fifth channels, enter

[1 5]

The channel numbers can occur in arbitrary order. Number the channels beginning with 1 even if this board manufacturer numbers them beginning with 0. The maximum allowable channel number is 4, 8, 16, or 64 depending on the board type.

Gain vector

Enter a vector of numbers to specify the gains for each of the channels in the scan. Enter a single value to replicate the gain value across the channels in the scan. Available gains vary depending on board type. Allowable values depend on the board type.

  • L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.

  • H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.

  • DG-option boards — Specify the gain as one of 1, 2, 5, or 10.

Mux settling time vector (slow bit)

Enter a vector that is the same length as the channel vector. Each vector element must be a 0 or 1. If you specify 1, the corresponding channel has a longer settling time. To get a more accurate reading, you might want to specify a 1 for channels that have higher gains, such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further information on the longer settling time. This time depends on the board type.

    Caution   With frame based acquisition, the additional time resulting from setting the Mux settling time vector (slow bit) might cause an acquisition overrun that the Simulink Real-Time software does not detect. For example, on a PD2-MF-xx-333/16H board, each acquisition takes 3 microseconds if the slow bit is 0. If the slow bit is 1, that same acquisition takes more than 10 microseconds. With the Simulink Real-Time software, the scan is performed at the maximum rate for a given board. This means that the slow acquisition takes a multiple of 3 microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12 microseconds.

    For example, assume that N scans of the channel vector compose a frame of data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of [0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition delays are 3 microseconds, and two are 12 microseconds. With a Block sampletime value of .001 second, if N is greater than 38, the data will not be acceptable. If you set the slow bits to 0, N can have a value of up to 83. The software detects the limit at N = 83, but is not aware of the extra board dependent delay.


From the list, select one of the following voltage ranges. The value you select applies to all channels.

  • +-10 Volts

  • +-5 Volts

  • 0-10 Volts

  • 0-5 Volts

Input coupling mode

From the list, select one from the following list of input coupling modes:

  • Single Ended

  • Differential

    Refer to the UEI PowerDAQ documentation for input connections.

Frame size

Enter the number of samples per channel to return as a frame of data. Due to physical constraints in the I/O module, the total number of samples in a frame of data cannot exceed 512. The relationship between the number of samples, frame size, and number of channels is

total number of samples = FrameSize x nChannels

For example, if you specify two channels, the frame size must be less than or equal to 256.

Output format

From the list, select either Frame or Vector.

  • Frame — Select Frame if you expect the output signal from this block to be the input signal for a block that requires a frame. For example, a Signal Processing block.

  • Vector — Select Vector if you expect the output signal from this block to be the input signal for a Simulink Real-Time scope or some other block that requires vector input.

Scan clock source

Select Internal or External to identify the clock source for the frame scans.

Scan time

Enter the time (in seconds) between scans as the interval.

Frame time

Enter the interval (in seconds) during which the board will interrupt. The driver block evenly spaces the scans in the frame across the Frame time interval. If the Frame time interval is too short, you will receive a buffer overrun error at run time. For optimal results, experimentally increase the Frame time value and reiterate the process. Rebuild the model when you change this value.

The Frame size, Scan time, and Frame time parameters are not independent, but are related by

Frametime = Framesize × Scantime.

After you specify two of the parameters, specify -1 for the third parameter and the equation determines the third parameter.

    Note:   Because the Simulink Real-Time software uses this value to set parameters on the board, you cannot change the Frame time value at the MATLAB® prompt.

Block is in an ISR

Select this check box if the block is in an interrupt service routine (ISR). Selecting this check box forces the block sample time to –1, which enables the block to work in the ISR. If this check box is not selected, the block sample time is equal to the value of Frame time.

Slave board

If you have multiple boards configured in a master/slave combination, select this box for the slave boards only. Leave the box unchecked for the master board. (Note that a single board configuration is considered a master board.)

    Note:   In the model, set the priority of slave blocks higher than master blocks. Right-click the slave or master block and select Properties. In the dialog, enter a value in the Priority property. For example, if you have multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for the master block, where a lower number indicates a higher priority.

Acquisition frequency

Enter the rate at which the high speed conversion clock runs. This is the clock used to acquire each scan in a frame. For example, with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate, the second channel in a scan will be acquired 3 microseconds after the first one in every scan of the frame.

Specify -1 to select the maximum rate available for the specified board.

DMA burst size

From the list, select either 32, 16, or 8. The DMA engine transfers data in packets of the burst size or less. Between each burst, a new bus arbitration cycle must complete. Better performance is achieved with higher DMA burst size values, with 32 being highest. However, in some architectures and with some PCI bus adaptors, a DMA burst size of 32 might cause problems. For example, it might lock up the target computer when DMA is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and rerun the real-time application. If the DMA works at 8, select 16 and try again.

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber].

To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

Was this topic helpful?