MATLAB: How to make the A/D and D/A UEI (United Electronic Industries) boards run at their data-sheet speed with xPC Target

analog to digitalboardcardcardsdigital-to-analogfrequenciesfrequencyperformanceSimulink Real-Timespeed

I want my A/D and D/A UEI boards to run as fast as the manufacturer spec allows when I use xPC Target. The boards' spec shows that they should be able to run at more than 100 KHz, however, I am unable to use them at a frequency greater than 20 KHz.

Best Answer

The UEI boards have a processor on their board. The Task Execution Time (TET) that is achievable depends on the round trip response time to communicate with that processor.
In general, it is very hard to get the sample time down below roughly 25 microseconds without taking extreme measures. This holds on all processor speeds. A faster processor takes about the same amount of time to begin executing an interrupt service routine as a slower processor would take.
Faster processors could have much longer execution pipeline that needs to be filled and decoded before interrupt execution can start. Slower processors might have a much shorter pipeline, so it gets to the interrupt service routine after fewer clocks, even though those clocks are slower.
For very simple models, it is possible to get the minimum sample time down to 10 microseconds. This only works if you turn off TET logging. Logging the TET takes 5-10 microseconds that isn't counted in the measured TET. This also depends on the BIOS being extremely "clean" in the sense that there are no System Management Interrupts that it is servicing.
For larger models with longer TET, the Pentium 4 definitely outperforms the Pentium II but this only takes hold for TETs above 20 or 30 microseconds.
The execution time for A/D and D/A with these boards will depend somewhat on the processor environment as well as the PCI chipset and all the hardware around them. The timing that you are seeing is probably a reflection of this reality. Getting above 20 KHz is very hard with any real model.