Hi, and thank you both for your answers! Much appreciated!
I wanted to mention also in my first post that the INTEG function / level is something that I already tried, but the steps do not eventually reach the pulse peaks, as shown in the attached figure. It seems that the pulse duration is so small (0 in this case) that the level does not have enough time to accumulate, at least this is how I understand it. Unless this is a Timestep issue (I am using 0.0625, but I also tried with other options without success) or something else.
The QUANTUM function is indeed a great alternative, thank you for the suggestion!

Although I would like to understand why the INTEG function is not working in this case.