Mitsubishi Robot Programming

  • Hi

    I am new in Mitsubishi Robot programming and need some help. I use at present RT TOOL BOX 3. I want to rotate the joint 6 with "for loop" 10 times(for an example 360/10=36deg each time). How can I rotate the Joint 6 with "for loop" :question_mark:

    Thank you.

  • Thank you dear.

    It helps me lot.

    It is working now. Just another question. When I add 30 (or 36 just or examin the program) with Joint 6 it goes out of range. Therefore I set J6 in -360 (current positioning value) and in program add 1, then it rotet joint 6 about 22 deg. Is this becasue that the numerical number,which I add ( Jposition.J6=J_curr.J6+1) is act like mm not as deg.

  • :grinning_squinting_face:

    its in RADs.... at least on my RT toolbox... so +1 mean +57degs aprox


    EDIT: aslo somewhere in paramaters, therre is moition range for axis, i think 6th axis can be set as you want(ie -3600 to +3600), but not sure now

  • HI

    I have one question. Is it possible to write a programm that roboter goes up and joint 6 rotet 1 time then it goes down and comes up same height and then rotet joint 6 again 1 time. this process run may be 10 times. I try with for loop with previous code, but problem is every time joint 6 comes to its initial position and then rotet. I understand the cause behind that. If I try to save the position Upward or downward of the roboter with P_Curr it saves only either upwards or downwards position and joint 6 comes back to its initial position.

    Or I need to teach the robot 10 times seperately.

  • you probably should start by doing it in same kind of coords, using only Jxxx or Pxxx

    Jxxx is coord saved in joints angles

    Pxxx is coord saved in XYZABC


    it could be hard for controler to calculate trajectory from Pxxx to Jxxx with big diferences and short distance between

  • HI

    I have fixed the problem, just littel bit problem inside. every time it comes more down to actual position. Do you have any idea how I can resolve this problem

    you are changing Z coord, it has to come lower each cycle, if you want to it go down and back you have to change Z back somewhere in cycle

  • Hello!


    You can try something like this:


    Tool 0

    *loop

    JCurrPos = J_Curr 'Starting Position

    JCurrPos.J6 = Rad(-36) 'Set J6 axis to -36 degrees

    Mov JCurrPos 'Rotate J6 aaxis to -36 degrees

    'Initialize for loop

    M1=1

    MEnd = 10

    For M1=1 to MEnd

    MRotAngle = Rad(360/MEnd) 'Calculate rotation angle for each iteration in radians

    JOffset = SetJnt(0,0,0,0,0,M1*MRotAngle) ' Set offset

    Mov JCurrPos + JOffset 'Rotate 6 axis

    Dly 1 'Dly for better visualization

    Next M1

    GoTo *loop


    But I don't know if it is the easiest way.

    Let me know if you find better one :smiling_face:

  • Maybe you just try this code

    '=================================

    For M1 = 1 To 10 Step 1

    '(X,Y,Z,A,B,C)

    P1 = P1 + (0,0,0,0,0,10)

    Mvs P1

    Dly 2

    Next M1

    '=================================


    in axis 6 is parameter C in position and use P1 + (X,Y,Z) to chage coordinate tool

    but becareful in axis 6 if you rotate to 360 degree will be alarm over limit.

    just set to 359 degree or lower

Advertising from our partners