So after some experimentation, here's a solution that seems to be working for me.
The chart:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/913989/image.jpeg)
This lives inside the following subsystem:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/913994/image.jpeg)
The FunctionCall input comes from the customer block that generates occasional function calls. The 1ms function call has a sample time of 0.001. These are muxed to the input events of the chart as E and M1 respectively.
Within the chart, the function call E will transition from Low state to High state and set y=1; Then, after 2 instances of the M1 event, we transition back to low and set y=0.
It does seem odd that I need to wait for 2 instances of M1, rather than just having the transition as M1 - but given that E and M1 will both occur at the same time (generally, E is at a microsecond boundary), without the after(2, M1) transition, I could see the state transitions happening by using debug breakpoints and stepping, but they were both occurring at the same time step thus the pulses were 0 time in width.
With the above chart, I can see (via a Scope of the value of y) that I'm getting y pulses with width 1ms, and they start at the same time as E.
If someone has any better solutions, please feel free to submit them too!