Home Programming

Discussion

Left ArrowBack to discussions page
T800_412T800_412 Posts: 51 Apprentice
What is a good way to make a UR10 robot wait for a status flag before continuing? I need to monitor two digital inputs and based on their status, set a flag for "Conveyor_Ready" so the robot can do it's pallet function. Right now, I have the inputs checked in a subroutine that is called before the pallet routine executes. The first time, I tried a loop that was supposed to continue calling the subroutine to check the digital inputs, but I got an error saying the robot was idle too long waiting for an instruction.

Basically, I want to have
IF Digital_In_0 == FALSE AND Digital_In_1 == TRUE
Conveyor_Ready := TRUE

If Conveyor_Ready == FALSE
WAIT
IF Conveyor_Ready == TRUE
Pallet

Comments

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,065 Handy
    Just use wait and in the fx field put the input you want to wait for. 

    So pseudocode

    wait Conveyor_Ready

    No need for the if statements. 
  • T800_412T800_412 Posts: 51 Apprentice
     I have more than a single input to monitor, so I have a subroutine to set the flag “conveyor_ready”

    now this is morphing into something more because the program faults out when it gets to this point, stating invalid set points. The log indicates the program contains motions that are not ramped correctly down. So I tried stopj(120) and also telling the previous waypoint to stop instead of blend.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,065 Handy
    You could monitor both inputs in the wait statement. Try changing your stop command to stopj(8) as that is about the maximum acceleration, it’s in radians per second squared, not degrees. 
Sign In or Register to comment.
Left ArrowBack to discussions page