I have been 'away' from my home CNC setup for quite a few months, due to work.
I need help again with a few issues, and I'll start with my Tool Length Sensor or Probe (G31 code). I did post about this subject a year ago but for some reason it's now not working!
Whilst I appreciate that there are plenty of threads relating to this subject, I find that most of them go into too much detail.
I need a simple macro to use with my Touch Plate which is connected to pin 15 and functioning correctly. Below is the usual code that I have tried with my system.
Firstly, it gives an error "Unknown word where unary operation could be Line 3".
But...when running the code, it doesn't slow to the desired feedrate at Line 2 but keeps doing a rapid? However, it does seem to trigger the probe but then it stops.
I'm sure this code used to work, when I was last at the machine but it was a few months ago.
This is the code I'm using...
Code "G0 X31.5 Y30.2. // Position above touch plate
Code "G31 Z-50 F10". // Slow until touch plate is found
While IsMoving()
Wend
code "G92 Z0" // Zero Z axis
code "G0 Z10" // Not sure if the rest is correct ??
While IsMoving()
Wend
code "G92 Z0"
Basically, I need the system to measure the length of Tool selected. The bit I'm stuck with is what happens after the touch plate is found...I assume it needs to move back to the Home position and the length of tool will be known.
I do have an ATC with six tools, but if anyone can help in adapting the above code so that it works on its own for now, that would be great.
Keith