Hi PnsStarter ,

More infos:

I work at a company where we make automated machine lines for big factories. We use a lot of metal, so we built a laser cutting machine for ourselves using a refurbished fanuc robot. (I told them we should have used servo motors instead of a motor...) We had problems with the cutting because the metal sheets are always a little bent so sometimes the laser head would touch the sheet or it would be too far and it results in bad cut quality. Someone here on the forum recommended the DPM function to follow the sheet. If it's closer to the head, move away, if it's getting far away, move closer.

For example this is one piece I want to cut out. I generate a toolpath for this using RoboDK.

I move in a UFRAME so the Z of the robot would always be constant now. I don't know where would be bents on the sheet. For example when I cut this piece, at the "top" of this drawing the Z distance would be 1 mm, at the middle it would be 0 and scratching the sheet with the nozzle, at the bottom it would be 1.5 mm.

I modified the RoboDK post processor so I have linear moves only, even the circles are made out of linear points.

The documentation is not much of a help unfortunately.

I think for this I need the modal function. For the DPM type I tried the UFRAME setting.

For the conversion offset and slope I found this equation:

Distance = (analog input value - A/D conversion offset) / A/D conversion slope

The distance here is how much I want to compensate?

For example, I want the Z height to be 1. That would be analog input 400.

So if the analog input is 800, I need the distance to be -1 so the robot would move down 1 mms?

I tried to play with these values and got the robot to move in z direction a lot but I still don't really understand how this works and I couldn't solve my problem.