sf_eventfcn (Simulink model) | Open this Model |
Function Call Outputs
Function call outputs are used to control the activation times of other Stateflow charts or subsystems. This demonstration illustrates how a control Stateflow chart, named 'Source', determines the activation times of another Stateflow chart and also function-call subsystem. The 'Function-Call Chart' is activated after every '3' simulation time steps by the function-call signal 'out_fcn'. The 'Function-call Subsystem' is activated every 2 time steps by receiving the function call signal named 'out_fcn_two'.
Notice that in the output plots, the time distance between each sample point is 3 for the 'Function-Call Chart and 2 for the function-call subsystem. This is easier to view if you zoom into the x-axis of the plots.