MATLAB: Does the PCI-DAS 1200 board give me an output voltage which is offset by a small value in xPC Target 2.7.2 (R14SP2)

1200aboardbydasdriftdriverlittleoffSimulink Real-Timevoltagexpc

I am using a Computing Boards PCI-DAS 1200 board in xPC Target, but the output of my model and the physical output of my board are always 100-200 mV off. For example, my model outputs 5V, but when I measure the output, it is 5.18V.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
There is a bug in xPC Target 2.7.2 (R14SP2) in the way that the PCI-DAS 1200 board driver outputs voltage. To work around this issue, download the attached version of the files. Here are the required steps:
1. Quit MATLAB
2. Rename the following files:
$MATLAB\toolbox\rtw\targets\xpc\target\build\xpcblocks\dacbpcidas.c
$MATLAB\toolbox\rtw\targets\xpc\target\build\xpcblocks\dacbpcidas.dll
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)
Rename the files to dacbpcidas.c.old and dacbpcidas.dll.old
3. Download the attached file. Place the new file in the same directory mentioned in step 2 and unzip it.
4. Restart MATLAB
5. After restarting MATLAB, issue the following command at the MATLAB prompt:
rehash toolboxcache