Discussion

Left ArrowBack to discussions page
AndreAndre Posts: 7 Apprentice
Good morning everybody,

I am a new member of this community and I would like to ask you a question.
I am currently using  a Universal Robots UR10 (software version: 3.7.2) and I need to write a variable, more precisly a pose, into the installation file from the robot program. Do you know if something like this is possible? More in detail, the robot arm has to move to a waypoint and, after that, to set that waypoint/pose inside the default.installation file in order to have it stored in the "installation" tab of the Teach Pendant as a feature and to be able to use it as a reference frame according to which to define the waypoints stored inside the robot program. I can't define that point as a variable with an "assignment" command because if I will turn off the robot I will lose the value stored in that variable.

Thank oyu very much for your help

Best regards

Andrea

Comments

  • matthewd92matthewd92 Posts: 799Founding Pro, Tactile Sensor Beta Testers Handy
    Im not aware of anyway to save it as a feature, but you could save it as an installation variable.  You would need to first define the installation variable in the installation tab by assigning it a random pose, could just be p[0,0,0,0,0,0] then from the program you can use the assignment to store the variable.  Then whenever the robot is powered off it will be written to memory.  You could then use this variable in script commands to drive other waypoints off of by using pose_trans, pose_add, etc.
  • AndreAndre Posts: 7 Apprentice
    Thank you for your answer, but unfortunately this is not solving my issue. I noticed that I was not explaing myself fully in a proper way. The fact is that I would like to implement this code inside a switch case, whose cases are commanded by an operator via Modbus from an external computer, of a main Robot Program. By following the solution that you suggested, it would be necessary to make such an assignment each time that i'm running the Robot Program in order to overwrite the variable, defined inside the installation tab as a feature, with the assignment. I would like to find a way according to which this information is always stored inside the Control Unit of the robot, and not just if I am assigning it in the Robot Program. This is why I was asking if it was possible to write directly in the installation tab or inside the default.installation file, so that the coordinates that i found by running the program once are stored each time that I'm running the robot program even without making the assignment that you suggested. Are you aware of such a solution? Or maybe I ma forced to trasnfer this information via Modbus and then to read it again each time that I'm running the Robot Program?
  • matthewd92matthewd92 Posts: 799Founding Pro, Tactile Sensor Beta Testers Handy
    @Andre Just realized that the post below was never posted, sorry about that.

    Not sure I follow, if you assign a variable as an installation variable it is stored and then available anytime you start the program even following a total reboot of the system..  You could just type in the value that you want to have in that variable in the installation tab under variables.  If you then wanted to update that value from within the program you could simply use the assignment function and then the new value would be stored.  If you don't need to update the value then simply use an installation feature.  If though, you need to update the value from within the program and have that value stored with the default.installation file you will need to use an installation variable to store that value.

    Here is an example of an installation variable that I created called persistentPose, it will be written to the file system and available anytime that I use this installation file.  It can be modified using the assignment function from within the program if I need to do that.




  • AndreAndre Posts: 7 Apprentice
    Thank you for your answer @matthewd92.
    I understand what you are saying, but this is not the solution to my problem because I do not want to overwrite the variable in the installation file with an assignment in the Robot Program each time that the code is run, but just when I'm selecting that option. At the same time, however, I would like that, when I overworte the installation variable with an assignment, as you said, that value would be stored inside the robot  so that I will not lose it when I will turn it off and then on again. 
    My problem is that the pose defined in the installation tab of the Teach Pendant represents a reference frame according to which the waypoints in the Robot Program are defined. The coordinates, according to the robot base frame, of this reference frame can change in time because, for example, the robot has been moved in an other position. After this operation, I have to move the TCP again on the point in which I decided to set the reference frame and store the coordinates of this point, but without manually inserting them in the installtion tab. To do so, I use a function I built inside the Robot Program by making an assignment of the new pose (in this way, as you said, I overwrite the pose defined in the installtion tab and it's perfect). In a second moment, however, if the robot will be turned off, but it's position is not changed, I don't have to call the function to assign the coordinates of the reference frame according to which all the waypoints are defined, because it hasn't changed from the previous one. But, because of the fact that it was not defined in the installation file, I lost the its coordinates and so the robot will use the wrong pose defined in the installtion file.
    Am I wrong

    Thank you very much for your help
Sign In or Register to comment.
Left ArrowBack to discussions page