Why do I run into issues using XPCTARGET.XPC.GETSIGNAL with less than 1000 indices in xPC Target 5.2 (R2012a)?

1 view (last 30 days)
I have recently upgraded to xPC Target 5.2 (R2012a) 64-bit from xPC Target 5.1 (R2011b) 32-bit and code that used to work for me is now producing an error. In the model, I have a uint8 vector (size 1019) in a named signal that is pulled into MATLAB using xpctarget.xpc.getsignal().
The documentation for this method shows that there is a limit of 1000 signal indices that can be accessed. As a consequence, I had previously divided this signal into two smaller vectors of sizes 792 and 227. This worked fine in extracting the data.
After upgrading to xPC Target 5.2 (R2012a), attempting to retrieve the 792-long vector fails with the following error message:
Error using getsignal (line 55)
Message: Arithmetic operation resulted in an overflow.
Source: xPCFramework
HelpLink:
Retrieving the 227-long vector worked fine. Additionally, if I split the vector into 3 smaller chunks (sized 340, 340 and 339) as this also works without any issues.
Why does this occur only in the latest version? What defines any limitations on xpctarget.xpc.GETSIGNAL?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Dec 2012
This bug has been fixed in Release 2012b (R2012b). For previous product releases, read below for any possible workarounds:
This is a bug in xPC Target 5.2 (R2012a). Starting with this release, support was added for using the GETSIGNAL method with over 1000 indices. As a result, this caused an issue with smaller numbers of indices.
In order to resolve this, please download the ZIP file containing the fixed “xPCFramework.dll”. The attached Fixed DLL should be copied to the MATLAB installation folders included below replacing the original file:
$MATLABROOT\toolbox\rtw\targets\xpc\xpc\private
$MATLABROOT\toolbox\rtw\targets\xpc\xpc\private\x64 (or x86)
$MATLABROOT\toolbox\rtw\targets\xpc\api
Here, $MATLABROOT refers to your MATLAB installation directory which can be found by typing the following at the MATLAB Command Window:
matlabroot
NOTE: Make sure MATLAB is completely closed while replacing the original files. When you restart MATLAB, please type in the following command to update the changes made to the MATLAB installation folders.
rehash toolboxcache

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!