Above in this threat, people have commented that the Siglent SDG1032X has special hardware for better square waves. Great, even if it is just a sufficiently fast port after the wave generator, if it works, it works.
I thought I may validate that by comparing its square wave output with the output of the arbitrary (Arb) patterns with also have something resembling a square wave – assuming the Arb mode does not engage that special hardware. Indeed, my measurements (table below) confirm that the regular square wave produces results much shorter rise times. All good.
A surprise comes, however, when measuring the Siglent SDG2042X. Here, I expected to find similar performance for square wave and Arb modes, as there is apparently no such special circuit. But the Arb pattern output is much better than the square wave output.
This seems to suggest that of you need square waves from the SDG2042X, then not to use the square wave function, but ARB Square Duty50 instead. (At least up to the 6MHz that is supported for Arb).