Error in server block that is connected to entity generator containing bus elements.

6 Ansichten (letzte 30 Tage)
Dear Matlab Experts,
I am having troubles with my model, right now I have designed a model to emulate a single part that goes through operations and maintenance procedures. I am utilizing bus elements in an entity generator, however upon initializing them (file initialize.m) and importing the file directly (file BusProfile.mat), and setting an initial value for each element used in the entity generator tab event actions, I am still encountering this error:
Error in 'ModelV1/LoadStress' block. See Service complete action line 15, column 9.
Caused by: This structure does not have a field 'Missions'; new fields cannot be added when structure has been read or used.
Component:Simulink | Category:Block error
And this error persists for every element that is listed. Any ideas why this happens? I have checked everything up to looking for typos and I am unable to see what is the problem.
Thank you in advance.

Akzeptierte Antwort

Laurent Royer
Laurent Royer am 16 Jul. 2024
Hi Aaron,
From what I can see in the Part Generator, in tab "Entity type", your entities are typed with the bus definition "Part" alone. So your entities only have the elements Nf, Nj and crackLength. If you expected your entities to also have the elements of the other buses stored in your matfile, you should define a new envelop bus that contains all the other buses as sub-elements, like the bus "Main" in the screenshot below:
From there, in the Part Generator block, you'd select the entity type "Main".
Hope it helps
  1 Kommentar
Aaron Bramhasta
Aaron Bramhasta am 17 Jul. 2024
Hi Laurent,
Thank you for your answer, much appreciated.
All clear and everything is working from my side thanks to your solution.
Have a great day!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by