MATLAB: Do I receive an error when I attempt to use multiple PCI-CTR05 boards with xPC Target

05boardscomputingctrerrormctr05checksmeasurementmoremultipleonepcipci-ctr05Simulink Real-Timetargetthanxpc

I am using more than one PCI-CTR05 board in my Simulink model. When I build code for xPC Target, I receive the following error:
Error executing build command: Error using ==> make_rtw
Error using ==> tlc_c
Error using ==> rtwgen
--> Error evaluating 'InitFcn' callback of PWM block (mask) 'PCI-CTR05
--> '.
Error using ==> mctr05checks
Counter 1 on the board in slot [2 10] is also in use in another PCI-CTR05 block.
--> Error evaluating 'InitFcn' callback of PWM block (mask) 'PCI-CTR05
--> 1'.
Error using ==> mctr05checks
Counter 1 on the board in slot [2 9] is also in use in another PCI-CTR05 block.

Best Answer

This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in xPC Target in the way that an xPC check function handles multiple PCI-CTR05 boards.
Currently, to work around this issue, try the following:
1. Edit the mctr05checks.m file
edit mctr05checks
2. Comment out the following lines in this file, and save it.
if nblocks > 1
error(['Counter ',counter, ' on the board in slot ', slot,...
' is also in use in another PCI-CTR05 block']);
end
3. Restart MATLAB
4. After restarting MATLAB, issue the following command at the MATLAB prompt:
rehash toolboxcache