Robot Programing - PLC master

  • Hello all.

    I am using the following equipment:

    KUKA KRC4 with Profinet-Profisafe (KSS 8.6)

    S7-1200 F PLC (Tia portal V15.1)

    So far, I have set up the communication with the Robot controller and the PLC over Profinet/Profisafe, this works.

    I made an I/O table for the Robot controller and the PLC to communicate. So, with a certain input I call a module where a motion program is written. At the end of this motion program I set that a job was done and then wait for the PLC to reset the input that triggered the execution of this module and then I also reset the job done bit.


    Main program example:


    Example of a module goHome() :


    In short this is how I wrote the logic in the Robot controller. Almost too simple, right?

    But I have more complex modules where I have several motion commands, followed up by a gripper control and in the end always the same procedure that is in the goHome module. I set the OK bit wait for the start bit to be reset and then reset the OK bit again. When this module is executing, I get this error: Sequence of instructions that cannot be approximated KSS01442


    What advice could you give me so that I avoid getting these errors.

    Thanks

    Cheers

    Aleix

  • Remove approximation from PTP move

    Remove CONTINUEs

    make sure to get familiar with advance run pointer. mixing CONTINUE and WAIT FOR is a risky move.

    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

  • Hello.


    I removed the CONT from the in-line forms. That did the trick... but


    The robot is stopping on points now of course, I am gonna try and play with where can I get away with the CONT function tomorrow.

    What about my method of calling the modules, is this OK or are there any drawbacks that I am not aware of? Bear in mind that I am totally new to robot programming...


    Cheers

    Aleix

  • "make sure to get familiar with advance run pointer. mixing CONTINUE and WAIT FOR is a risky move."


    that is still valid and to be taken seriously. if you want to see what caused message, check system variable manual. there is something called $STOPNOAPROX or similar. it controls behavior of message. right now you see warning message but if you toggle that variable it would also stop program. then you can see exactly what causes stop.


    btw. you did not post actual code so don't know what your other settings are ($ADVACE, presence or absence of INI etc.) but your last code block has extra ENDWHILE.

    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

  • You want to study the Advance Run in the programming manuals. Particularly which commands break the AR, which ones don't, and how the CONTINUE command interacts with it. It gets rather complex, but the reason CONTINUEs are risky is that it can cause your WAIT or other commands to be evaluated far in advance of the move it was programmed near.


    The "cannot approximate" error happens when a motion with the CONT flag is followed by an AR-breaking command (WAIT, OUT setting, etc) before the next motion. If the AR is broken, the previous motion cannot be approximated.

Advertising from our partners