The attached program calculates the commutation offset for an absolute encoder.

AbsoluteEncoderOffsetCalc.pgm

The current process outlined in the A3200 help file requires the user to rotate or move the axis to the absolute feedback position of zero using MSET commands. This process can take a long time to complete. The attached program applies an MSET angle of 0 electrical degrees and uses the current position in counts, the CountsPerRev and CyclesPerRev to determine the distance from the zero absolute position to the current 0 mset angle. 

A modulo of the electrical cycle is applied and the remainder is the distance (in electrical cycles) from absolute zero to the first instance of zero electrical angle. Since the commutation offset is the electrical angle at the absolute zero position, this distance is subtracted from 360 degrees to arrive at the commutation offset angle.