use selfwritten function

  • Greetings from Germany, i had no Programming course and i already got help (from Panic Mode :smiling_face: ) with my code but i dont know how and where to place it to get it working.

    Basically i want to use this code to open and Close a Claw with the status keys (when out1 = true then the claw closes).

    But i dont know the basics in KRL programming so the questions i have are:

    Do i have to place the code in a .src file and if so do i have to activate that file somewhere else.

    Or do i have to place these lines of code somewhere else to get it working?

    I changed up thhe code a bit when there are mistakes please correct me.


    Thank you in advance :smiling_face:


  • Place your Ad here!
  • the example starts with line "DEF StatusKeys()"

    so name of the routine is "StatusKeys()"

    if this is globally accessible routine (and it should be if it is saved in own file STATUSKEYS.SRC) then you can call it from submit.


    Open SPS.SUB, expand fold "USER PLC" and in there (green line numbers) you can add name of routine you want to call.

    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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners