Problems with touch off plate configuration

More
28 Jan 2021 14:43 #196942 by mitakata_net
Hello, a long time ago, with your help, I started my machine running LinuxCNC.
Now I'm trying to upgrade the machine by adding a feature to automatically find the beginning of the material using the Touch off board.
Based on several publications made on the subject, I made something that works to some extent.
I'm not an expert and I don't know LinuxCNC well and I'll need your help again to find out where the problem is.
What I do:
1. I add a script for a button in - custompanel.xml
2. Add the following line to - custom_postgui.hal

net remote-o100 halui.mdi-command-00 <= pyvcp.o100

3. I add MID Command in - my-mill.hal / section

[HALUI]
# add halui MDI commands here (max 64)
MDI_COMMAND = o100 call

4. I create a file named 100.ngs and put it in the nc_files directory, describing what the machine should do.

So far everything is fine, I start LinuxCNC, set the home positions of X, Y, Z, A. I press the button I created for the purpose of the function and the machine starts executing the program as I expect.
After executing the program, the machine is reset at the beginning of the material, but here comes the problem.
If I turn LinuxCNC on and off, for home positions and setpoints other than 0.
These values ​​are saved even after setting the home position (Screenshot-1 and Screenshot-2)





and are saved in the file linuxcnc.var (Screenshot-3)



if you manually enter zeros and overwrite the file, things are fine until the next start of the function.
Separately, when the problem exists at the top of the cone, this appears (Screenshot-4)



Please help and guidance.
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Jan 2021 23:52 #197000 by andypugh
Can you describe how what you want to happen differs from what actually happens?

(Also, I don't think you should need to edit the .var file)

Please Log in or Create an account to join the conversation.

More
29 Jan 2021 07:54 #197038 by mitakata_net
When everything is OK, I position the machine at any point on the work table and when setting home positions X, Y, Z, A, they become 0.000. This is also the beginning of the material to be processed.
When I use the function created by me, the machine automatically finds the end of the material to be worked on, automatically sets home X, Y, Z with values ​​of 0.000.
After using the function, the next time you start the program and use the Home Axis button, the values ​​of X, Y, Z are not 0, but with some values ​​similar to screensshot-2.
This does not allow me to manually set the home position to X, Y, Z with a value of 0.000.
I guess I'm wrong somewhere, but I can't figure out where.
My goal is to be able to set home manually, and if necessary to be able to use the function.

I hope I am as clear as possible in the explanation and I apologize for my bad English.

Please Log in or Create an account to join the conversation.

More
29 Jan 2021 08:28 #197040 by mitakata_net
When the problem exists, I notice the "graph" in question from the lines at the top of the cone, I indicated it in (Screenshot-4)
When everything is fine (before using the touch off function) this thing is gone.
In the linuxcnc.var file, I notice these values that the program takes for home after a problem occurs.
When editing with a value of 0.000000, like the other lines and writing, at the start of the program there is no problem.
The values of X, Y, Z when using the Home axis button - become 0.000.
The indicated graph at the top of the cone disappears.

Please Log in or Create an account to join the conversation.

More
29 Jan 2021 23:49 #197100 by andypugh

When everything is OK, I position the machine at any point on the work table and when setting home positions X, Y, Z, A, they become 0.000. This is also the beginning of the material to be processed.


Are you confusing "home" and "touch off"?

Home should always be in the same place (typically at one end of axis travel)
That sets the origin of the machine coordinate system.

You then use "touch off" to move the working coordinate system (G54, G55 etc) to the workpiece origin.

I think that if you start working this way instead then your machine will start to behave as you expect.

Please Log in or Create an account to join the conversation.

More
30 Jan 2021 10:20 #197130 by mitakata_net
It was quite difficult for me to explain exactly what was happening, due to the fact that I do not know linuxcnc well, and English is not my mother tongue.
After much reading, I found that there was virtually no problem.
I set the "wrong" codes - the G10 L20 P0 does exactly what it needs to do.
At initial startup, there are no entries in the linuxcnc.var file - everything is worth 0.000000.
In this situation, wherever I position the machine and set home positions to X, Y, Z - the values ​​in become 0.000
and this is the beginning of the coordinate system.
When starting touch off (built with commands G0, G38.2 and G10 L20 P0), the probe finds the beginning of the material, sets the new values ​​of X, Y, Z - 0.000, but these are calculated values ​​offset from the home position stored in linuxcnc .var, in rows - 5220, 5221, 5222, 5223 with the corresponding values. If at this point the "Home axis" button is pressed again, the machine moves to the corresponding coordinates saved in the .var file.
From what I've read, I understand that code written this way does exactly what happens.

Please Log in or Create an account to join the conversation.

More
30 Jan 2021 10:30 #197132 by mitakata_net
[/quote]
Home should always be in the same place (typically at one end of axis travel)
That sets the origin of the machine coordinate system.[/quote]

In my case, "home" has always been where I say on the machine.
In other words, I position the machine at a point on the work table and after pressing the "home axis" button, the axes are in the home position with values of 0.000.
Each time I work with the machine, I can set a new home position.

Please Log in or Create an account to join the conversation.

More
30 Jan 2021 10:45 #197133 by mitakata_net
After reading this I changed the code I use based on G92 commands - Coordinate System Offset,
this command also writes to the .var file, but finally after finding the beginning of the material with the execution of command G92.1 in the last line, I reset the values recorded in lines 5211 - 5219 in .var.
After pressing the "Home axis" button again, the home position and start of the material match, the values of X, Y, Z, sa 0.000, and at each subsequent start are "free" for random braking.

Please Log in or Create an account to join the conversation.

More
30 Jan 2021 11:04 #197140 by rodw
I had a lot of trouble with some of this stuff. What I do now which makes my life easier is to forget about G92 altogether and always home the machine in the same position (home switches make this easier for me) :)
So then move to you desired start point and touch off your X, Y & Z axes. This will reset the DRO's to zero. I actually have a macro button programmed that moves the plasma torch to the Laser pointer offsets and touches of with one keystroke

The G54 offsets still get stored in the VAR file.

Please Log in or Create an account to join the conversation.

More
30 Jan 2021 11:20 #197143 by tommylight
From what i can gather the OP has no homing switches, or something not right there.

Please Log in or Create an account to join the conversation.

Time to create page: 0.151 seconds
Powered by Kunena Forum