IPC READ | "Structures do not match" - Error after renaming Bus Elements (R2024b)

13 visualizaciones (últimos 30 días)
David
David el 11 de Nov. de 2025 a las 16:03
Comentada: David el 13 de Nov. de 2025 a las 9:39
Hello,
I have the following Problem:
I have two seperate models CPU1_harness and CPU2_harness. Both use the dictionary COMMON_BUS_DEF.sldd.
I changed the names of some elements in one bus as follows:
Before:
- BUS_TOP_LVL
-- BUS_CELL_TMP_MOD_01 (DataType: BUS_SUB_LVL)
-- BUS_CELL_TMP_MOD_02 (DataType: BUS_SUB_LVL)
-- BUS_CELL_TMP_MOD_03 (DataType: BUS_SUB_LVL)
After:
- BUS_TOP_LVL
-- BUS_CELL_TMP_MEAS_MOD_01 (DataType: BUS_SUB_LVL)
-- BUS_CELL_TMP_MEAS_MOD_01 (DataType: BUS_SUB_LVL)
-- BUS_CELL_TMP_MEAS_MOD_01 (DataType: BUS_SUB_LVL)
I use "Interprocess Data Write" on CPU1_harness to send the BUS_TOP_LVL data to CPU2_harness where
"Interprocess Data Read" is used. On the "Interprocess Data Read" Block the "DataType" is set to the bus-type (BUS_TOP_LVL).
After I renamed the elements I can still build CPU1_harness, but get the following error for building
CPU2_harness:
Simulink detected an error 'Structures do not match. Field name 'BUS_CELL_TMP_MEAS_MOD_01' in position 1 of the struct to the left does not match field name 'BUS_CELL_TMP_MOD_01' of the struct to the right.'. The error occurred for MATLAB System block 'CPU2_harness/CELL_TEMP_MEAS/Variant/CODEGEN/IPC Read'. To prevent this error, modify the System object to avoid code that does not support code generation.
If I search the CPU2_harness for the old name I get no matches for the search.
Kind regards, David!
  1 comentario
David
David el 13 de Nov. de 2025 a las 9:39
Addition: I was able to fix the problem. Why did the build work before the renaming? The model was originally created in R2023a and later migrated to R2024b. In R2023a, using custom-defined buses for the IPC Read Block worked only when the buses from the data dictionary were copied into the base workspace.
How did I fix the problem?
I copied all IPC Read Blocks used in the R2024b model into a separate model and exported it to R2023a. Then, I set up the dictionary and hardware settings for the R2023a model. After that, I copied the bus definitions to the base workspace and built the model in R2023a. Next, I opened the built model in R2024b and copied the prebuilt blocks into my main R2024b model. After these steps, the build worked again.
Unfortunately, I have not found a way to use my own bus definitions directly in R2024b.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Messages en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by