MATLAB: “State active is clashing with the default value” when monitoring state activity through active state data

simulink

I am trying to use a custom enumeration to monitor the active state and output from a Stateflow chart.
I am seeing an error after successfully compiling the model:
In 'StateflowChart', the enumeration value used to indicate that state 'State0', is active is clashing with the default value, which is reserved to indicate that no substate is active.
Why am I seeing this error?

Best Answer

The default value for the enumeration was set to be the initial state in the Stateflow chart. The default value for the enumeration can not be the same as one of the states.