Home Programming

Discussion

Left ArrowBack to discussions page
David_GouffeDavid_Gouffe Vacuum Beta tester Posts: 56 Handy
Programming also means testing program. On UR robots, there is no start here or from here. 

Here is the work around. 

The switch case structure allows you to test sub part of your code. 

The principle of this structure is simple: 
Use a numerical variable pointing the part of code you want to do.
Use the switch structure to read its content and match it with the good case. 
Put your code inside a folder inside of each case. 
Each case can assign the next step value to the variable. 

Using this, you can skip the Case 1 and Case 2 when testing making My_Switch_Variable = 3. This way, you execute the Case 3 . 

This is useful when programming, testing or to try a new way to process a part of the program without affecting the previously tested part of it. 

If you need to restart the program after a power cut, having the My_Switch_Variable saved permanently will let your program restart inside the good Case and the good part of the sequence. 

This is almost like making a "jump to" or "go to" structure in old programming language as "C" . 

I use it inside a loop sequence and count using some Insights tag to track when a step is done and if some Case are more prone to fail. 

Hope this helps. 

Regards,  
 
David Gouffé

Integration Coach

Coach en intégration


Robotiq is now into packaging, palletizing and sanding applications. Learn more about our new Vacuum Grippers and the Robotiq Sanding Kit.


1-888-ROBOTIQ #275 (762-6847)

1-418-380-2788 #275 (Outside US and Canada)

1-418-655-9221 (Cell)

Follow us on

facbook-iconepng linkedin-iconepng twitter-iconepng google-iconepng Youtube-iconepng

Visit us:  
Tagged:

Comments

  • David_GouffeDavid_Gouffe Vacuum Beta tester Posts: 56 Handy
    Hi everyone,

    Here is the version if you use "If" statements, well explained on Universal-Robot website. 

    Start program from where it was stopped - 15385

    https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/start-program-from-where-it-was-stopped-15385/ 

    Thanks to Universal-Robot How-To articles. 

    Hope this helps. 

    Regards,  
     
    David Gouffé

    Integration Coach

    Coach en intégration


    Robotiq is now into packaging, palletizing and sanding applications. Learn more about our new Vacuum Grippers and the Robotiq Sanding Kit.


    1-888-ROBOTIQ #275 (762-6847)

    1-418-380-2788 #275 (Outside US and Canada)

    1-418-655-9221 (Cell)

    Follow us on

    facbook-iconepng linkedin-iconepng twitter-iconepng google-iconepng Youtube-iconepng

    Visit us:    


  • ctigerctiger Posts: 24 Apprentice
    edited May 2019
    Hi,

    I would like to know, if the program is stop, how do I cancel the 'Move Robot into Position'?

    Is there a way to resume the last position without having the robot to go to the starting position before continuing to the next operation?

    Thanks in advice.

  • JopsonLJopsonL Posts: 12 Apprentice
    If you have your home position in before start then change it to a relative position instead of fixed position. Our robot would not home automatically unless this was set. 
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    You can also create a variable waypoint and then go to that waypoint in your before start, so that the arm doesn’t really need to move for the program to start. 

    currPose = get_actual_tcp_pose()
    
    movej
      currPose


    Then in your before start you can use some logic to know if you are resuming a program or starting or starting from scratch where you need to possibly go home. 
  • David_GouffeDavid_Gouffe Vacuum Beta tester Posts: 56 Handy
    Hi, 

    You can now start from anywhere on UR eSeries Cobot just by using Polyscope 5.5 or above. 

    See section " PolyScope GUI " / " Start from selection "
    https://www.universal-robots.com/how-tos-and-faqs/faq/ur-faq/release-note-software-version-55xx/

    Enjoy program testing. Now from where you want, thank to Universal-Robots. 


Sign In or Register to comment.
Left ArrowBack to discussions page