Nachi MZ-12 Offsetting Coordenates on his own

  • Hello everyone,


    I'm trying to create a program using robot language that can palletize, without having to use the "Palletize Function" (The excessive rotations of the robot made me quit trying to use the function and instead opted to create a programme using a pose file and manual shifting).


    The problem is, the robot goes to all the places fine and shifts vertically well, but the different palletizing position are shifting randomly (apparently).


    I use the "System!" function to get the current position of the robot as it reaches the coordinate of the pose file, but, somehow, instead of going to the TCP coordinates of said file, it shifts the X coordinate.


    For example: The pallet has 15 positions, the pose file has also 15 positions. I use "MOVEX" with the coordinates present on the pose file in the final step before setting the piece. But, instead of going to (400,-600,-1000, 0, 0, 0), for example, goes to (410, -600, -1050, 0, 0, 0).


    Here is a small piece of the code that relates to the subject at hand (I'm using "CASE" to define each position)


    (...)

    *POSITION_13

    R1 = (0,0,25*L5%,0,0,0) 'L5 is the variable to used as an aux to increase layers

    P13 = P13 + R1

    MOVEX AP=8, AC=3, SM=0, M1X, L, P13, R=80, H=2, MS, CONF=0010

    DELAY 0.5

    L1% = 14
    (...)

    V10! = SYSTEM!(600)

    V11! = SYSTEM!(601)

    V12! = SYSTEM!(602)

    V13! = SYSTEM!(603)

    V14! = SYSTEM!(604)

    V15! = SYSTEM!(605)

    (...)

    IF (L1%=1) 'L1 is the variable that defines the pallet position

    V10! = V10!-35.0

    ELSEIF (L1%=4)

    V10! = V10!-40.0

    ELSE

    V10! = V10!-45.0

    ENDIF

    DELAY 0.5

    MOVEX AP=8, AC=1, SM=0, M1X, L, (V10!,V11!,V12!,V13!,V14!,V15!), R=50, H=2, MS, CONF=0010 '

    V12! = V12!+300

    MOVEX AP=8, AC=1, SM=0, M1X, L, (V10!,V11!,V12!,V13!,V14!,V15!), R=50, H=2, MS, CONF=0010

    MOVEX AP=8, AC=3, SM=0, M1X, L, (323.247,-679.003,-89.602,-152.526,-0.488,178.877), R=80, H=2, MS, CONF=0010

    (...)


    Hopefully someone in the communitty can shed some light on the matter, since I've tried a lot of things to resolve.


    Thank you in advance for the time spent reading this post :)

  • AD
  • I would be Monitoring the V10 and V12 variables while stepping through the Program and troubleshooting when the V10 changes from 400 to 410 and V12 Changes from -1000 to -1050

    Thank you for the answer. I've tried to monitor that variable, but I can't reach a conclusion, the values seem to add up just fine. Is there a way to monitor de Pn variable, the one related to the pose file?

    I only seem to be able to monitor the Vn! variables and the L% variables.


    Thank you for the help ;)

  • Change the 13. Record of Pose from Disabled to Enabled in the Teach Play Condition setting. Select the appropriate Pose file No to view Pn. Viewing is possible after the Pose file has been executed.

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