Can I see a history of each state in a given statechart that I've been in over time?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by Joe on Tue, 03/13/2012 - 00:18 

I am debugging a state chart and I'd like to see a history of states that I've been in over time.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Joe on Tue, 03/13/2012 - 00:44.

    A plot would be nice

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by pete on Tue, 03/13/2012 - 09:53.

    Yes, in the data browser for the statechart (get there via ctrl+right click on the statechart block), click on the 'add variable' icon in the upper right corner, double click the type field, select State ID in the drop down. An output pin will appear on the statechart block, and you can connect it to a plot or send it to an export block for later playback. The state ID will have a numeric value, and you can connect it to a convert ID block to convert it to a string you can show in a display block. The numeric values are the same whether you are simulating or executing the state chart on an embedded system.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Submitted by a_a on Tue, 03/13/2012 - 21:17.

    You can connect the 'State Id' pin to a plot. State Id is just a numeric value.

    Unable to find an attachment - read this blog