RTTarget-32 CPU Exception: 000E Error code: 0004

21 views (last 30 days)
Hardware setup: I am using a Quatech ESC-100 card to read in serial data from several encoder boards.
Software setup: I'm running a SIMULINK model via xpctarget, using the Quatech ESC-100F block.
This setup has been working in 2011a but we're trying to upgrade to 2013b.
When I run in 2013b without the encoder boards powered on (no data to the Quatech card), I get no errors. However, when I run with the encoder boards powered on and sending data, I get the following error:
RTTarget-32 CPU Exception: 000E Error code: 0004
EAX= ...
ESP= ...
DS= ...
CS ...
Code: 8B 41 08 2B 41 04 89 55 FC 79 02 03 C7 8B F7 2B F0
(I didn't include the middle lines because I figure they are not relevant -- I can type them up if they are useful)
I did a google search and came up with the RTTarget-32 CPU Exception code: http://www.on-time.com/rtos-32-docs/rttarget-32/reference-manual/system-functions/rtraisecpuexception.htm
RTRaiseCPUException(4); // INTO Overflow
What does this mean? Where exactly is the data overflow happening? Why does this happen in 2013b but not in 2011a? Is there anything I can do to fix this issue?
Thanks!

Accepted Answer

Jessica Austin
Jessica Austin on 15 Jul 2014
Answering my own question: I talked to MATLAB support about this, and I thought I'd post here in case other people had the same issue.
At first they thought that one possible cause might be insufficient stack size on the model thread. They suggested running the following command in MATLAB before compiling the model and then running it:
>>set_param(gcs, TLCOptions, -axPCModelStackSizeKB=512)
This command allocates 512 KB stack size for the model thread.
After I did this, I got a different error:
RTTarget-32 CPU Exception: 0010 0.000000
Apparently this was due to a bug in MATLAB 2013b, so they sent me a patch fix the issue. If you're seeing the same thing, you should probably file a support ticket because you might be running into the same thing.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!