Position Register Invalid Index

  • Attached are images of what I've programmed.

    Specifically, I'm at a loss of what's going on with lines 19 and 20 with the red 3 values.


    19: PR[GP1:13,3]=PR[13,3]+4

    20: PR[GP1:14,3]=PR[14,3]+4


    I'm attempting to set a looped program where it goes through and adds 4mm to the Z axis as many times as I tell it to.

    However, I can only get the robot to cycle with an offset in the x-axis and y-axis using either a 1 for x or a 2 y where the 3 currently is in lines 19 and 20. Placing a 3 in there instead of a 1 or 2 doesn't work. I assumed a 3 would be for the Z-axis, as 1 works for X, and 2 works for Y, I feel it would be logical that 3 would be for Z. Apparently not? I get an error when I attempt to run the program and it gets right up to where it's about to index over. It throws a code "INTP-204 (PROGRAM TITLE, 19) Invalid value for index"

    Again, it works flawlessly when either a 1 for the x-axis or a 2 for the y-axis are put in where the 3 is. As soon as I put a 3 in there, the program always stops right before it executes the first index. Any ideas would be highly appreciated. The goal is to have a program that brings the robot down into place to place a weld on a shaft that rotates on group 2 (rotary table). Then, as soon as the first weld is completed and the gas post flow is done, I want the robot to back up slightly higher and higher essentially laying weld after weld right on top of the previous weld and the previous weld, slowly building up a surface, almost acting like a 3D-printer. I believe I am close with what I have.

  • 3 Motion groups. Group 1 is the robot itself. Group 2 is the fanuc xy rotary table. Group 3 is an old mori seiki pallet changer out of a mh-50 cnc in station 2. I'm welding in station 1. I'm spinning group 2 while holding the robot tungsten still in group 1. Then trying to shift group 1 up in the Z-axis. For PR[13] and PR [14], I recorded those as the weld start and weld end positions. So PR[13] was recorded as the weld start, and PR[14] as the weld end, which is exactly how it was done for my other shaft weld program. In that program, I have the same exact program but it shifts in the x-axis 4 mm at a time, to lay beads down the length of an armature shaft. For that program though, I'm using PR[2] and PR[3], but using the same concept, PR[2] is the weld start, and PR[3] is the weld end. I copied everything the same, but changed the position registers to the next unused ones in my list which are 13 and 14, and taught the new weld start and end positions in space, and changed the 1s to 3s.

  • Normally your code would be good, but in this case I think it has something to do with the other motion groups.


    An easy work around would be to keep track of this value in a separate register, R, just for the z value. Like this:


    R[x] = R[x] + 4;

    PR[GP1:13,3]=R[x];

  • You said that group 2 is a XY rotary table. Maybe it has something to do with that. Did you try to assign the values by clearly using the motion group also on the right side of the statement?


    I have not tested if it works like this but you can try:


    PR[GP1:13,3]=PR[GP1:13,3]+4

    PR[GP1:14,3]=PR[GP1:14,3]+4

Advertising from our partners