In most applications, offsets are so dynamic (often changed) that that you wouldn’t even consider keeping a backup copy. With turning center wear offsets, for example, the operator must often change the value of each to keep parts on size. Additionally, offset values commonly change with each setup. Turning center geometry offsets, for example, rarely remain exactly the same from one time a job is run to the next.
Even when it is feasible to back up your offsets, it is usually pretty simple to write them down and manually create G10 commands. Consider a qualified setup on a machining center that requires only one program-zero assignment. It’s pretty easy to write down the fixture offset settings and plug them into a G10 command.
For these reasons, most control manufacturers provide no way to back up offset settings. By comparison, of course, you can back up your CNC programs and parameter settings. With most machines, doing so requires the use of the communications (serial) port on the machine in conjunction with some kind of distributive numerical control (DNC) system.
But consider a more complicated machining center qualified setup. Maybe the machine is an HMC with a rotary table and two pallets and one program-zero assignment is required for each side of the pallet. This means eight sets of program zero assignment values (48 values) must be backed up. The more sets of values you must deal with, the longer it will take to manually transfer them into G10 commands, and the more prone to errors you’ll be.
A custom macro B function called DPRNT allows you to send data from the machine using the serial port—the same port used to transfer programs and parameters. When used in conjunction with other custom macro B commands, you can have the machine automatically create a complete program containing fixture offsetting G10 commands and send it out through the serial port to your DNC system. These commands will reference the current fixture offset settings. The next time the job is run, you can load and run the G10 program just as you would any other CNC program. Or, you could also copy and paste the G10 commands into the machining program with a text editor.
This custom macro, provided by Steve Legg in Toronto, Canada, will output the fixture offset program through the serial port. It assumes the standard set of (six) fixture offsets is being used and that fixture offset system variables are in the #5200 series. Note that if you have the 48 fixture offset option, this program must be modified, but very similar techniques can be used.
O5555 (Fixture offset output program)
(Operator must set #9)
#9=6. (Number of fixture offsets to output -- Max=6)
#4=1. (Initialize counter)
POPEN (Open the serial port gate)
WHILE [#4 LE #9] DO 1 (Loop to write each fixture offset)
#33=5200. + [#4 * 20.] (Point at current fixture offset system variable)
#32=53. + #4 (G code number for fixture offset)
DPRNT[G#32] (Output fixture offset G code – like G54)
#24=#[#33 + 1.] (X register data)
#25=#[#33 + 2.] (Y register data)
#26=#[#33 + 3.] (Z register data)
#2=#[#33 + 4.] (B register data)
#4=#4 + 1. (Step the counter)
PCLOS (Close the serial port gate)
Here is the program that will be sent through the serial port:
G90 G10 L2 P 1 X- 32.8616 Y- 34.2843 Z- 49.9746 B 269.917
G90 G10 L2 P 2 X- 31.5296 Y- 34.2843 Z- 51.3859 B 359.917
G90 G10 L2 P 3 X- 30.1183 Y- 34.2843 Z- 50.0539 B 89.917
G90 G10 L2 P 4 X- 31.4503 Y- 34.2843 Z- 48.6426 B 179.917
G90 G10 L2 P 5 X- 32.8466 Y- 34.2843 Z- 50.2202 B 280.206
G90 G10 L2 P 6 X- 30.1333 Y- 34.2843 Z- 49.8083 B 100.206
M30blog comments powered by Disqus