Wait for Position to be Reached

  • Hello,

    I am doing some programming on the SmartPad, and have a KRC4 controller. I am trying to ensure that the robot has reached the previous position before sending a signal. I know the program looks a few lines ahead so I am a curious about this. I was wondering if it's possible to do it as the following:

    Code
    SPTP P1
    WAIT FOR (P1 to be reached)
    OUT 1 State = True


    Would I need to declare a position as a variable in order to do this? How would I need to program it?


    I am new to programming in KUKA language and I have looked through Programming 1 manual by KUKA but can't find if that is even possible or necessary.


    Thanks

  • since you don't approximate P1 the code does already what you want

    if you really want that the robot is not moving you can "Wait For $Rob_Stopped"


    the "Thinking ahead" only happens if you have C_Dis or similar behind Your movement because You don't want that the robot is stopping there

  • did you attend Programming 1 training? if so then you would be familiar with SYN OUT instruction and manual can be good reference. if you did not take training and just borrowed/inherited manual from a colleague that did, it may not be very clear, because that manual and own notes are just a supplement for in-class lectures. i recommend to those that are new to KRL to stick with inline forms as much as possible until their comfort level increases. inside synchronous output instruction is a TRIGGER. and using ILF is an easier way to parametrize something that works since ILF editor assures syntax correctness.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • the "Thinking ahead" only happens if you have C_Dis or similar behind Your movement because You don't want that the robot is stopping there

    Not to be snarky but this is not accurate. In KRL even if you do not approximate a point the advance run pointer will move ahead if there is no arp breaking instruction. E.g. wait sec 0, wait for true or similar.


    This is diffrent between brands, e.g. abb "fine" points stop the arp whereas z0 does not. In KRL no approximation does not stop the arp.

  • That is because the setting of an output directly afterwards triggers an advance run by means of the $OUT anyway. This is not general behavior and you get this only if the statement after the motion command triggers an advance run break. Multiple ways to achieve this as stated above by others. So if the next command after the motion would not stop the arp anyway you would see different behavior. For example assigning a value to an variable instead of using $OUT would generate no advance run break. So the reason for the break is not the missing approximation but the command $OUT and that is what in my opionion people tried to say.


    Fubini

Advertising from our partners