Error:Subsystem Extraction Failed. Changing property 'MaxIdLength' is not allowed

2 vues (au cours des 30 derniers jours)
Hamed
Hamed le 30 Juil 2023
Hello
With PLC coder, I want to convert the simulik to the code usable in PLC but I face this error when I want to generate the code.
Error:Subsystem Extraction Failed. Changing property 'MaxIdLength' is not allowed
Please let me know how can I solve this.

Réponses (1)

Mahaveer Satra
Mahaveer Satra le 10 Avr 2024
Hi Hamed,
The name length limit is a bit complex due to the target IDEs variations and different limits by each IDE. This may cause the generated code names to shorten.
This workflow can be used to overcome this:
  1. enable the "Override target default maximum identifier length" option to edit the "Maximum identifier length" text box
  2. if the length is set to <31, it throws the following error:Error using plc_builder (line 49)Invalid length specified for PLC Coder identifiers (see the 'PLC Code Generation -> Identifiers' pane of theConfiguration Parameters dialog). Identifier length must be greater than or equal to 31.Error in plcgeneratecode (line 20) codegenFiles = plc_builder('generate_plc_code',subsystemH, true, true);
  3. if the length >=31, including 255, it can generate code OK. Ideally you would want to match this value to the limitation of the IDE code limit, which you can check from the code generation identifier default max length.

Catégories

En savoir plus sur Simulink PLC Coder dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by