2012-04-13 20:58:52 (CET)

Parameters/Variables

In the RS274/NGC language view, a machining center maintains an array of 5400 numerical parameters. Many of them have specific uses. The parameter array should persist over time, even if the machining center is powered down. USBCN stores the parameters that have specific use only. This is performed when the user presses the “Save Fixtures” button in the variable view. The specific parameters are listed in the table below.  Other parameters in range of 1..5400 are free to use in your G-Code program.

 

A simple example of usage:

#1=100 ; assign the value 100 to variable #1

G0[#1] ; use #1 to move to 100

 

Predefined variables

 

 

Parameter number Meaning

1-4999

 Free to use, note that 4996 – 4999 are used by the tool length measurement function under user button 2.

4000-4999

 Free to use, persistent.

5001-5006

 POS X – C, interpreter position = work position
 

5008

 Actual TOOL #

5009

 Actual TOOL Radius

5010

 Actual TOOL Z offset

5011

 New tool during tool change

5012

 Actual tool X offset

5013

 Actual G43 Z offset

5014

 Actual G43 X offset

5015 - 5050

 Used in tool change sub routine

5051 - 5056

 Probe position X – C in machine coordinates

5061 - 5066

 Probe position X – C in work coordinates

5067

 1 if probe is triggered after G38.2, 0 otherwise.

5068

 Actual Probe value

5069

 Handwheel counter.

5071-5076

 POS X – C,  interpreter position without offsets = Machine position.
 

5161 - 5166

G28 home X - C

5181 - 5186

 G30 home X - C

5211 - 5216

 G92 offset X - C
 

5220

 Coord. System number

5221 - 5226

 Coord. System 1 X – C

5241 - 5246

 Coord. System 2 X – C

5261 - 5266

 Coord. System 3 X – C

5281 - 5286

 Coord. System 4 X – C

5301 - 5306

 Coord. System 5 X – C

5321 - 5326

 Coord. System 6 X – C

5341 - 5346

 Coord. System 7 X – C

5361 - 5366

 Coord. System 8 X – C

5381 - 5386

 Coord. System 9 X – C

5390

 Spindle selection 0=standard 1-2=Alternate 1-2

5291 - 5393

 Alt spindle offset X - Z
 

5230

 Reserved for rotation coordinate system 1

5250

 Reserved for rotation coordinate system 2

5270

 Reserved for rotation coordinate system 3

5290

 Reserved for rotation coordinate system 4

 5310

 Reserved for rotation coordinate system 5

 5330

 Reserved for rotation coordinate system 6

 5350

 Reserved for rotation coordinate system 7

 5370

 Reserved for rotation coordinate system 8

 5390

 Reserved for rotation coordinate system 9
 

 5398

 Return value for  dlgmsg (+1 OK, -1 Cancel)

 5399

 Return value for M55, M56

 

 5401 – 5416

 Tool z offset (Length) Tool 1 – Tool 16

 5401 – 5416

 Tool diameter Tool 1 – Tool 16

 5601 – 5616

 Tool x offset (for Turning) Tool 1 – Tool 16

 5701 – 5716

 Tool orientation (for Turning) Tool 1 – Tool 16

 

 (Currently supported only Tool 0 .. Tool 16)

 

 

 

 

Tool Orientation for lathes

 

 

 

The blue crosses show the radius center of the tool.

The green crosses show the controlled point depending on the tool orientation. For orientation = 9 there is no offset compensation. For orientation = 2, the compensation in X is –tool radius, in Z also –tool radius.