LOOP illegal or unknown statement

  • Hello this is my first post
    I'm new to kuka programming and I'm trying to create a very simple src module


    I created by new -> Expert Module


    this is the source code


    DEF ff()
    loop



    endloop


    end


    but when I try to run I rceive the following message "Illegal or unknown block". Please someone could help figuring out what is the problem?


    Thanks

  • because your code in original post and code in your screenshot are two VERY different things.



    you originally stated that you create EXPERT module with just FOUR lines of code.
    now you show screenshot with INI fold (something that does NOT belong into expert module). And robot clearly does not complain about any of four lines you origianlly posted. Why are you sending us on a wild goose chase?


    Deleting INI block WILL make this look like code in original question and - it will "work".


    Note your INI is very basic. It should work. Problem is likely that changes done while program was selected are not shown and compiled. (learn about differences between SELECTing and OPENing file).


    Create another program module (Module, not expert module) and see if that works too.

    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

    Edited once, last by panic mode ().

  • Ok sorry.please could you help me with this code?


    Which is the procedure that I have to follow, If you can suggest also any tutorial I will be glad to follow


    Bests

  • as mentioned:



    1. remove INI block. that will make THIS program work.
    2. also create another program (but do not make it as Expert module) and see if it works as expected. if it shows same problem, issue is with your KSS setup.

    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

Advertising from our partners