Unable to Enumerated data with Chart in simulink

1 vue (au cours des 30 derniers jours)
Claude Porlier
Claude Porlier le 30 Oct 2014
I have defined my class as shown below.
classdef(Enumeration) TrafficColors < Simulink.IntEnumType
enumeration
RED(0)
GREEN(10)
end
end
I am trying to use this in my chart in simulink, but I am not able to compile the code.
I am trying to assign a value to the variable defined in my chart with class at TrafficColor.
I have attached the copy of my code here.
Please advise.

Réponses (1)

Arunkumar M
Arunkumar M le 13 Nov 2018
Try defining enumerated datatype in model workspace.
Then in stateflow, for the input, assign the datatype as this enumerated datatype.Now you will be able to use the enumerations.

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by