I made an example. Hope this helps you.
I assume length:width = 3:2. Divide the perimeter into 100 pieces, 40 for width, 60 for length. Use a counter to count the pulse. The counter resets at 100. Then, use an expression to calculate the X and Y.
Ryan Shi
National Instruments