Probing. Auto search Z=0
Hello.
I am sorry if I repeat a question.
I Russian therefore it is difficult to me to find information about my problem on this forum.
I want to write a script which will find the zero plane.
I made a touch plate and connected electric part.
Plate thickness - 1,535 mm.
I want that after a contact the script changed Z coordinate for 1,535 mm. But I don't know how to make it :-(
I wrote script:
But it changes machine coordinates of system, but not working coordinates.
What I do incorrectly?
Help me to write the correct script please.
Hello.
I am sorry if I repeat a question.
I Russian therefore it is difficult to me to find information about my problem on this forum.
I want to write a script which will find the zero plane.
I made a touch plate and connected electric part.
Plate thickness - 1,535 mm.
I want that after a contact the script changed Z coordinate for 1,535 mm. But I don't know how to make it :-(
I wrote script:
Code:
#include "KMotionDef.h"
main()
{ Jog(2,-2000); // start moving
while (ReadBit(15)) ; // wait for switch (input #15) to change
EnableAxisDest(2, 1473.6); // Set Z to 1.535 mm (960 steps/mm)
Jog(2,0); // stop
Move(2,4800); // Move to Z=5 mm (960 steps/mm)
}
What I do incorrectly?
Help me to write the correct script please.