The PSWTICH is processed every servo cycle, so at 2 msec SERVO_PERIOD it will be accurate to within +/- 2msecs.
HW_PSWTICH requires hardware that monitors the encoder counter. It is only possible to use on the built-in encoder of the MC664(X), the P874/P879 Flexaxis modules and other Motion Coordinators with encoder ports. The HW_PSWITCH uses a FIFO buffer in the FPGA that is loaded with On and OFF positions from the TABLE. It is accurate to the nearest encoder pulse edge +/- 2 usecs. (approximately)