Support to make this code

  • hey guys i made this code in fanuc, it travels in a circular trayecory , i wanted to recreate this code on a mh5 but fail miserably, the problem its that when using sin and cos function on the mh5 those return a R o REAL value, and when trying to use the equivalent command of PR on this robot(set the value of x or y set POOO (N) D000 ) those variables on robot position varables ask for a Double data, what can i do?


    L PR [1] (MOVE ROBOT TO THE CENTER OF THE FRAME)

    FOR R[1]=0 TO 360

    R[2]=COS(R[1])*100

    R[3]=SIN(R[1])*100

    PR[2,1]=R[2]

    PR[2,2]=R[3]

    L PR [2]


    SEND HELP PLEASE=O

  • AD
  • I don't have a robot nor MotoSim at hand to take a look, but I'm 99% that you can get the value from R to D using SET instruction. You might need to multiply (MUL) the value by 1000 before you do that to get a correct value to X or Y of a P-variable (using SETE instruction).


    I have done such calculations on a DX200.

  • ok so i find the wait to do it, I would like to give a better explanation of what it is that I wanted to do, but I am very bad giving explanations, what I was that when the robot reached the pr2 position if it in that point a di get activated, the position information would be saved, or something like that


    L PR [1] (MOVE ROBOT TO THE CENTER OF THE FRAME)

    FOR R[1]=0 TO 360

    R[2]=COS(R[1])*100

    R[3]=SIN(R[1])*100

    PR[2,1]=R[2]

    PR[2,2]=R[3]

    L PR [2]

    if di=on

    (STORE POSOTION INFORMATION)


    thanks for the support

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