Parameters are used by control manufacturers to allow machine tool builders – and end users – to specify many things about the individual CNC machine that is attached to the control. Many parameters, like those related to pitch error compensation, are related to functions that are beyond the control of (or interest of) the typical CNC user. Others, like those related to creating user defined G and M codes, are of interest to end users. Some, like those related to circular motion and cutter radius compensation commands, even specify how the control will respond to certain programming commands, and end users should at least know about them.
Parameters of interest to CNC users have been the focus of this newsletter on many occasions. We’ve tried to point out times when you may have one set improperly – or when you might want to change one in order to get your machine to behave more to your liking. Here we’d like to go a step further and give you some ideas for “creating” parameters on your own.
While you won’t be reworking a control to add parameter registers – or rewiring anything to provide new functions, you can emulate a parameter register using a permanent common variable (commonly in the #500 series) or any unused offset register. #500 series permanent common variable values can be entered through the keyboard and display screen, just like offsets. You can even label some of them with a short (eight character) message to indicate its meaning using the SETVN command. Consider this command.
SETVN = 504 (4TH AXIS)
When executed, this command will place the word 4TH AXIS next to the register for permanent common variable number 504.
Having a place to put your parameter value is, of course, only part of making a parameter work. You will also need a way to have the machine interpret the parameter value and behave differently based upon its setting. Custom macro B commands can be used for this purpose, since the allow conditional branching (IF statement). You can test the value of the home-made parameter with an IF statement and make the program execute differently based upon its setting.
The example I offer is related to placing a large fixture or rotary axis on a vertical machining center. When the and heavy fixture is on the machine, you may want the machine to behave differently than when it is not. You may, for example, want to ensure that tool changes do not occur directly over the fixture to avoid the possibility for collisions during tool changes. Or you may want to set a safe index clearance position in the Z axis, making the cutter automatically go to this position when an index is commanded.
It may also be helpful, if not necessary, to use user defined G and M codes for the purpose of keeping from having to modify programs. In the case of the tool change interference concern, we can modify the function of M06 so that the machine executes a special custom macro whenever M06 is executed in a machining program. Here is an example.
O9001 (Custom macro executed when M06 is read)
G91 G28 Z0 (Go to tool change position in Z)
IF [#504 EQ 0] GOTO 80
G91 G28 X0 (If fixture is on table, move to X axis zero return position before tool change)
GOTO 99
N80 M06 (Perform normal function of M06)
M99
To use this custom macro, the setup person or operator will place a zero (0) or one (1) in permanent common variable #504 during setup. A value of zero tells the machine that the large fixture is not on the table. A value of one tells the machine that the fixture is on the table.
After the M06 user defined M code is created using parameter settings (see the custom macro section of your manual to see how this is done), whenever an M06 command is executed in the cutting program, the machine will execute program O9001.
The IF statement checks the current value of permanent common variable #504. If it is a zero, the machine will simple return the Z axis to its tool change position and make the tool change. If it is a one (or any other value), the machine will also send the X axis to its zero return position prior to making the tool change. We’re assuming, of course, that the fixture will be clear of the automatic tool changing device when the machine is at its X axis zero return position.
Comentarios