Programming

  • 36 and 39 are calling subroutines with parameters...………..CALL program (parameters,parameters,parameters)
    - So the routine called, is also bringing in those parameter values.
    - The '&' means its bringing in location/positional data directly from the location register.
    - It is then feasible the called subroutine(s) are now creating new location values/offsets.
    - You need to look at the subroutines to see how the parsed in parameters are being utilised - probably DECOMPOSE is being used in them.


    I don't like Step 40, this is not recommended (even though Kawasaki is very good at it and 9/10 you get away with it), when you create a precision point from a transform, it is recommended to use a precision point as a physical posture reference.
    Because you could have a couple of different physical postures for the same transform result, by using a reference, eliminates this:
    POINT #temp = mast_loc,#ref

  • It is a location having 2 arrays. Type in the terminal LIST/L p[0,1] and it will return the location of that point. If you will type LIST/L p* it will return all the location saved into the p location with all the arrays.


    For example you can have the same variable name "a" with different arrays :


    a[1] = 10
    a[2] = 20


    or


    a[0,0] = 10
    a[0,1] = 20


    It depends how you will write the program.

  • p[0,1] is a 2 dimensional array.
    - Where 'p' is the array/group name.
    - The numbers [0,1] refer to the 2nd element/index value of that array.
    - Arrays can be used as location variables, real variables and string variables
    - Often considered as lookup tables.


    p0 and p1 are not related to p[x,x] in any way and are totally unique.
    - p0 is the unique name.
    - p1 is the unique name.
    - p[0,1] is the unique name for this element of array p[,].
    - p[0,2] is the unique name for this element of array p[,].


    I assume you have never come across 'arrays' previously then?

  • yes it is first time i am seeing the array in Kawasaki robot. it is first time i am using Kawasaki robot and i don't know about it and programming in it.
    i am professional in other robot brand but i din't use in those.

  • Ok, I definitely recommend a good read of the AS Manual then, especially the section that refers to naming conventions and syntax.
    With using other robots, it shouldn't be too difficult to pick up.
    Unfortunately, Kawasaki manuals do not give you a good write up about arrays but they use the same generic syntax of other languages.


    Any variable in the Kawasaki can be freely named under the following rules:
    - Alphanumerical.
    - Cannot begin with a number, but can contain numbers.
    - Maximum of 15 characters in length.
    - Cannot contain spaces or special characters.
    - If 15 characters is exceeded, excess characters will be removed to reduce to 15 characters.


    Main registers (stored variable names and values):
    - Locations (contain transformation and precision points - Precision points have prefix of #, transformations do not).
    - Real Numbers (basically any number)
    - Strings (messages)


    Any name for any variable is unique to that register.
    Even if the variable name contains a number (eg p1, count1.value), the number contained is 'part of the name' and is just a character.


    Therefore, p0,p1,p2,p3,p4 are all unique and have no commonality between them.
    So these would need addressing as individual variables when required.


    If you wanted to 'group' them under a name called 'p', you would create an array called 'p'.
    You can only have 1 type of array of the unique name.
    Arrays in Kawasaki can be defined as either:
    - p[0] = 1 dimensional
    - p[0,0] = 2 dimensional
    - p[0,0,0] = 3 dimensional


    In the above all 3 arrays are named as 'p' which is not allowed, so you could only have one type of array called 'p'.
    An array is basically a group name and the elements/index values associated with them are 'members' of that group.
    An array can be used/applied to locations, reals and strings.


    If you created an array called programming.
    That would be the array name and all associated members would be an element/index value of that group.


    programming[0] = would be the first member.
    programming[1] = would be the 2nd member.


    If you put that into Kawasaki terms, lets create a string array for this topic.
    This topic contains replies from 3 members.
    So we could use a 1 dimensional array and define them like the following:
    $programming[0] = "Full Member - asgary64"
    $programming[1] = "Full Member - alexandru"
    $programming[2] = "Hero Member - kwakisaki"


    A simple program to print out all the members would be:


    FOR val = 0 to (MAXINDEX("$programming")) STEP 1
    PRINT $programming[val]
    END


    In addition to that, if you needed to add another member to the array, you would then simply put:
    $programming[3] = "Another Member - psycho joe"
    You would execute the above program again and the additional member will now be included.


    If you did not define them as an array and as individual variable names as:
    $programming1 = "Full Member - asgary64"
    $programming2 = "Full Member - alexandru"
    $programming3 = "Hero Member - kwakisaki"


    Then the program would need to address the string variables individually as all of them are unique and not part of an array.


    Hope this helps a little...………...

  • Hi,


    This is a simple post of personal advice based on personal experience.


    as kwakisaki wrote you should read the AS manual before. It's completely different from yaskawa programming (like you I've worked with this robot before using kawa).
    In yaskawa you have a menu for everything(var, job, IO, etc), in kawasaki if you use tha AS language(same level of INFORM) you have to write all the things in a file. In yaskawa you are quite forced to do all the program on the TEACH PENDANT, here using the TP is a nightmare(in my opinion of course). You have simply to write your code and your var on a file and load.


    Here an example of a basic bunch of program with a main and a couple of pos variable



    Hope this help.

  • Quote

    here using the TP is a nightmare(in my opinion of course)


    Heehee...........In part I would agree and in another part I would respectfully disagree (in the nicest way).


    Kawasaki have 2 ways of programming:
    1. BLOCK = Teach Pendant Programming, TP keys are directed for BLOCK Step and parameter inputting.
    2. AS = Language/Code based using OLP (offline programming KROSET) or via terminal editor software (KRTerm/KCWin) live with the robot via laptop.


    When you are conversant with AS format/syntax, what Motouser has stated, is that you can prepare data/programs/variables etc offline using a text editor such as notepad and then load it into the Controller.
    - You will not see this method documented, nor supported from Kawasaki, however when you are conversant with Kawasaki format/syntax, then becomes a preferred type method.


    However, when it comes to modifying an existing position or defining (creating a new one), then you would not need a laptop, you can simply use the TP.
    Ignoring the obvious in terms of Teach Mode settings and safe to move etc.


    Position re-teach or initial teach:
    - Select program
    - Select step no.
    - (Only if the location already exists) CHECK ONCE, CHECK/GO and move to the existing location.
    - Manually move the robot to new desired location.
    - Check correct step is highlighted (it cannot be a step that is a calculated move such as a SHIFT/TRANS).
    - If using array, check index value is correct.
    - Press and hold A, then press POS MOD.
    - Window appears to confirm Yes or No.....Press Yes to update new location.


    Position defining:
    - Manually move robot to desired position.
    - Select Keyboard.
    - Type in HERE 'location_name' and press enter to define and display values (option to adjust) and then press enter again to confirm.
    *** HERE and name without # = transformation.
    *** HERE and #name = Precision Point, Joint Angles, Physical Posture, Absolute Position.


    Then there's the 'I' button......... :love24:
    - Check out the Operation Manual for this little beauty.
    - AS can be achieved using this from the TP with built in pre-registered instructions.
    - I use this a lot when I'm doing some simple changes in the AS coding.............

  • Where can I download (KRTerm/KCWin)? Is it free?
    What is jobs format in Kawasaki robot? I save several file from controller. Which is for job and I must modify it and load on controller after modify?
    The file format that I save:
    *.as , *.au , *.Bas , *.el, *.if , *.pg , *.rb , *.sy

  • You can download from here the terminal. It is free, yes and very basic.


    Kawasaki Online Terminal Editors


    If you remember when you asked about JT5 zeroing, i told you how you can connect with a PC. I suppose you haven't connect with a PC yet.


    All the data is located into the .as file. You can open with notepad++ for example.


    The login password from the beginning is as.


    You don't have to load back all the backup after modifications. Usually i load only the programs that i modify.

    Edited once, last by kwakisaki: 'Hyperlink updated by Moderator' ().

  • Hello Alexandru


    yes you say correct. i don't connect to controller via PC yet because customer is far from us and i will take all information and go to customer site after that. (for modify program and positions). in first step we did zeroing and solve the problem and robot don't have error now.
    I take this backup with USB and SAVE menu. i couldn't find program file separate to save. now, the problem in robot is modify some of position because we did zeroing before and the last positions don't work.
    i see in *.as file there are program but i don't know for modify it. can i modify program in it and load it again or i must take other program file for modify?

  • What kind of positions do you want to modify? The positions are taught points or calculated points? Usually, after the zeroing part you dont need to save again the locations. Can you confirm that the encoder value is correct? The encoder value is starting with 2684...... ?


    For example you have this program :


    .PROGRAM test ()


    IF TASK(1001)<>1 THEN
    PCABORT 1:
    PCEXECUTE 1: can_conveyor
    END
    IF TASK(1002)<>1 THEN
    PCABORT 2:
    PCEXECUTE 2: box_conveyor
    END
    IF TASK(1003)<>1 THEN
    PCABORT 3:
    PCEXECUTE 3: paper
    END
    IF TASK(1004)<>1 THEN
    PCABORT 4:
    PCEXECUTE 4: ifmessages
    END


    .END


    And you want to add something new or modify. You can do a new file in notepad++ and save it with the .as extension (use the Save As function). Dont forget to have a free space on the end of the file. I attached you an example.


    After you modified, you can load only that file that will contain only the program. Not need to load again the full backup.

  • Please see attached file. it is full backup from robot.
    also, there are two picture from Zeroing data and Home 1 position. maybe you can check the backup and say what must i do.
    i have below problem:
    1. there are several job in robot. i can open only main program and i couldn't open other programs.
    2. when i run main program, i go to line HOME and stay in it without moving robot. i think this position must become modify and it set in program with set home instruction not in home 1 page. please say me where in program must become to change.
    3. i don't know the zeroing data is correct or not.
    4. i think in program we must change all of position that robot will move to those. which and how positions?
    5. there are some call instruction with tags. i don't understand about those. for example "CALL subsethighpos(&p[0,0],&p[0,1],ht)" what is it and how can work?

  • 1. there are several job in robot. i can open only main program and i couldn't open other programs.
    - That makes no sense......explain more please.


    2. when i run main program, i go to line HOME and stay in it without moving robot. i think this position must become modify and it set in program with set home instruction not in home 1 page. please say me where in program must become to change.
    - Why do you need to change?
    - If so, move robot to new desired home location and goto AUX 0402 and place tick in current pose (values will change) and press enter.


    3. i don't know the zeroing data is correct or not.
    - Neither do I, but looking at those, robot joints are not at 0 degrees as setting represents 0 and current represents current position.
    - Locate data sheets that were supplied with robot, they have zeroing values from factory.
    - Compare those values with values in AUX 050102.
    - Setting value and Offset Value (next page) should read same as data sheet, unless someone has re-zero'd since delivery from factory.
    - If no mechanical disconnection/encoder/motor/gearbox/belt has changed, the values from data sheet can be entered to return to factory zero.


    4. i think in program we must change all of position that robot will move to those. which and how positions?
    - How do you know, have you checked any of them?
    - In backup you don't have many positions stored.
    - Search for them in backup, then move to them to see where they are, if need adjusting then use procedure I wrote down using teach pendant to change.


    5. there are some call instruction with tags. i don't understand about those. for example "CALL subsethighpos(&p[0,0],&p[0,1],ht)" what is it and how can work?
    - Why do you need to understand these before fixing robot?

  • 1. there are several job in robot. i can open only main program and i couldn't open other programs.
    - That makes no sense......explain more please.


    as you know there are several job on the robot. we can see all of those in program page but we couldn't open subsethighpos or same as these job. we can open only main job. maybe we must open those from other way. for example in Yaskawa robot there are normal job, Macro job and system jobs that open from different menu.



    2. when i run main program, i go to line HOME and stay in it without moving robot. i think this position must become modify and it set in program with set home instruction not in home 1 page. please say me where in program must become to change.
    - Why do you need to change?
    - If so, move robot to new desired home location and goto AUX 0402 and place tick in current pose (values will change) and press enter.


    I did these method (AUX 0402) before but in program there are SET HOME instruction and the home position become change to default by program. i don't know what position must be change in program.


    3. i don't know the zeroing data is correct or not.
    - Neither do I, but looking at those, robot joints are not at 0 degrees as setting represents 0 and current represents current position.
    - Locate data sheets that were supplied with robot, they have zeroing values from factory.
    - Compare those values with values in AUX 050102.
    - Setting value and Offset Value (next page) should read same as data sheet, unless someone has re-zero'd since delivery from factory.
    - If no mechanical disconnection/encoder/motor/gearbox/belt has changed, the values from data sheet can be entered to return to factory zero.


    The robot had a problem in J2 axis encoder. we open encoder cable and close it again. after that we did zeroing only for this axis.


    4. i think in program we must change all of position that robot will move to those. which and how positions?
    - How do you know, have you checked any of them?
    - In backup you don't have many positions stored.
    - Search for them in backup, then move to them to see where they are, if need adjusting then use procedure I wrote down using teach pendant to change.


    We write a simple program for move robot. robot can move with our program but it couldn't move with old program.


    5. there are some call instruction with tags. i don't understand about those. for example "CALL subsethighpos(&p[0,0],&p[0,1],ht)" what is it and how can work?
    - Why do you need to understand these before fixing robot?


    If i understand all lines of program, i can solve the problem better. yes you said correct maybe without this understand i can solve problem too.

  • 1. there are several job in robot. i can open only main program and i couldn't open other programs.
    - That makes no sense......explain more please.


    as you know there are several job on the robot. we can see all of those in program page but we couldn't open subsethighpos or same as these job. we can open only main job. maybe we must open those from other way. for example in Yaskawa robot there are normal job, Macro job and system jobs that open from different menu.


    I have it in KROSET now and freely select any program I require from the Teach Pendant Program drop down window.
    - Yes, it appears everything has been lumped into 1 main program, but nothing prevents selecting any program.


    2. when i run main program, i go to line HOME and stay in it without moving robot. i think this position must become modify and it set in program with set home instruction not in home 1 page. please say me where in program must become to change.
    - Why do you need to change?
    - If so, move robot to new desired home location and goto AUX 0402 and place tick in current pose (values will change) and press enter.


    I did these method (AUX 0402) before but in program there are SET HOME instruction and the home position become change to default by program. i don't know what position must be change in program.


    Your Home position is being created from a master location called p[0,1]
    - Search for POINT #hm = p[0,1]
    - It then decomposes joint angles of all axes, and depending on Joint 6 angle, then modifies #hm position.
    - Then the SETHOME is being used to teach the HOME location.
    - So you cannot re-teach the home location that way, you need to look at location p[0,1].
    - Why not create a new program with all positions in with JMOVES so you can jog freely to test them?


    3. i don't know the zeroing data is correct or not.
    - Neither do I, but looking at those, robot joints are not at 0 degrees as setting represents 0 and current represents current position.
    - Locate data sheets that were supplied with robot, they have zeroing values from factory.
    - Compare those values with values in AUX 050102.
    - Setting value and Offset Value (next page) should read same as data sheet, unless someone has re-zero'd since delivery from factory.
    - If no mechanical disconnection/encoder/motor/gearbox/belt has changed, the values from data sheet can be entered to return to factory zero.


    The robot had a problem in J2 axis encoder. we open encoder cable and close it again. after that we did zeroing only for this axis.


    So can you check values with datasheet like I suggest and re-enter them and confirm?


    4. i think in program we must change all of position that robot will move to those. which and how positions?
    - How do you know, have you checked any of them?
    - In backup you don't have many positions stored.
    - Search for them in backup, then move to them to see where they are, if need adjusting then use procedure I wrote down using teach pendant to change.


    We write a simple program for move robot. robot can move with our program but it couldn't move with old program.


    Look at ALL locations in your backup, then write program containing on each step only:
    - JMOVE location
    - JMOVE location
    - JMOVE location
    When written select program on Teach Pendant, then use CHECK ONCE/CHECK GO to move to each position and see where they are.
    - If any need changing, then adjust and then A and POS MOD button on the same step to re-teach.


    5. there are some call instruction with tags. i don't understand about those. for example "CALL subsethighpos(&p[0,0],&p[0,1],ht)" what is it and how can work?
    - Why do you need to understand these before fixing robot?


    If i understand all lines of program, i can solve the problem better. yes you said correct maybe without this understand i can solve problem too.


    Yes, I understand, but your problem is positions, resolve these then understand what is happening after.

  • I have it in KROSET now and freely select any program I require from the Teach Pendant Program drop down window.
    - Yes, it appears everything has been lumped into 1 main program, but nothing prevents selecting any program.


    I will check it again in real robot. Maybe I have mistake to open jobs.


    Your Home position is being created from a master location called p[0,1]
    - Search for POINT #hm = p[0,1]
    - It then decomposes joint angles of all axes, and depending on Joint 6 angle, then modifies #hm position.
    - Then the SETHOME is being used to teach the HOME location.
    - So you cannot re-teach the home location that way, you need to look at location p[0,1].
    - Why not create a new program with all positions in with JMOVES so you can jog freely to test them?


    Ok. I understant what must I do. I will check all positions in other program.


    So can you check values with datasheet like I suggest and re-enter them and confirm?


    I will check all value in zeroing page with datasheet. Are there any key to move robot to zeroing data? For example robot is in other position and I will move it to zeroing position . How can I do it?



    Look at ALL locations in your backup, then write program containing on each step only:
    - JMOVE location
    - JMOVE location
    - JMOVE location
    When written select program on Teach Pendant, then use CHECK ONCE/CHECK GO to move to each position and see where they are.
    - If any need changing, then adjust and then A and POS MOD button on the same step to re-teach.


    I understand. I will do it for check position.



    Yes, I understand, but your problem is positions, resolve these then understand what is happening after.


    Yes, maybe I understand what it do after solve problem.

Advertising from our partners