Error: File: C:\VeriSta​nd\2020\Mo​delInterfa​ce\tmw\cod​egen\NiBus​Lib.tlc Line: 134 Column: 17 The left-hand side of a . operator must be a valid scope identifier

18 views (last 30 days)
Hi all,
I am interfacing NI Veristand and NI linux RT with matlab 2020a. When i develop a model in simulink and build the model, it is giving following error.
"Error: File: C:\VeriStand\2020\ModelInterface\tmw\codegen\NiBusLib.tlc Line: 134 Column: 17 The left-hand side of a . operator must be a valid scope identifier"
please give a solution.
Thank you.

Answers (1)

Shuba Nandini
Shuba Nandini on 11 Nov 2024 at 8:24
It seems like you are encountering an error "The left-hand side of a . operator must be a valid scope identifier" while you are building a model in Simulink.
This error may occur because MATLAB is referencing auto-generated files from a previous build of the same model in the working directory.
Kindly follow the below workarounds to troubleshoot the issue:
  • Clear Old Generated Files: The files may not be deleted or regenerated after modifications in the test harness configurations, leading to conflicts. To resolve this, manually delete all auto-generated files in the working directory before attempting a new build. This will force MATLAB to regenerate files from scratch, eliminating the potential for conflicts.
  • Create a New Model if Corruption is Suspected: If the model built successfully before but is now encountering errors, the issue may stem from model corruption. In this case, copy the contents of the top-level model into a new model file, reconfigure the Model Configuration Parameters, and attempt to build again. This step can help bypass issues introduced by model corruption.
  • Confirm the Correct System Target File is Selected: If the 'ASAP2 interface' option is checked, same error may arise. To resolve this, ensure the System Target File is set to grt.tlc or ert.tlc rather than Autosar.tlc.
I hope the above provided workarounds will resolve the issue!

Categories

Find more on Simulink Coder 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!