Saving a point in calibration process I made

Hi Everyone,
I am adding a calibration sequence for a fixture and the idea is simple. The probe goes to the edges in the x and y and calculates a center point. That part is already written and done. The next part that I have been trying to do all day is save this value so that way the operator only needs to calibrate once in a while and not every time the UR code runs. My first idea was to save this center point value as a txt file and reopen it at the startup sequence, but then I realized the file_open(), file_close(), file_read(), and file_write() do not work with the UR10e Robot. So, option two, I rewrote the program so I could save the value and it would write over the value in the installation script (I made a random point with the same value name). That didn’t work either as it just went to what the variable was originally set to. I’m not really sure how to go about this.

Please let me know if you have any ideas,

Thanks!

Daniella Donn

Hi @ddonn,
If i understand you correctly - you would like to write your program (ex. points) which will be relative to your calculated center point, not to base which is default one.

You could simply set your center point as a “point” in features - and then set all other points as “relative to this point” that is your point. Then the only thing will be the x and y calibration, as you mentioned - when the center point changes, all other points that are “connected” to that point will also change by the same distance.

Check one of my posts about that operation : Wojciech GĂłral on LinkedIn: #universalrobots #programming #automation - is something similar, so it should help you.

Hope it helps!
Wojciech

Hi Wojciech,
I am using that idea. I have this point after calibration and all the holes are relative to the point. However, when I created my point in the installation variable, the goal is to get that overwritten with the program after the calibration and have the point always be that point until another calibration happens. But I want this point to last through many power cycles. I don’t want to calibrate it every time the program is running.

Hi @ddonn,
If you overwrite the installation variable in the program using the assignment, it will change in the installation and will be remembered when you restart the robot even if you do not save the program/installation manually by clicking on “save all”.

Then, you can use this variable directly to reference your calibration points or indirectly already in the program (for example, each time you run in before start) write a sequence of rewriting the installation variable to the point as a reference point in features.

So, f. ex. you can create separate program only for calibration process which will be overwrite the installation variable the way you want, and once the installation variable will be globally changed - you can use it as a reference as long as you don’t change it a second time (even after turning off the robot).

I set that up for now but what I think Ill do is possibly send the value over modbus. I am using modbus anyway to create a user-friendly interface on ignition so I hope it works.
Thank you for the idea!

1 Like

Good luck then !

Best,
Wojciech