Why have some bus signals wrong datatypes?

17 vues (au cours des 30 derniers jours)
Pascal Knappe
Pascal Knappe le 1 Avr 2020
Commenté : Jorge Castillo le 30 Juil 2024
Hello,
I have the problem that at the inport and outports of some bus creators/selectors there are wrong datatypes (and though the model is not compileable). I get the following error message:
Data type mismatch. Input port 1 of '<BusCreator>' expects a signal of data type 'single'. However, it is driven by a signal of data type 'double'.
and
Data type mismatch. Output port 1 of '<Subsystem>' is a signal of data type 'double'. However, it is driving a signal of data type 'single'.
As you can see e.g. the output datatype of the top signal ("DrvResis_fVehMEstimNum") is double but the input datatype to the bus creator is single.
But the datatype of the input to other subsystems is also double.
So how can this be? Shouldn't the datatype be fixed through the inputs/outputs of the subsystems?
Thank you very much in advance.

Réponses (1)

Mark McBroom
Mark McBroom le 4 Avr 2020
Did you specify a Simulink Bus in the Bus Creator dialog? If so, then the signals feeding the bus creator must match the types defined in the Simulink Bus.
  2 commentaires
Pascal Knappe
Pascal Knappe le 6 Avr 2020
Hello Mark,
thanks for your answer. Do you mean wheter I use a Bus Signal Object to specify data types? If yes: I do not do so. And I do not set them in the properties window.
Jorge Castillo
Jorge Castillo le 30 Juil 2024
Hello Pascal,
Have you get any answer from Mathworks regarding this topic?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Load Signal Data for Simulation dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by