This blocks generates events at specific sample time of the simulation time. The sample time is given in the "Sample Time" field and the offset is given in the "Offset" field. This block has one event input, the number of event outputs depends on the number of different sample times. For example if the vector of sample times is [1 1 2] and the vector of offset is [0 .5 0] then the block has 7 outputs.
- The first output is activated when the simulation time is equal to a multiple of the first sample time plus the first offset
- The second output is activated when the simulation time is equal to a multiple of the second sample time plus the second offset.
- The third output is activated when we have both cases, first case and second case.
- The fourth output is activated when the simulation time is equal to a multiple of the third sample time plus the third offset.
- The fifth output is activated when we have both cases, first case and forth case.
- The sixth output is activated when we have both cases, second case and fourth case.
- The seventh output is activated when we have both cases, third case and forth case.
etc...
So the number of outputs is equal to 2**number of different time values. Each of these time values is represented by a binary number associated to the output's number in decimal.
Let us take the example where the sample time is equal to [1 1 2] and the offset is equal to [0 .5 0]. Consider t=simulation time. When t=0, the fifth output is activated (001 + 100). When t=0.5, the second output is activated (010). When t=1, the first output is activated (001). When t=1.5, the second output is activated (010). When t=2 we loop back to 0.