Generated Code only works with one CAN Vector Box before R2019b

I am generating code which successfully runs on the CAN Vector Box for which I generated it. However, when I unplug this Box and plug in a second Box (same hardware model, same configuration), the code will not run.

 Accepted Answer

It is not possible to generate code that can work on multiple CAN Vector Boxes before R2019b. Support for this functionality has been added in R2019b, which you can see at the following link:
I encourage you to upgrade to R2019b. If that is not possible, then as a workaround you will have to generate code for each device separately. Unfortunately, there is not really a way for you to modify the code generation process or the generated code itself to make the code work on multiple boxes.
In R2019b and later, code generated for one Vector box should work on others of the same model by default. You do not need to configure the model to take advantage of this functionality.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Release

R2016b

Community Treasure Hunt

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

Start Hunting!