Added the repetitive stuff for the pulse test itself to a function that gets
called with the necessary parameters. Then, some small changes were made to the
pulse test (like clearing the counters before enabling the pulse repetition) to
make the pulse test work.
It now almost works, but we're still not there yet, to be determined if this is
a hardware issue or still script problems (most likely the former).
The pulse test should also have better output (like tell on ERROR on which phase