Audio-PMC+ Analog Input block (not recommended)
Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use
This is a vector of channels. Specifies the input channels that the block works on. For example, to use the first, third, and fifth analog input channels, enter
Specify the format that the data takes. The choices are
double in the range
The unscaled integer format is usable with blocks that can accept
fixed point data. This format contains the data in the lower 24 bits
of a 32 bit
integer with sign extension in the
upper 8 bits.
Note: You can only set this parameter for the analog input block. The analog output block determines the data type from the connection and sets itself to the required type.
These three parameters are not independent but are related by
FrameSize = Sampletime * SampleRate.
After you specify two of the parameters, the equation determines the third parameter.
For example, if you set Frame Size to 32
and Sample Rate to 40000, specify Sampletime as
It is computed internally to 0.0008 seconds. This example model will
execute every 0.0008 seconds, which is every 32 samples at 40 kHz.
Conversely, you can also specify that you want to execute every
1.0 ms with a Frame Size of 64 samples. Specify Sample
-1. It is computed to be 64000
The implementation of Sample Rate on the Audio-PMC+ might cause the rate on your board to be inexact. Audio-PMC+ derives the sample rate from the PWM0 output of the first 21065L SHARC® DSP chip. The PWM0 output is driven by the 60 MHz CPU clock for sample rates between 100 kHz and 20 kHz and by a prescaled 30 MHz CPU clock (half the 60 MHz CPU clock) for sample rates between 8 kHz and 20 kHz.
The sample rate is implemented internally by specifying the total number of counts per sample interval. For example, the number of counts for a sample rate of 44.1 kHz is calculated as
This value is rounded down to
1360. To calculate
the actual clock sample rate, divide 60 MHz by the number of counts
The result indicates that the sample rate is off by 0.04%. This calculation assumes that the CPU clock is exactly 60 MHz.
Since you can build a model with just input or just output, the three rate parameters are included in both block parameter dialogs. You must set them to equal values if you have a model that has both. If they are not equal, you will get an error when you try to build the model.
The practical limit on Sample Rate is
Below 8 kHz, the output digital filter does not seem to work, although the converter continues to work there.
Frame Size values can be between
If the specified or computed frame size exceeds
the driver will return an error during initialization.
If only one board of this type is in the target computer, enter
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
To determine the bus number and the PCI slot number, type:
tg = slrt; getPCIInfo(tg, 'installed')
Note: The use of multiple boards, at the same time and in the same model, is unsupported.