As has been raised in this discussion, the square waveform generation gives a few off-by-one results that are unexpected. The problem still occurs in 2021 beta.
I understand that there can be problems quantizing a duty cycle to a fixed number of data points, but if there is an exact solution as in this case (100 points, 0..100% duty cycle), it should work more smoothly. Since the inner code is a dll, we cannot really tell what's going on or if there is a tiny bug due to possibly floating point approximations that could be fixed eventually.
See attached for a demo VI. This is not a new issue.