- Posts: 39
- Thank you received: 5
adding auto leveling to linuxCnc
- SrLange61
- Offline
- Junior Member
-
Less
More
4 years 8 months ago #234888
by SrLange61
Replied by SrLange61 on topic adding auto leveling to linuxCnc
Hi
I'm having a problem getting the hal commands right on my 'real' machine.
Using the above I have a sim working fine but my machine already has the motors using net _pos-cmd signals as in‘net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd’
net xpos-cmd cannot be used twice as it gives a error ?
I’ve tried ‘net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd compensation.x-pos’
but I can’t get the compensation to update.
I’m keen to get milling and cutting Depron planes and having the cutting bit following the table will make it a lot easier and precise. Its currently out by .3mm over a metre area.
Any ideas
srl
I'm having a problem getting the hal commands right on my 'real' machine.
Using the above I have a sim working fine but my machine already has the motors using net _pos-cmd signals as in‘net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd’
net xpos-cmd cannot be used twice as it gives a error ?
I’ve tried ‘net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd compensation.x-pos’
but I can’t get the compensation to update.
I’m keen to get milling and cutting Depron planes and having the cutting bit following the table will make it a lot easier and precise. Its currently out by .3mm over a metre area.
Any ideas
srl
Please Log in or Create an account to join the conversation.
- ds.lithographie
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 6
4 years 8 months ago #234889
by ds.lithographie
Replied by ds.lithographie on topic adding auto leveling to linuxCnc
Depron plane sounds like a great project!
I don't have a solution in mind right now, but here is my checklist when I was debugging mine:
1. open linuxcnc via commandline by just typing in command `linuxcnc`, you should see some additional details of compensation.py output, anything unusual?
2. before you generate the probe-results.txt, there must be an existing probe-results.txt in the folder, or it will fail to load.
3. Documentation on eoffset -- `External offsets apply to axis coordinate letters (xyzabcuvw). All joints must be homed before external axis offsets are honored.` This had me stuck for a long time because my machine did not have home switches linuxcnc.org/docs/html/motion/external-offsets.html
4. Hal scope might be useful, check if anything under eoffset react to your input
I don't have a solution in mind right now, but here is my checklist when I was debugging mine:
1. open linuxcnc via commandline by just typing in command `linuxcnc`, you should see some additional details of compensation.py output, anything unusual?
2. before you generate the probe-results.txt, there must be an existing probe-results.txt in the folder, or it will fail to load.
3. Documentation on eoffset -- `External offsets apply to axis coordinate letters (xyzabcuvw). All joints must be homed before external axis offsets are honored.` This had me stuck for a long time because my machine did not have home switches linuxcnc.org/docs/html/motion/external-offsets.html
4. Hal scope might be useful, check if anything under eoffset react to your input
Please Log in or Create an account to join the conversation.
- SrLange61
- Offline
- Junior Member
-
Less
More
- Posts: 39
- Thank you received: 5
4 years 8 months ago - 4 years 8 months ago #235010
by SrLange61
Replied by SrLange61 on topic adding auto leveling to linuxCnc
I got it going and it was easy.
Just changed the name of signal line like this-
net xpos2-cmd <= axis.x.pos-cmd => compensation.x-pos
I can see the Z motor moving so its now fine. Now time to scan the table again and get it around the 0 Z level.
Will post again when I cut .1 mm above the glass.
Thanks
srl
Just changed the name of signal line like this-
net xpos2-cmd <= axis.x.pos-cmd => compensation.x-pos
I can see the Z motor moving so its now fine. Now time to scan the table again and get it around the 0 Z level.
Will post again when I cut .1 mm above the glass.
Thanks
srl
Last edit: 4 years 8 months ago by SrLange61.
Please Log in or Create an account to join the conversation.
- zdebel
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
4 years 8 months ago - 4 years 8 months ago #235591
by zdebel
Replied by zdebel on topic adding auto leveling to linuxCnc
The scanning and Z compensation seem to work properly (I check this using a cup, I scan it, remove it and then I see when moving on same 'Z' depth, the tip carves the shape of the cup). The problem I have is that the Z compensation is lagging, when I put the cup back, there are collisions between the tip and the cup, the Z is lagging behind the current XY position.
Last edit: 4 years 8 months ago by zdebel.
Please Log in or Create an account to join the conversation.
- ds.lithographie
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 6
4 years 8 months ago #235597
by ds.lithographie
Replied by ds.lithographie on topic adding auto leveling to linuxCnc
seems that compensation.py is best for dealing with a flat surface that is tilted or uneven -- you sample surface height at 10 mm X-Y spacing, and then it interpolates a height map with 0.1-1 mm resolution depending on the scaling factor.
Check out Compensation.loadMap() method definition from the compensation.py file. ~ 30 lines of code and this is where things happen. If you provide a much denser probe-results.txt, the code may handle it poorly if without modification.
Essentially what loadMap() does is take X,Y, Z value from probe-results.txt, clean it up a little bit, feed them into scipy.interpolate.griddata(), and returns a value-mapped 2D array with X and Y being the index.
Since array indicies cannot be float, so X and Y must be int() -ed, and this might be a significant source of error (and bug!) if you r application requires a much better resolution than 0.1-1 mm.
Check out Compensation.loadMap() method definition from the compensation.py file. ~ 30 lines of code and this is where things happen. If you provide a much denser probe-results.txt, the code may handle it poorly if without modification.
Essentially what loadMap() does is take X,Y, Z value from probe-results.txt, clean it up a little bit, feed them into scipy.interpolate.griddata(), and returns a value-mapped 2D array with X and Y being the index.
Since array indicies cannot be float, so X and Y must be int() -ed, and this might be a significant source of error (and bug!) if you r application requires a much better resolution than 0.1-1 mm.
Please Log in or Create an account to join the conversation.
- zdebel
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
4 years 8 months ago #235598
by zdebel
Replied by zdebel on topic adding auto leveling to linuxCnc
ok, will check, thank you for your reply
Please Log in or Create an account to join the conversation.
Time to create page: 0.168 seconds