Signal name must resolve to Simulink signal object error

32 Ansichten (letzte 30 Tage)
Sidharth
Sidharth am 27 Mär. 2024
Beantwortet: Fangjun Jiang am 27 Mär. 2024
I get the following error,
Outport block 'A' requires an explicit signal buffer to ensure correct initialization of subsystem 'B' output port 1. However, Simulink will not be able to associate a non-auto storage class from the source block 'C' output port 1 with such a buffer. One or more of the following reasons necessitates the buffer: (1) Outport is driven by a block with non-overwritable output such as a Ground, Constant, or a Stateflow block; (2) Outport is connected to an input of a Merge block; or (3) Outport shares the same signal source with another Outport nested within the current subsystem but having an explicit initial output value of its own; or (4) Outport shares the same signal source with another Outport in the same subsystem having an explicit initial output value of its own. For any of these reasons, consider inserting a Signal Conversion block before the Outport block and moving the storage class specification to the output of this inserted block. Alternatively, for reason (4), consider modifying the model to pass the signal with non-auto storage class through a separate Outport.
When I uncheck the 'Signal name must resolve to Simulink signal object' for the signal SC_*** the error goes away. How can I fix this error ?

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 27 Mär. 2024
  1. uncheck the 'Signal name must resolve to Simulink signal object' for the signal SC_*** the error goes away, like you did.
  2. Set SC_Signal.CoderInfo.StorageClass to be 'Auto'.
There are other ways like those mentioned in the message. It depends on the need.
SC_Signal=Simulink.Signal
SC_Signal =
Signal with properties: CoderInfo: [1×1 Simulink.CoderInfo] Description: '' DataType: 'auto' Min: [] Max: [] Unit: '' Dimensions: -1 DimensionsMode: 'auto' Complexity: 'auto' SampleTime: -1 InitialValue: ''
SC_Signal.CoderInfo.StorageClass
ans = 'Auto'

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by