top of page

A fixture offset calculator custom macro

By Brian Glick of Vermeer Corporation

Here is a macro I developed to allow operators to calculate their own fixture offsets right on the machine. The macro tracks any point on the work piece as it indexes on the rotary axis.

I have an Excel spreadsheet that does this (probably similar in function to the one offered on this site), but the operators have to go find one of the programmers so we can calculate their offsets for them. Meanwhile, the machine is sitting idle. Using this macro the operator can accomplish this without leaving the machine.

Macro instructions for the following example: After touching off the origin of the part on side B270 using work offset G54 you need to calculate the machine coordinates of that same point when the pallet is rotated to B290 using work offset G55.

  • 1. Touch off the main origin that will be used to calculate all the other offsets and enter this value into the correct work offset. We will use G54 for an example.

  • 2. Pull up the macro in Edit mode and enter the work offset number that you just used. This is the offset the macro will read from to perform the calculations. Follow the formatting instructions provided by the comments in the macro. #100 = 54.

  • 3. Enter the B-axis angle that the machine is at when touching off the first work offset. #101=270.

  • 4. Enter the work offset you want to write your new work offset to. #102 = 55.

  • 5. Enter the B-axis angle for the offset you need to calculate. #103 = 290.

  • 6. Reset to the beginning of the program and run the macro. It will read the values out of G54 and calculate them for B290 and write the new values into G55

Note: You can use offsets G54-G59 and G54.1 P1-P48 with this macro. I have it set up to calculate one offset at a time, but it would be possible to have it perform several. If you prefer that no one edited the macro you could remove the first four lines and have the operator enter the values directly into the variables on the macro variable page. This macro requires that variables #530 and #531 are set to equal the machine coordinates for the center of rotation on the X and Z respectively. These two variables are located in the macro itself. Do not change them on the macro variable page or the program will overwrite them. These values will be different from machine to machine so do not copy the macro from one machine to another without changing these variables in the body of the macro.


3,405 views0 comments

Recent Posts

See All
bottom of page