Error Message P0158 MISSING "BY"

  • Hello Kawasaki community,


    Recently i've encounter an error P0158 "Missing BY" when trying to use block teach to do POS MOD on a Shift command motion line.


    Example:
    Line 1: LMOVE SHIFT (v25 by 0,10,0)
    Line 2: LMOVE SHIFT (v25 by 0,10,10)
    Line 3: LMOVE SHIFT (v26 by 0,0,100)


    This was carry out on 6-axis robot, RS030N, E02 controller. The program was written in AS language, however the user of this automation is handle by an operator who is only experienced on using block teaching. The objective was to change the master position (v25), but the problem is that "MOD POS" function is unable to recognize this shift command.


    Right now there is 2 propose solution to this problem:
    1. Add in a GOTO label function within the steps to better ease for future changes.


    Line 1: GOTO SKIP:
    Line 2: LMOVE v25
    Line 3: SKIP:

    Line 4: LMOVE SHIFT (v25 by 0,10,0)
    Line 5: LMOVE SHIFT (v25 by 0,10,10)
    Line 6: LMOVE SHIFT (v26 by 0,0,100)


    2. Creating a separate "Teach Utility Program" purely for teaching master positions.


    Do share your opinion on this issue if you think there's some other methods we can utilize to make more convenient for the user.


    Thank you!


    Credits to kwakisaki for sharing his expertise to verify the error and providing a work-around solution.


    :

  • Welcome to the forum...………. :beerchug:


    Yes, a very problematic topic when it comes to operators knowing/comfortable with certain functions/operations already to change positions.


    IMHO
    Keeping things simple is often the best course of action and a simple teach utility is usually welcomed by most operators.


    My No.1 rule is:
    - I am programming for someone else to use/maintain, so program to their capabilities not mine.
    - Understand their current level, offer to increase their current level through training/documentation and if not, keep it simple.
    - If the program/application dictates complex code, then give the end user the best chance of addressing issues easily and effectively.
    - Results in reduced downtime, increased productivity and repeat work for the programmer as a reliable/competent resource.

Advertising from our partners