Error using packNGo when building Simulink Real-Time model

10 views (last 30 days)
I am attempting to build a simulink real time model on a target PC with a UDP Send block inside it. I keep getting errors when I attempt to use the packNGo to package the appropriate dlls as mentioned here.
My question is why am I getting this error and how do I correctly package the necessary dll files for my real time model? Do I need to add more items to my Windows path?
Below is my process:
When attempting to originally download the model to the target machine, I received the error:
Could not open library: networkdevice.dll. ... use the packNGo function
I since added the following code when I compile my model
'packNGo(buildInfo, {''packType'' ''hierarchical''})');
It subsequently outputs:
Warning: The following error occurred while attempting to run the preprocessor to find the minimum needed set of include files:
While parsing the source file 'pathToModel\modelName.c' the following error
pathToModel\modelName.h:28: cannot open source file "xpcdatatypes.h"
| #include <xpcdatatypes.h>
And then errors on not being able to find the file named "dummy"
Error using coder.internal.PCGHook
Error encountered while executing PostCodeGenCommand for model 'modelName': File "dummy" does not exist.
  • Windows 7
  • Matlab 2017b (with associated Simulink 9)
  • Microsoft Visual C++ 2017
I have added matlab's bin path to my Windows path variable as suggested here.
Again, do I need to give more visibility to the xpcdatatypes.h file's location (it lives at C:\Program Files\MATLAB\R2017b\toolbox\rtw\targets\xpc\target\build\xpcblocks\include\xpcdatatypes.h)?
Is there any other step that I need to do before building the model?

Answers (1)

bing li
bing li on 17 Oct 2018
Have you solve this problem?I got the same one.


Find more on Troubleshooting in Simulink Real-Time in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!