This is my first post in the robot forum, although I have followed many posts for a long time. I have finally encountered a problem I am unable to find a suitable answer for in either documentation, user manuals or other forum posts.
I am looking to create a programme to correct the TCP and Tool Base of a welding torch in KUKA KRC2. I have a series of 0-10V laser sensors I intend to use to provide a variable input to the robot IO. I would like to use these variable inputs to move the Tool Base and TCP of the torch as the torch's TCP frequently gets knocked +/- 10mm in X,Y,Z.
I have used a variable input laser in the past to adjust the height of relative motions when welding seams that are not perfect circles so I know how to use the laser inputs correctly to create movement variables. My issue lies in moving a Tool Base; I have not delved deep into program, world or tool bases much and as such I'm not entirely certain what the best method of adjusting a Tool Base automatically from a variable would be.
Can I create a second, variable Tool Base of sorts that I can add offsets too based off of the last tool base using variables automatically?
PTP Adjustment_Position offsetX = $IN[laserX] offsetY = $IN[laserY] offsetZ = $IN[laserZ] BASE_DATA.X=BASE_DATA.X + offsetX BASE_DATA.Y=BASE_DATA.Y + offsetY BASE_DATA.Z=BASE_DATA.Z + offsetZ wait sec 1 PTP Adjustment_Position
or something similar, specific to the Tool Base. I would like to be able to call this adjusted Tool Base only in specific programmes and as such wouldn't want to mess with existing World or Tool Bases.
I apologise if my question is unclear or dumb, I only know KRC2 from what I have taught myself and I am still not familiar with exactly what is possible or how, all help is greatly appreciated.