Delaying an enumerated signal

11 views (last 30 days)
Michael Joslin
Michael Joslin on 28 Jul 2011
Commented: ICT on 13 Sep 2024
I have a model that is sending out signals on a certain schedule. There are several merge blocks that combine some of my signals, however I have two signals that are arriving at the merge block at the same time. One needs to be delayed but I cannot simply put in a unit delay because they are enumerated signals. I get the following error:
'rpMDL/Behavioral Models/BCCR_EREV_Container/BCCR_EREV/MngBCCR_BatChargCntrl/MngBCCR_CntrlBatChargProcess/Unit Delay' cannot convert parameter X0 from data type 'double' to data type 'TeBCCR_e_ChrgSysMd' because conversion of parameters with enumerated data types is not supported
Is there a way to delay an enumeration signal without to add in some data type conversions?

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 28 Jul 2011
What have you entered as the Initial Conditions value on the block? If it is the default of '0', you need to change that to an enumerated value.
  2 Comments
Michael Joslin
Michael Joslin on 28 Jul 2011
Aha! That works, thank you!
ICT
ICT on 13 Sep 2024
For me, this does not work. Are there any other solutions?
I keep getting this error:
Data type mismatch. 'Input Port 1' of '<model>/Unit Delay2' expects a signal of data type 'double'. However, it is driven by a signal of data type 'MyEnum'.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!