Discussion

Left ArrowBack to discussions page
mrk_vargamrk_varga Posts: 4 Apprentice
edited August 21 in Programming
Hello all,

I am having a hard time programming an action on a UR3 robot. When the robot is in a specific waypoint a sensor should be active so that the robot can continue it s movement. Sometimes, from different reasons that sensor is not active and the robot waits until it gets active. The problem starts from here. I need to program the robot that if the waiting time is longer than 5 seconds the robot pops up an error message. But if meanwhile the sensor gets active (in that 5 seconds of waiting) the robot continues the movement and doesn t pops up the error message. I tried to do that with a Loop sequence but I didn t get quite the best result.


Best Answer

Comments

  • LoïcLoïc Posts: 22 Handy
    What was the problem with the Loop?
    Can you share what you've written for this specific moment?
  • mrk_vargamrk_varga Posts: 4 Apprentice
    The loop sequence was written like a negation. If the sensor is not active it starts looping. 
    Example
    .
    .
    Loop if sensor is not active:
             Wait 5 seconds
             Popup
    .
    .
    If I don't check the "Chek continuously" option for the Loop, and the sensor gets active meanwhile (in that 5 second waiting time) the robot waits for the 5 seconds to pass, pops up the message, waits for a command from the operator (continue program/stop program), and only after that continues the movement.  
    If I check the "Chek continuously" option for the Loop, and the sensor is gets active meanwhile it continues the movement without the popup.Thats okey.  But if the 5 seconds waiting time pass, the Popup shows up, so the operator will now that the sensor is not active and he will place an object in front of it. But as the sensor gets active the robot starts moving but the popup is still on the screen. And i need to program the robot to move only after the operator has activated the sensor and pressed the Continue program command on the popup message.
    I also tried with a  Loop in a Loop but I had the same results.

    .
    .
    Loop if sensor is not active
            Wait 5 seconds
            Loop if the sensor is not active 
                       Wait 1 second
                       Popup
     .
    .

  • mrk_vargamrk_varga Posts: 4 Apprentice
    I will try the option with the variable. Thank you for your answer. :)
  • mrk_vargamrk_varga Posts: 4 Apprentice
    Thank you very much for your help. 
    With your help I managed to insert into the program what I needed to. I used the Loop with the time variable. I just made a little adjustment. Insted of the If I used another Loop for the pop up message. With the if function the operator could have pressed continue program without fixing the problem (activating the sensor), but with Loop the popup will reappear on the screen until the operator has activated the sensor.
    Thank you again for your help. It was very useful.
Sign In or Register to comment.
Left ArrowBack to discussions page