The pulley ratios changes don't take effect right away they lag behind "one M215 CALL".
It will apply the Previous selected Pulley ratio even from the previous G code run and the program restarted from the top.
So the work-around kludge for this issue is to call M215 twice in a row:
M215 P2
M215 P2 (THEN IT "~WORKS")
Encoder pulses AND index are on spindle Version 1.2047
Because of this lag I also tried putting a "dummy instruction" (G55 when already in G55) after the M215 Px...to see if that got through the instruction delay, no difference.
reference:
P1 ratio is 1:1 so expected pitch movement is 0.051"
P2 ratio is 1:1.35 so expected pitch movement is 0.0389"
P3 ratio is 1:1 so expected pitch movement is 0.0255"
Confirmed by running this test code, and turn spindle by hand 1 revolution and measure pitch movement with indicator;
---------- G COde -----------------------
G80 (the G80's are not necessary It made no difference with or without)
M1
M215 P1
G33 X-.06 K.051 <--------moves X 0.0389"" ****What happens is it applies the LAST/Previous Px (P2) value that was last run...even after a Reset
G80
M1
M215 P2
G33 X-.12 K.051 <--------moves X .051" (its applying previous P1 ratio) , for Pulley 2 it SHOULD be 0.0389" movement
G80
M1
M215 P3
G33 X-.18 K.051 <--------moves X 0.0389" (so it's on P2 NOT P#3 ) it's one step behind
G80
M1
M215 P2
G33 X-.24 K.051 <--------moves X 0.025" (so it's on P3 NOT P#2` ) it's one step behind
G80
M1
M215 P2
G33 X-.30 K.051 <--------moves X 0.0389" SEEMS "correct" because the one BEFORE was also P2 !!! it's actually 1 behind
NOTE: if the program is run again it will apply THIS P2 value not the one first specified!!!!