Author Topic: Wait for unload  (Read 654 times)

0 Members and 1 Guest are viewing this topic.

Offline Aagrald

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
Wait for unload
« on: April 03, 2018, 09:41:09 AM »
So i just saw a video that got me thinking. A UR held a piece of a motor for the human operator, and i would presume that it will not move unless the detail is removed. Is there a way to use the Wait command with the payload, for example when payload drops to under 2kg continue with the program...?
I tried to find a way with the "force" input but with no luck (or i did it wrong).
This should probably be a very useful function for using the cobot as a cobot...  :party1:
Thank you!

Offline ClaudiuA

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
Re: Wait for unload
« Reply #1 on: April 03, 2018, 12:09:54 PM »
Yes, rather simple. It's not a wait, it's an IF, more or less with a continuous check.

Var_1 := Force ()
If Var_1 >= VALUE then
    WAIT 0.1
    Var_1 := Force ()

More or less this would get you what you need. I don't have a working cobot at my disposal to check exactly.

I'm using something of the sort to feel for the height of a stack.


Offline Aagrald

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
Re: Wait for unload
« Reply #2 on: April 03, 2018, 01:04:41 PM »
Awsome ClaudiuA!

I´m going to try it tomorrow!
I´ll get back to you if i fail  :merci:

Thanks!

Offline ClaudiuA

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
Re: Wait for unload
« Reply #3 on: April 04, 2018, 05:54:18 AM »
Remember to check the "Check continuously" box, or whatever it's called, for the IF statement.

Offline Aagrald

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
Re: Wait for unload
« Reply #4 on: April 04, 2018, 01:03:34 PM »
It worked great! But do i need both the "Var_1:= Force()"?
I could have just tried to remove one but i figured you would know why  :icon_wink:

Offline ClaudiuA

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
Re: Wait for unload
« Reply #5 on: April 04, 2018, 02:32:59 PM »
You could just use IF FORCE () >= Value and it'd be the same thing really.
I tend to write explicit stuff. If I check back in one or two years, even if it looks idiotic, at least I can easily remember what I wanted with my code.

Offline Aagrald

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
Re: Wait for unload
« Reply #6 on: April 05, 2018, 07:05:28 AM »
Haha great!
I´m somewhat new to code and have mostly been using Siemens PLC logic and just started a Python course.
It seems very useful so i will try to learn more languages!

Thank you very much for your help!
I´ll be back soon i believe :)