Hi to all, in a model I'm creating a table in the trigger OnStateChange of a processor where I record some data when the state change. I'm using this code
TrackedVariable tvProfile= objCurrent.stats.state();
string categoryNameFrom = tvProfile.getCategoryName(fromState);
string categoryNameTo = tvProfile.getCategoryName(toState);
to read the category name from the profile, but I have this exception when the state STATE_ON_BREAK appears as first time.
exception: FlexScript exception: Tracked Variable method 'getCategoryName' at /MEK/proc-1>stats/state_current: invalid category number.
I skip this exception with a check of the value of the state, but I continue to have the same exception as soon as I add a chart in a dashboard where I collect data from the objCurrent.
I see that when I add a processor to the model it starts with only 22 states in the profile. Is it possible to expand the profile with all available states and in which way?
Attached you find a simple model with the error. modelLight.fsm
ThanksmodelLight.fsm