Discussion:
xPC Target: error 127 'model.dll not found'
(too old to reply)
Andreas Jurack
2009-02-05 15:53:01 UTC
Permalink
Hi,

I am trying to set up the connection between an Industrial PC with xPCTarget Kernel 2.6 and my Notebook with MatLab R14SP1, xPCTarget 2.6.1 an Visual C 6.0 as Compiler (already tried WATCOM 1.4, 1.7a and 1.8 and Visual Studio 8.0 Express).
So as I followed the instructions in the help-file, I arrived a point where I dont know what to do now.
I am connecting via TCP/IP and the 'xpctest'-function is running well until the 5. test. The MatLab-prompt shows the following:

----------------------------------------------------------
### xPC Target Test Suite 2.6.1
### Host-Target interface is: TCP/IP (Ethernet)
### Test 1, Ping target system using standard ping: ... OK
### Test 2, Ping target system unsing xpctargetping: ... OK
### Test 3, Reboot target using direct call: ........ OK
### Test 4, Build and download xPC Target application using model xpcosc: ... OK
### Test 5, Check host-target communication for commands: ... FAILED
----------------------------------------------------------

After proceeding this test, the target pc textbox says:
----------------------------------------------------------
System:download started...
System:download finished
error:127
DLL model.dll not found
----------------------------------------------------------

Wha is strange to me, is that the target PC shows 'loader' as loaded application, after I perform the xpctest. Shouldn't there be 'xpc_osc' or something like that?
Then I tried to build the mentioned model 'xpc_osc' manually from Simulink. The compiling- and linking-processes goes fine without warnings or errors. But the last lines are also confusing to me:
----------------------------------------------------------
### Download Model onto Target
### create xPC Object tg

xPC Object

Connected = YES
Application = loader

### succesful completion of xPC Target build procedure for model: xpc_osc
----------------------------------------------------------

...and the Target PC has the same error from the xpctest.

When I try to run the model in simulink, by pressing the arrow-button ? get an error-prompt:

"
Error occured while executing External MEX-file 'ext_xpc'
"

I really dont have a clue what I've done wrong and I hope you can help me!
Gordon Weast
2009-02-09 18:26:31 UTC
Permalink
First of all, you're using a very old version of MATLAB and xPC Target.
A lot has changed since that release.

Back then, we could use Visual C 6.0 or Watcom 1.3, but not a newer
Watcom. There are differences that we hadn't yet built into RTW to
work with them. Trying to use an unsupported compiler for the target
build should just fail during the compile phase.

It looks like quite a bit is working since you got through test 4 ok.
However, the error message seems to be suggesting that test 4 didn't
really work and it was only caught by test 5. Test 5 is only asking
the target the name of the executable loaded on it.

The error message suggests that the build of xpcosc (no underline) didn't
work correctly.

Open up xpcosc and try to build that model with the build set to verbose.
That's a checkbox on the Real-Time Workshop->Debug page of the configuration
parameters dialog for the model. By default, verbose build should be
selected for xpcosc. Do you see any compile or link errors?

I would really like to see you using a newer version of xPC Target to
get lots of improvements.

Problems getting xPC Target set up correctly are really better handled by
contacting tech support. They will ask you to supply some setup and
configuration information so we can better understand where you're at.

Gordon Weast
xPC Target Development
The MathWorks
Post by Andreas Jurack
Hi,
I am trying to set up the connection between an Industrial PC with xPCTarget Kernel 2.6 and my Notebook with MatLab R14SP1, xPCTarget 2.6.1 an Visual C 6.0 as Compiler (already tried WATCOM 1.4, 1.7a and 1.8 and Visual Studio 8.0 Express).
So as I followed the instructions in the help-file, I arrived a point where I dont know what to do now.
----------------------------------------------------------
### xPC Target Test Suite 2.6.1
### Host-Target interface is: TCP/IP (Ethernet)
### Test 1, Ping target system using standard ping: ... OK
### Test 2, Ping target system unsing xpctargetping: ... OK
### Test 3, Reboot target using direct call: ........ OK
### Test 4, Build and download xPC Target application using model xpcosc: ... OK
### Test 5, Check host-target communication for commands: ... FAILED
----------------------------------------------------------
----------------------------------------------------------
System:download started...
System:download finished
error:127
DLL model.dll not found
----------------------------------------------------------
Wha is strange to me, is that the target PC shows 'loader' as loaded application, after I perform the xpctest. Shouldn't there be 'xpc_osc' or something like that?
----------------------------------------------------------
### Download Model onto Target
### create xPC Object tg
xPC Object
Connected = YES
Application = loader
### succesful completion of xPC Target build procedure for model: xpc_osc
----------------------------------------------------------
...and the Target PC has the same error from the xpctest.
"
Error occured while executing External MEX-file 'ext_xpc'
"
I really dont have a clue what I've done wrong and I hope you can help me!
Tom Boyle
2009-06-09 10:30:20 UTC
Permalink
Hi,

I am experiencing a similar problem, running MatlabR14SP3 with xPC Target 2.8.

When I download my model to the target, and run it, it will run for approx 2.5 seconds, and then the following error message is displayed.

Error occured while executing External MEX-file 'ext_xpc'

Further attempts to run the model or dowload the model to the target result in in the error, "target not found". xpctest completes without difficulty if it is ran on a fresh boot of the target, but if I run it after the model, it fails at steps 1 & 2.

Any help would be greatly appreciated.
Gordon Weast
2009-06-09 13:34:45 UTC
Permalink
Tom,

The ext_xpc MEX-file is the implementation of external mode. If
the target has crashed running your model, then this error will
be shown.

The real question is why is your model crashing on the target.

Without knowing exactly what's in your model, I can't answer that
question.

There are some possibilities. If you're using an embedded MATLAB
function and that function grabs a large array on the stack (temp
storage), then you might be getting a stack overflow. That would
crash the target, as you're seeing.

If you've written your own driver and you have an error, that could
also crash the target.

If you have defective data acq hardware that doesn't respond correctly,
then the target may get stuck in a loop waiting for the hardware.
That shows up as a loss of contact as well.

You need to contact tech support and describe fully what's in your
model.

This version of xPC Target is very old. If the problem doesn't show
up on a newer version, then we would strongly suggest that you upgrade.

Gordon Weast
xPC Target Development
The MathWorks
Post by Tom Boyle
Hi,
I am experiencing a similar problem, running MatlabR14SP3 with xPC Target 2.8.
When I download my model to the target, and run it, it will run for approx 2.5 seconds, and then the following error message is displayed.
Error occured while executing External MEX-file 'ext_xpc'
Further attempts to run the model or dowload the model to the target result in in the error, "target not found". xpctest completes without difficulty if it is ran on a fresh boot of the target, but if I run it after the model, it fails at steps 1 & 2.
Any help would be greatly appreciated.
Loading...