| xPC Target | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Audio-PMC+ Analog Output block
xPC Target Library for Bittware
This is a vector of channels. Specifies the output channels that the block works on. For example, to use the first, third, and fifth analog output channels, enter
[1,3,5]
These three parameters are not independent but are related by:
![]()
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 -1. 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 Rate as -1. It is computed to be 64000 Hz.
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 using the PWM0 output from the first 21065L SHARC DSP chip. The base clock that effects this output is the 60 MHz CPU clock for sample rates between 100 KHz and 20 KHz and 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 1 and 256. If the specified or computed frame size exceeds 256, the driver will return an error during initialization.
If only one board of this type is in the target PC, enter
-1
to automatically locate the board.
If two or more boards of this type are in the target PC, 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
getxpcpci
Note The use of multiple boards, at the same time and in the same model, is unsupported. |
Running Models with BittWare Blocks
| Bittware Audio-PMC+ Analog Input | BVM | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments