By the way...in this wiring diagram I suppose that your Rotary Encode is NPN output (If not --- PNP--- M (0V) must be connected to 1M.... that`s right?)
@@EASYPLCTRAINING can we do like this - "Since pulses are DInt format, after counter finishes counting until 2147483647, then can i move "1" to ID1000 directly, so that the cycle repeats?