I use a FANUC M710i with RJ-2 controller –a pretty old robot- in a working cell to grind different kinds of pieces. The automation also consists of a barrel magazine that the pieces are stored and a Cartesian manipulator that picks the piece returns to a referenced position where the robot places the finished workpiece and takes the next one. Manipulator then stores the finished workpiece takes the next one etc etc etc.
There is a MAIN_PRG which handles the connection between the robot and the automation that is, the points where the robot picks and places the part, a counter that stores the pieces done so far with an if branch, a call statement that calls the grind process routine depending the workpiece, and several DOs and DIs to handle the automation. The MAIN_PRG is always the same no matter the workpiece.
So my question is this:
What is the most efficient way, inside the routine to use offset positions for a given set of points? I have wheels that “drop” really fast so I need for a set of points lets say 6, every 15 pieces done to “increment” lets say the X axis 1mm forward to compensate for the wheel getting smaller. Could I use the counter from the MAIN_PRG inside the routine ?