I wrote a weld program that calculates a perfect circle. It uses 2 Position registers that are set on each side of the circle. The Y data from these 2 points are used to calculate the center point and radius. I made a formula that will use the information to calculate all the coordinates for 9 points around a perfect circle. My 9th point being the overlap. My goal was to make a program that does not need to be adjusted on X,Y, W,P, or R. Team leaders can only adjust the Z. I am using a PR offset for each point that gets the offset data from a register. My plan is to set this up on the HMI screen so they wont even have to touch the controller. But to test it out I'm offsetting by putting numbers directly into the registers. I'm not using Lock/Unlock PREG because I want them to have the option to use the controller if something were to happen. So at start up, when i run the first part, the robot moves to the point before the first point (PR) of my circle and stops. It says UOP signal lost and will not advance. The only way to get it to run is to take it back to home position, reset everything and run again. It will work the rest of the time unless the controller is used during the program to teach a point and it is restarted from the beginning of the weld. I'm thinking that if I used Lock/Unlock PREG this might fix the problem but I'm looking for a way around this.
This is an example of my points:
89:L PR[10] WELD_SPEED FINE
: Arc Start[1] Offset,PR[20] ;
90:C PR[11] Offset,PR[21]
: PR[12] WELD_SPEED CNT100 Offset,PR[22] ;
I appreciate any input. Thank You.