Home Programming

Discussion

Left ArrowBack to discussions page
KaanKaan Posts: 10 Apprentice
Hi There, is it possible to have subprogram in the subprogram. let me put it this way , i have callout for subprogram1
and down streem i have another callout for subprogram2  and in that subprogram2 it contains part of the main prgram that
has callout for subprogram1, my question is if while i am in subprogram2 , condition goes true for calling out subprogram1
will it go to subprogram1 ? if so where will it go back to when it has done with execution? since we have two call out point ,
one in main program one in subprogam.
thanks

Comments

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,131 Handy
    edited December 2017
    @kaan Unless UR made a change in 3.5, haven’t finished testing everything yet, it’s not possible to use a sub-program within a sub-program. 
  • KaanKaan Posts: 10 Apprentice
    Hi Matthewd92 , it has not given me any warning when i put program together , do you think still not okay?

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,131 Handy
    Have you tried playing it though?  If it works I would presume that it would return to the next line in the calling subprogram when the called subprogram exits. 
  • KaanKaan Posts: 10 Apprentice
    No I have not run the program yet or should i say i ran the the progam but i have't  tested the subprogram call outs , i will let you know with the outcome
    when i do. cheers
  • dfiedlerdfiedler Posts: 2 Recruit
    The simulation software does not warn you that you have a subprogram calling a subprogram.  It will only fault when you try to run the robot.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,131 Handy
    So it’s still not allowed to call a subprogram from a subprogram?
  • KaanKaan Posts: 10 Apprentice
    Okay i got it can not be done. Thanks ,following is the task at hand can one of you help me out to resolve this issue , i would really appreciate
    i have a situation where UR10 should pick up Two different components to load into welding machine and runs the welding machine as well, one of the components gets checked with vision camera for defect and the other one is hand loaded to conveyor belt in stacks so they get checked by person (no subroutine for this component). Now here is the interesting part, if component that gets checked by camera ,checks out faulty ,UR10 goes into subroutine1 and pick the part and dumps it into bin and waits for next good part to come along. Say that next one is good one, UR10  puts it into welding machine and welds it, after welding finished product gets checked by welder for leak, and if that process goes faulty UR10 runs subroutine2 and pics the product and chucks it into bin as well. Because at the and of welding it also does pallet placing, i had to add picking two parts again to start welding cycle in the subroutine2, Now my problem raise when this second time pick to start welding machine , what if first component is faulty in that subroutine2 ???
    how can i overcome with this issue? i hope i made myself clear enough.
    cheers

    PS: it would have been nice if poly scope had Jump function so that program can jump back or forward to other parts of the program :)
  • KaanKaan Posts: 10 Apprentice
    dfiedler said:
    The simulation software does not warn you that you have a subprogram calling a subprogram.  It will only fault when you try to run the robot.
    hi dfiedler, i have ran the actual program not simulator. robot does work with that subroutine inside subroutine.but there was not a situation of calling second subroutine may be if it does then will give fault..
Sign In or Register to comment.
Left ArrowBack to discussions page