> Do these substates run in parallel or one after the other...
From the PLECS Manual:
"During each execution, the following steps are performed:
- The triggers and conditions of all transitions leaving the currently active state are evaluated.
- If a transition "fires", i.e. if both trigger and condition are true, the State Machine executes the Exit action of the current state followed by the transition action and the Enter action of the target state.
- If no transition fires, the During action of the current state is executed."
> Is there a way to find gradient of a input signal in these substates ,like "During" substate. I want to find (input(i+1)-input(i)) for each and every iteration.
> Is it possible to define a timer inside these substates.
C programming language is used for the Enter, Exit, and During actions. Therefore you have the flexibility to implement the algorithms described. Refer to the manual, especially the "State Machine Configuration" section if you want to add variables or functions accessible from multiple states.