To generate a pulse signal each time an entity passes through the top path, an Entity Server combined with a Difference block can be utilized. Here's how it can be set up:
In the model, I have introduced a temporary Entity Server named "Dummy Server." Set its Service time to 0 and its Capacity to a very high value.
In the Statistics tab, ensure the "Number of entities departed, d" checkbox is selected. The output signal 'd' will be a step-type signal that increases by one unit each time an entity leaves the "Dummy Server."
To obtain a pulse-type signal, pass this signal through a Difference block, as depicted in the setup.
You can read more about the two blocks using the following commands:
Entity Server
web(fullfile(docroot, 'simevents/ref/entityserver.html#d123e23441'))
Difference
web(fullfile(docroot, 'simulink/slref/difference.html'))