Screw Comp, The Easy Way? (Macro question)
Posted: Fri Dec 29, 2023 1:03 am
I was inspired by Uwe to finally get my scales finished up so that I could run a screw comp... I have already mapped the X screw, but am unhappy with it and want to do some testing of the mapping itself (map it at different speeds/distances and what not).
I made a cable to connect the read head of the X scale to the encoder port on my Acorn, set axis 5 to M and set the turns/rev and rev/in properly. Worked flawlessly, now the "M" axis reads the "actual" position of the X axis from the read head on the scale.
Next wrote I a program that utilized M124 to wire the /X/M axis to a file... this is where things got hung up... The below program works fine, simply let it run until it hits a travel error and then change the "G0X-0.5" to "G0X0.5". The values printed out in the file line up nicely.
(G59 WCS SET TO 0,0,0 OR IN OTHER WORDS, SET TO MCS)
N100
M121 "C:\cncm\ncfiles\BL and COMP\X AXIS\x axis comp.dat"
M124 /X/M
G91
G59
G0X-0.5
M102
BUT... I want this to be more automated, for reasons. But as soon as I replace the M102 with "GOTO 100" the values in file are wrong. X is always right, but M is always zero. I've tried running the M121 and M124 as a sub program, but the results are the same... For some reason it's like the M axis data only updates at the beginning of the program...
Ideally I can use this run the comp test several times to create an average, and do some other fun things like create graphs to see trends in error. See the attached program for where I am trying to get.
Any help would be awesome!
PZ
I made a cable to connect the read head of the X scale to the encoder port on my Acorn, set axis 5 to M and set the turns/rev and rev/in properly. Worked flawlessly, now the "M" axis reads the "actual" position of the X axis from the read head on the scale.
Next wrote I a program that utilized M124 to wire the /X/M axis to a file... this is where things got hung up... The below program works fine, simply let it run until it hits a travel error and then change the "G0X-0.5" to "G0X0.5". The values printed out in the file line up nicely.
(G59 WCS SET TO 0,0,0 OR IN OTHER WORDS, SET TO MCS)
N100
M121 "C:\cncm\ncfiles\BL and COMP\X AXIS\x axis comp.dat"
M124 /X/M
G91
G59
G0X-0.5
M102
BUT... I want this to be more automated, for reasons. But as soon as I replace the M102 with "GOTO 100" the values in file are wrong. X is always right, but M is always zero. I've tried running the M121 and M124 as a sub program, but the results are the same... For some reason it's like the M axis data only updates at the beginning of the program...
Ideally I can use this run the comp test several times to create an average, and do some other fun things like create graphs to see trends in error. See the attached program for where I am trying to get.
Any help would be awesome!
PZ