How to find the license dependency of a Simulink model?

42 Ansichten (letzte 30 Tage)
sabriozer33
sabriozer33 am 22 Jan. 2024
Kommentiert: sabriozer33 am 24 Jan. 2024
Hi,
I have created a model using Matlab R2021b, which we have tried to use on a second PC. When we update model on the second PC, we got the error 'use of this data type requires a Fixed-Point Designer license'. We have solved the issue via changing the license, but now we want to figure out, which blocks need which the license. I have tried the 'Dependency Analyzer' on Simulink, but it gives the software dependency and not the license dependency and it doesn't list the Fixed-Point Designer anywhere. I saw 'The Dependency Analyzer is unable to detect blocksets that do not introduce dependencies on any files, such as Fixed-Point Designer™. To include dependencies that the analysis cannot detect, add the file that introduces the dependency to your project. To create a project from your model, see Create a Project from a Model.' on https://de.mathworks.com/help/simulink/ug/scope-and-limitations.html#mw_6e26dad9-2eb7-449e-9327-2d00486af440 and created a project, but it also didn't showed the licenses needed.
Is it possible on Matlab to generate a report to get, which licenses are needed to compile the model?
Thanks in advance

Akzeptierte Antwort

Andy Bartlett
Andy Bartlett am 22 Jan. 2024
Bearbeitet: Andy Bartlett am 22 Jan. 2024
Hi,
Some products require licenses based on what Simulink modeling elements are used.
Other products require licenses based on how modeling elements are used or what action is performed.
As an example, a requirement for a Fixed-Point Designer license is expected whenever a fixed-point data type is used. Lot's of modeling elements support fixed-point types including nearly all the basic Simulink blocks like addition and multiply.
Probably, the simplest way to determine license dependencies is to use license('inuse') and conduct some before and after experiments.
Load a fresh MATLAB session.
Run
license('inuse')
should initially just list
matlab
Load the simulink model of interest. Perform actions of interested on the model such as simulation, code generation, etc.
Now, again, run
license('inuse')
This will list the licenses that were used by the model, the various actions you performed on the model, or anything else you did during the current MATLAB session that required a license.
I'm not aware of a general and comprehensive way to map the license used back to the specific action or specific modeling element.
  1 Kommentar
sabriozer33
sabriozer33 am 24 Jan. 2024
thanks for advice, now we now at least which licenses are needed for future use.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Hassaan
Hassaan am 22 Jan. 2024
  1. Identify Fixed-Point Capable Blocks: Go through your Simulink model and identify blocks that have fixed-point settings. These are typically blocks from the DSP System Toolbox or blocks that explicitly mention fixed-point support in their documentation.
  2. Check Block Documentation: For each block that supports fixed-point, check the MATLAB documentation to see if it mentions the need for a Fixed-Point Designer license.
  3. Isolate and Test Blocks: Isolate blocks that you suspect might require Fixed-Point Designer and try to simulate them in a separate model without the Fixed-Point Designer license (e.g., on a machine without that license).
  4. Use save_system and load_system Functions: Save your system and then load it using load_system function on a machine without Fixed-Point Designer license. Try to compile the model. If it fails due to a missing license, it's likely that some blocks require Fixed-Point Designer.
  5. Contact MathWorks Support: If you are unable to determine the dependency through documentation or testing, MathWorks Support can often provide a definitive answer.
  6. Trial and Error: As a last resort, on the second PC (where the license is not installed), try to simulate the model and observe which blocks throw errors related to the lack of a Fixed-Point Designer license.
  7. License Check Script: Write a script to programmatically check each block for fixed-point settings by accessing block parameters through MATLAB commands. This approach requires in-depth knowledge of Simulink APIs.
Remember that certain blocks might not need a Fixed-Point Designer license just for simulation purposes but may require it for code generation or when specific options are enabled. Always check the latest documentation for the version of MATLAB you are using, as license requirements can change between versions.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  2 Kommentare
sabriozer33
sabriozer33 am 22 Jan. 2024
Hi Mohammad,
thanks for the reply. Your suggestions mostly requires manually checking the blocks or their documentations, which might be time consuming, I assume. Only the seventh option is something automated. I will check this option later. I was looking for a solution from Matlab like the Dependency Analyzer, but there is no such easy to use solutions for this case I assume :(.
Thanks for the suggestion regarding script :)
Hassaan
Hassaan am 22 Jan. 2024
@sabriozer33 You are welcome.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by