1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990
|
def gcode_titles():
titles = {'G0': 'Coordinated Motion at Rapid Rate',
'G1': 'Coordinated Motion at Feed Rate',
'G2': 'Coordinated CW Helical Motion at Feed Rate',
'G3': 'Coordinated CCW Helical Motion at Feed Rate',
'G4': 'Dwell',
'G5': 'Cubic Spline',
'G5.1': 'Quadratic B-Spline',
'G5.2': 'NURBS, add control point',
'G5.3': 'NURBS, close control point',
'G7': 'Diameter Mode (lathe)',
'G8': 'Radius Mode (lathe)',
'G10': 'Offsets L1, L2, L10, L11, L20',
'G10L1': 'Set Tool Table Entry',
'G10L2': 'Set Tool Table, Calculated, Workpiece',
'G10L10': 'Set Tool Table, Calculated, Fixture',
'G10L11': 'Coordinate System Origin Setting',
'G10L20': 'Coordinate System Origin Setting Calculated',
'G17': 'Plane Select XY',
'G18': 'Plane Select XZ',
'G19': 'Plane Select YZ',
'G17.1': 'Plane Select UV',
'G17.2': 'Plane Select WU',
'G17.3': 'Plane Select VW',
'G18.1': 'Plane Select WU',
'G20': 'Set Units to Inch',
'G21': 'Set Units to Millimeters',
'G28': 'Go to Predefined Position',
'G28.1': 'Set Predefined Position',
'G30': 'Go to Predefined Position',
'G30.1': 'Set Predefined Position',
'G33': 'Spindle Synchronized Motion',
'G33.1': 'Rigid Tapping',
'G38.2': 'Probing Toward Workpiece, Signal Error',
'G38.3': 'Probing Toward Workpiece',
'G38.4': 'Probing Away Workpiece, Signal Error',
'G38.5': 'Probing Away Workpiece',
'G40': 'Cancel Cutter Compensation',
'G41': 'Cutter Compensation, Left of Programmed Path',
'G41.1': 'Dynamic Cutter Compensation, Left of Path',
'G42': 'Cutter Compensation, Right of Programmed Path',
'G42.1': 'Dynamic Cutter Compensation, Right of Path',
'G43': 'Use Tool Length Offset from Tool Table',
'G43.1': 'Dynamic Tool Length Offset',
'G43.2': 'Apply additional Tool Length Offset',
'G49': 'Cancel Tool Length Offset',
'G52': 'Local Coordinate System Offset',
'G53': 'Move in Machine Coordinates',
'G54': 'Select Coordinate System 1',
'G55': 'Select Coordinate System 2',
'G56': 'Select Coordinate System 3',
'G57': 'Select Coordinate System 4',
'G58': 'Select Coordinate System 5',
'G59': 'Select Coordinate System 6',
'G59.1': 'Select Coordinate System 7',
'G59.2': 'Select Coordinate System 8',
'G59.3': 'Select Coordinate System 9',
'G61': 'Exact Path Mode',
'G61.1': 'Exact Stop Mode',
'G64': 'Path Control Mode with Tolerance',
'G73': 'Drilling Cycle with Chip Breaking',
'G74': 'Left-hand Tapping Cycle with Dwell',
'G76': 'Multi-pass Threading Cycle (Lathe)',
'G80': 'Cancel Motion Modes',
'G81': 'Drilling Cycle',
'G82': 'Drilling Cycle with Dwell',
'G83': 'Drilling Cycle with Peck',
'G84': 'Right-hand Tapping Cycle with Dwell',
'G85': 'Boring Cycle, No Dwell, Feed Out',
'G86': 'Boring Cycle, Stop, Rapid Out',
'G89': 'Boring Cycle, Dwell, Feed Out',
'G90': 'Absolute Distance Mode',
'G90.1': 'Absolute Distance Mode IJK Arc Offsets',
'G91': 'Incremental Distance Mode',
'G91.1': 'Incremental Distance Mode IJK Arc Offsets',
'G92': 'Coordinate System Offset',
'G92.1': 'Reset G92 Offsets, Reset Parameters',
'G92.2': 'Reset G92 Offsets, Keep Parameters ',
'G92.3': 'Restore G92 Offsets',
'G93': 'Feed Rate Inverse Time Mode',
'G94': 'Feed Rate Units per Minute Mode',
'G95': 'Feed Rate Units per Revolution Mode',
'G96': 'Spindle Control Constant Surface Speed Mode',
'G97': 'Spindle Control RPM Mode',
'G98': 'Canned Cycle Return Level',
'G99': 'Canned Cycle Return Level',
'M0': 'Program Pause',
'M1': 'Program Pause if Optional Stop is Enabled',
'M2, M30': 'Program End',
'M3': 'Spindle Start Clockwise',
'M4': 'Spindle Start Counterclockwise',
'M5': 'Spindle Stop',
'M6': 'Tool Change',
'M7': 'Mist Coolant On',
'M8': 'Flood Coolant On',
'M9': 'Flood and Mist Coolant Off',
'M19': 'Orient Spindle',
'M48': 'Enable Spindle Speed and Feed Rate Override',
'M49': 'Disable Spindle Speed and Feed Rate Override',
'M50': 'Feed Override Control',
'M51': 'Spindle Speed Override Control',
'M52': 'Adaptive Feed Control',
'M53': 'Feed Stop Control',
'M61': 'Set Current Tool',
'M62': 'Turn On Digital Output Synchronized with Motion',
'M63': 'Turn Off Digital Output Synchronized with Motion',
'M64': 'Turn On Digital Output Immediately',
'M65': 'Turn Off Digital Output Immediately',
'M66': 'Wait on Input',
'M67': 'Set an Analog Output Synchronized with Motion',
'M68': 'Set an Analog Output Immediately',
'M70': 'Save Modal State',
'M71': 'Invalidate Stored Modal State',
'M72': 'Restore Modal State',
'M73': 'Save and Autorestore Modal State',
'M98': 'Call Faunc Style Subroutine',
'M99': 'Return from Fanuc Style Subroutine', }
return titles
def gcode_words():
words = {'G0': ['X', 'Y', 'Z'],
'G1': ['X', 'Y', 'Z'],
'G2': ['X', 'Y', 'Z', 'I', 'J', 'K', 'R', 'P'],
'G3': ['X', 'Y', 'Z', 'I', 'J', 'K', 'R', 'P'],
'G4': ['P'],
'G5': ['I', 'J', 'P', 'Q'],
'G5.1': ['I', 'J'],
'G5.2': ['P', 'L'],
'G10': ['L'],
'G10L1': ['P', 'X', 'Y', 'Z', 'R', 'I', 'J', 'Q'],
'G10L2': ['P', 'X', 'Y', 'Z', 'R'],
'G10L10': ['P', 'X', 'Y', 'Z', 'R', 'I', 'J', 'Q'],
'G10L11': ['P', 'X', 'Y', 'Z', 'R', 'I', 'J', 'Q'],
'G10L20': ['P', 'X', 'Y', 'Z'],
'G33': ['X', 'Y', 'Z', 'K', '$'],
'G33.1': ['X', 'Y', 'Z', 'K', '$'],
'G38.2': ['X', 'Y', 'Z'],
'G38.3': ['X', 'Y', 'Z'],
'G38.4': ['X', 'Y', 'Z'],
'G38.5': ['X', 'Y', 'Z'],
'G41': ['D'],
'G41.1': ['D', 'L'],
'G42': ['D'],
'G42.1': ['D', 'L'],
'G43': ['H'],
'G43.1': ['X', 'Y', 'Z'],
'G43.2': ['H'],
'G52': ['X', 'Y', 'Z'],
'G53': ['X', 'Y', 'Z'],
'G64': ['P', 'Q'],
'G73': ['X', 'Y', 'Z', 'R', 'Q', 'L'],
'G74': ['X', 'Y', 'Z', 'R', 'L', 'P', '$'],
'G76': ['P', 'Z', 'I', 'J', 'K', 'Q', 'H', 'E', 'L', '$'],
'G81': ['X', 'Y', 'Z', 'R', 'L'],
'G82': ['X', 'Y', 'Z', 'R', 'L', 'P'],
'G83': ['X', 'Y', 'Z', 'R', 'L', 'Q'],
'G84': ['X', 'Y', 'Z', 'R', 'L', 'P', '$'],
'G85': ['X', 'Y', 'Z', 'R', 'L'],
'G86': ['X', 'Y', 'Z', 'R', 'L', 'P', '$'],
'G89': ['X', 'Y', 'Z', 'R', 'L', 'P'],
'G92': ['X', 'Y', 'Z'],
'G96': ['D', 'S', '$'],
'G97': ['S', '$'],
'M1': ['P', 'Q'],
'M3': ['S', '$'],
'M4': ['S', '$'],
'M19': ['R', 'Q', 'P', '$'],
'M50': ['P'],
'M51': ['P', '$'],
'M52': ['P'],
'M61': ['Q'],
'M62': ['P'],
'M63': ['P'],
'M64': ['P'],
'M65': ['P'],
'M66': ['P', 'E', 'L', 'Q'],
'M67': ['E', 'Q'],
'M68': ['E', 'Q'], }
return words
def gcode_descriptions(gcode):
gcodeTitle = {'G0': G0,
'G1': G1,
'G2': G2,
'G3': G3,
'G4': G4,
'G5': G5,
'G5.1': G5_1,
'G5.2': G5_2,
'G5.3': G5_3,
'G7': G7,
'G8': G8,
'G10L1': G10L1,
'G10L2': G10L2,
'G10L10': G10L10,
'G10L11': G10L11,
'G10L20': G10L20,
'G17': G17,
'G18': G18,
'G19': G19,
'G17.1': G17_1,
'G18.1': G18_1,
'G19.1': G19_1,
'G20': G20,
'G21': G21,
'G28': G28,
'G28.1': G28_1,
'G30': G30,
'G30.1': G30_1,
'G33': G33,
'G33.1': G33_1,
'G38.2': G38_2,
'G38.3': G38_3,
'G38.4': G38_4,
'G38.5': G38_5,
'G40': G40,
'G41': G41,
'G41.1': G41_1,
'G42': G42,
'G42.1': G42_1,
'G43': G43,
'G43.1': G43_1,
'G43.2': G43_2,
'G49': G49,
'G52': G52,
'G53': G53,
'G54': G54,
'G55': G55,
'G56': G56,
'G57': G57,
'G58': G58,
'G59': G59,
'G59.1': G59_1,
'G59.2': G59_2,
'G59.3': G59_3,
'G61': G61,
'G61.1': G61_1,
'G64': G64,
'G73': G73,
'G74': G74,
'G76': G76,
'G80': G80,
'G81': G81,
'G82': G82,
'G83': G83,
'G84': G84,
'G85': G85,
'G86': G86,
'G89': G89,
'G90': G90,
'G90.1': G90_1,
'G91': G91,
'G91.1': G91_1,
'G92': G92,
'G92.1': G92_1,
'G92.2': G92_2,
'G92.3': G92_3,
'G93': G93,
'G94': G94,
'G95': G95,
'G96': G96,
'G97': G97,
'G98': G98,
'G99': G99, }
if gcode in gcodeTitle:
return gcodeTitle[gcode]
else:
return ''
# Maximum Width is 58
G0 = """G0 axes
Coordinated motion at maximum speed
"""
G1 = """G1 axes
Coordinated motion at feed speed
"""
G2 = """G2 Coordinated CW Helical Motion at Feed Rate
Center Format G2 axes offsets <P>
XY plane (G17) Z = helix I = X offset J = Y offset
XZ plane (G18) Y = helix I = X offset K = Z offset
YZ plane (G19) X = helix J = Y offset K = Z offset
P = Number of Turns
Radius Format G2 axes R <P>
R = Radius from Current Position
"""
G3 = """G3 Coordinated CCW Helical Motion at Feed Rate
Center Format G3 axes offsets <P>
XY plane (G17) Z = helix I = X offset J = Y offset
XZ plane (G18) Y = helix I = X offset K = Z offset
YZ plane (G19) X = helix J = Y offset K = Z offset
P = Number of Turns
Radius Format G3 axes R <P>
R = Radius from Current Position
"""
G4 = """G4 P
Dwell program for P seconds, floating point.
"""
G5 = """G5 Cubic Spline
G5 X Y <I J> P Q
I = X incremental offset from start point to first
control point
J = Y incremental offset from start point to first
control point
P = X incremental offset from end point to second
control point
Q = Y incremental offset from end point to second
control point
G5 creates a cubic B-spline in the XY plane with
the X and Y axes only.
P and Q must both be specified for every G5
command.
"""
G5_1 = """G5.1 Quadratic Spline
G5.1 X Y I J
I = X incremental offset from start point to
control point
J = Y incremental offset from start point to
control point
G5.1 creates a quadratic B-spline in the XY plane
with the X and Y axis only. Not specifying I or J
gives zero offset for the unspecified axis, so one
or both must be given.
"""
G5_2 = """G5.2 is for opening the data block defining a NURBS
"""
G5_3 = """G5.3 is for closing the data block defining a NURBS
"""
G7 = """G7 Lathe Diameter Mode
"""
G8 = """G8 Lathe Radius Mode
"""
G10L1 = """G10 L1 Set Tool Table
G10 L1 P axes <R I J Q>
Set Tool Table
P = tool number
R = radius of tool
I = front angle (lathe)
J = back angle (lathe)
Q = orientation (lathe)
G10 L1 sets the tool table for the P tool number
to the values of the words.
"""
G10L2 = """G10 L2 Set Coordinate System
G10 L2 P <axes R>
P = coordinate system (0-9)
R = rotation about the Z axis
G10 L2 offsets the origin of the axes in the
coordinate system specified to the value of the
axis word.
"""
G10L10 = """G10 L10 Set Tool Table
G10 L10 P axes <R I J Q>
P =- tool number
R = radius of tool
I = front angle (lathe)
J = back angle (lathe)
Q = orientation (lathe)
G10 L10 changes the tool table entry for tool P so
that if the tool offset is reloaded, with the
machine in its current position and with the
current G5x and G52/G92 offsets active, the
current coordinates for the given axes will become
the given values.
"""
G10L11 = """G10 L11 Set Tool Table
G10 L11 P axes <R I J Q>
P = tool number
R = radius of tool
I = front angle (lathe)
J = back angle (lathe)
Q = orientation (lathe)
G10 L11 is just like G10 L10 except that instead
of setting the entry according to the current
offsets, it is set so that the current coordinates
would become the given value if the new tool
offset is reloaded and the machine is placed in
the G59.3 coordinate system without any G52/G92
offset active.
"""
G10L20 = """G10 L20 Set Coordinate System
G10 L20 P- axes
P - coordinate system (0-9)
G10 L20 is similar to G10 L2 except that instead
of setting the offset/entry to the given value, it
is set to a calculated value that makes the
current coordinates become the given value.
"""
G17 = """G17 Plane Select
G17 = XY Plane
"""
G18 = """G18 Plane Select
G18 = ZX Plane
"""
G19 = """G19 Plane Select
G19 = YZ Plane
"""
G17_1 = """G17.1 Plane Select
G17.1 = UV Plane
The UV plane does not support arcs.
"""
G18_1 = """G18.1 Plane Select
G18.1 = WU Plane
The WU plane does not support arcs.
"""
G19_1 = """G19.1 Plane Select
G19.1 = VW Plane
The VW plane does not support arcs.
"""
G20 = """G20 Inch Units
"""
G21 = """G21 Millimeter Units
"""
G28 = """G28 Go to Predefined Position
G28 uses the values stored in parameters 5161-5169
as the X Y Z A B C U V W final point to move to.
The parameter values are absolute machine
coordinates in the native machine units as
specified in the INI file. All axes defined in the
INI file will be moved when a G28 is issued. If no
positions are stored with G28.1 then all axes will
go to the machine origin.
G28 - makes a rapid move from the current position
to the absolute position of the values in
parameters 5161-5166.
G28 axes - makes a rapid move to the position
specified by axes including any offsets, then will
make a rapid move to the absolute position of the
values in parameters 5161-5166 for all axes
specified. Any axis not specified will not move.
"""
G28_1 = """G28.1 Set Predefined Position
G28.1 - stores the current absolute position into
parameters 5161-5166.
"""
G30 = """G30 Go to Predefined Position
G30 uses the values stored in parameters 5181-5189
as the X Y Z A B C U V W final point to move to.
The parameter values are absolute machine
coordinates in the native machine units as
specified in the INI file. All axes defined in the
INI file will be moved when a G28 is issued. If no
positions are stored with G28.1 then all axes will
go to the machine origin.
G30 parameters will be used to move the tool when
a M6 is programmed if TOOL_CHANGE_AT_G30=1 is in
the [EMCIO] section of the INI file.
G30 - makes a rapid move from the current position
to the absolute position of the values in
parameters 5181-5189.
G30 axes - makes a rapid move to the position
specified by axes including any offsets, then will
make a rapid move to the absolute position of the
values in parameters 5181-5189 for all axes
specified. Any axis not specified will not move.
"""
G30_1 = """G30.1 Set Predefined Position
G30.1 - stores the current absolute position into
parameters 5181-5189.
"""
G33 = """G33 Spindle Synchronized Motion
G33 X Y Z K $
K = Distance per revolution
$ = Spindle to use, optional
For spindle-synchronized motion in one direction,
code G33 X- Y- Z- K- where K gives the distance
moved in XYZ for each revolution of the spindle.
"""
G33_1 = """Rigid Tapping
G33.1 X Y Z K I $
K = distance per revolution
I = optional spindle speed multiplier for faster
return
$ = optional spindle selector
G33.1 moves from the current coordinate to the
specified coordinate, synchronized with the
selected spindle at the given ratio and starting
from the current coordinate with a spindle index
pulse.
Note: To tap a straight hole a pre-position move
to the desired X Y coordinates before issuing a
G33.1.
"""
G38_2 = """G38.2 Straight Probe
G38.2 axes
G38.2 - probe toward workpiece, stop on contact,
signal error if failure
Program G38.2 axes to perform a straight probe
operation. The axis words are optional, except
that at least one of them must be used. The axis
words together define the destination point that
the probe will move towards, starting from the
current location. If the probe is not tripped
before the destination is reached G38.2 will
signal an error.
"""
G38_3 = """G38.3 Straight Probe
G38.3 axes
G38.3 - probe toward workpiece, stop on contact
Program G38.2 axes to perform a straight probe
operation. The axis words are optional, except
that at least one of them must be used. The axis
words together define the destination point that
the probe will move towards, starting from the
current location. If the probe is not tripped
before the destination is reached G38.2 will
signal an error.
"""
G38_4 = """G38.4 Straight Probe
G38.4 axes
G38.4 = probe away from workpiece, stop on loss of
contact, signal error if failure
Program G38.4 axes to perform a straight probe
operation. The axis words are optional, except
that at least one of them must be used. The axis
words together define the destination point that
the probe will move towards, starting from the
current location. If the probe is not tripped
before the destination is reached G38.4 will
signal an error.
"""
G38_5 = """G38.5 Straight Probe
G38.5 axes
G38.5 = probe away from workpiece,
stop on loss of contact
Program G38.5 axes to perform a straight probe
operation. The axis words are optional, except
that at least one of them must be used. The axis
words together define the destination point that
the probe will move towards, starting from the
current location.
"""
G40 = """G40 Cutter Compensation Off
G40 - turn cutter compensation off. If tool
compensation was on the next move must be a linear
move and longer than the tool diameter.
"""
G41 = """G41 Cutter Compensation Left of Path
G41 D
D = tool number
The D word is optional; if there is no D word the
radius of the currently loaded tool will be used
(if no tool is loaded and no D word is given,
a radius of 0 will be used).
"""
G41_1 = """G41.1 Dynamic Cutter Compensation Left of Path
G41.1 D L
D = cutter diameter
L = lathe tool orientation
"""
G42 = """G42 Cutter Compensation Right of Path
G42 D
D = tool number
The D word is optional; if there is no D word the
radius of the currently loaded tool will be used
(if no tool is loaded and no D word is given,
a radius of 0 will be used).
"""
G42_1 = """G42.1 Dynamic Cutter Compensation Right of Path
G41.1 D L
D = cutter diameter
L = lathe tool orientation
"""
G43 = """G43 Tool Length Offset
G43 H
H = tool number (optional)
G43 enables tool length compensation. G43 changes
subsequent motions by offsetting the axis
coordinates by the length of the offset. G43 does
not cause any motion. The next time a compensated
axis is moved, that axis's endpoint is the
compensated location.
G43 without an H word uses the currently loaded
tool from the last Tn M6.
G43 Hn uses the offset for tool n.
"""
G43_1 = """G43.1 Dynamic Tool Length Offset
G43.1 axes
G43.1 axes - change subsequent motions by
replacing the current offset(s) of axes. G43.1
does not cause any motion. The next time a
compensated axis is moved, that axis's endpoint is
the compensated location.
"""
G43_2 = """G43.2 Apply additional Tool Length Offset
G43.2 H
H - tool number
G43.2 applies an additional simultaneous tool
offset.
You can sum together an arbitrary number of
offsets by calling G43.2 more times. There are no
built-in assumptions about which numbers are
geometry offsets and which are wear offsets, or
that you should have only one of each.
Like the other G43 commands, G43.2 does not cause
any motion. The next time a compensated axis is
moved, that axis's endpoint is the compensated
location.
"""
G49 = """G49 Cancel Tool Length Compensation
"""
G52 = """G52 Local Coordinate System Offset
G53 axes
G52 is used in a part program as a temporary
"local coordinate system offset" within the
workpiece coordinate system.
"""
G53 = """G53 Move in Machine Coordinates
G53 axes
To move in the machine coordinate system, program
G53 on the same line as a linear move. G53 is not
modal and must be programmed on each line. G0 or
G1 does not have to be programmed on the same
line if one is currently active.
"""
G54 = """G54 Select Coordinate System
G54 = select coordinate system 1
"""
G55 = """G55 Select Coordinate System
G55 = select coordinate system 2
"""
G56 = """G56 Select Coordinate System
G56 = select coordinate system 3
"""
G57 = """G57 Select Coordinate System
G57 = select coordinate system 4
"""
G58 = """G58 Select Coordinate System
G58 = select coordinate system 5
"""
G59 = """G59 Select Coordinate System
G59 = select coordinate system 6
"""
G59_1 = """G59.1 Select Coordinate System
G59.1 = select coordinate system 7
"""
G59_2 = """G59.2 Select Coordinate System
G59.2 = select coordinate system 8
"""
G59_3 = """G59.3 Select Coordinate System
G59.3 = select coordinate system 9
"""
G61 = """G61 Exact Path Mode
G61 = Exact path mode, movement exactly as
programmed. Moves will slow or stop as needed to
reach every programmed point. If two sequential
moves are exactly co-linear movement will not stop
"""
G61_1 = """G61.1 Exact Stop Mode
G61.1 - Exact stop mode, movement will stop at the
end of each programmed segment.
"""
G64 = """G64 Path Blending
G64 P Q
P = motion blending tolerance
Q = naive cam tolerance
G64 - without P means to keep the best speed
possible, no matter how far away from the
programmed point you end up.
The P tolerance means that the actual path will be
no more than P away from the programmed endpoint.
The velocity will be reduced if needed to maintain
the path.
G64 P- Q- turns on the naive cam detector. When
there are a series of linear XYZ feed moves at the
same feed rate that are less than Q away from
being collinear, they are collapsed into a single
linear move.
"""
G73 = """G73 Drilling Cycle with Chip Breaking
G73 X Y Z R Q L
R = retract position along the Z axis
Q = delta increment along the Z axis
L = repeat
The G73 cycle is drilling or milling with chip
breaking. This cycle takes a Q number which
represents a delta increment along the Z axis.
Motion Sequence
If the current Z position is below the R position,
The Z axis does a rapid move to the R position.
Move to the X Y coordinates.
Move the Z-axis only at the current feed rate
downward by delta or to the Z position, whichever
is less deep.
Rapid up a bit.
Repeat steps 2 and 3 until the Z position is
reached at step 2.
The Z axis does a rapid move to the R position.
"""
G74 = """G74 Left-hand Tapping Cycle, Dwell
G74 (X Y Z) or (U V W) R L P $
R = retract position along the Z axis
L = repeat
P = dwell
$ = spindle
The G74 cycle is for tapping with floating chuck
and dwell at the bottom of the hole.
"""
G76 = """Lathe Threading Cycle
G76 P Z I J R K Q H E L $
P = The thread pitch in distance per revolution.
Z = The final position of threads.
I = The thread peak offset from the drive line.
J = A positive value specifying the initial cut
depth.
K = A positive value specifying the full thread
depth.
Optional settings
$ = spindle to which the motion will be
synchronised.
R = The depth degression. R1.0 selects constant
depth on successive threading passes.
Q = The compound slide angle is the angle
(in degrees) describing to what extent
successive passes should be offset along the
drive line.
H = The number of spring passes.
E = Specifies the distance along the drive line
used for the taper.
L = Specifies which ends of the thread get the
taper.
L0 for no taper (the default)
L1 for entry taper
L2 for exit taper
L3 for both entry and exit tapers
"""
G80 = """Cancel Canned Cycle
"""
G81 = """G81 Drilling Cycle
G81 X Y Z or (U V W) R L
R = retract position along the Z axis
L = repeat
"""
G82 = """G82 Drilling Cycle, Dwell
G82 X Y Z or (U V W) R L P
R = retract position along the Z axis
L = repeat
P = dwell
"""
G83 = """G83 Peck Drilling Cycle
G83 X Y Z or (U V W) R L Q
R = retract position along the Z axis
L = repeat
Q = delta increment along the Z axis
"""
G84 = """G84 Right-hand Tapping Cycle, Dwell
G84 X Y Z or (U V W) R L P $
R = retract position along the Z axis
L = repeat
P = dwell
$ = spindle
"""
G85 = """G85 Boring Cycle, Feed Out
G85 X Y Z or (U V W) R L
R = retract position along the Z axis
L = repeat
"""
G86 = """G86 Boring Cycle, Spindle Stop, Rapid Move Out
G84 X Y Z or (U V W) R L P $
R = retract position along the Z axis
L = repeat
P = dwell
$ = spindle
"""
G89 = """G89 Boring Cycle, Dwell, Feed Out
G89 X Y Z or (U V W) R L P
R = retract position along the Z axis
L = repeat
P = dwell
"""
G90 = """G90 Absolute Distance Mode
In absolute distance mode, axis numbers
(X, Y, Z, A, B, C, U, V, W) usually represent
positions in terms of the currently active
coordinate system.
"""
G90_1 = """G90.1 Absolute Distance Mode
for I, J & K offsets
"""
G91 = """G91 Incremental Distance Mode
In incremental distance mode axis numbers usually
represent increments from the current coordinate.
"""
G91_1 = """G91.1 Incremental Distance Mode
for I, J & K offsets
"""
G92 = """G92 Coordinate System Offset
G92 axes
G92 makes the current point have the coordinates
you want (without motion), where the axis words
contain the axis numbers you want. All axis words
are optional, except that at least one must be
used. If an axis word is not used for a given
axis, the offset for that axis will be zero.
"""
G92_1 = """G92.1 Turn Off G92, Reset
G92.1 turns off G92 offsets and resets
parameters 5211 - 5219 to zero.
"""
G92_2 = """G92.2 Turn Off G92
G92.2 turns off G92 offsets and does not
change parameters 5211 - 5219.
"""
G92_3 = """G92.3 Restore G92 Offsets
G92.3 sets the G92 offset to the values
saved in parameters 5211 to 5219.
"""
G93 = """G93 Inverse Time Feed Mode
G93 inverse time feed rate mode, an F word means
the move should be completed in [one divided by
the F number of minutes.
When the inverse time feed rate mode is active, an
F word must appear on every line which has a G1,
G2, or G3 motion, and an F word on a line that
does not have G1, G2, or G3 is ignored.
"""
G94 = """G94 Units per Minute Feed Mode
G94 units per minute feed mode, an F word is
interpreted to mean the controlled point should
move at a certain number of inches per minute,
millimeters per minute, or degrees per minute,
depending upon what length units are being used
and which axis or axes are moving.
"""
G95 = """G95 Units per Revolution Feed Mode
G95 units per revolution mode, an F word is
interpreted to mean the controlled point should
move a certain number of inches per revolution of
the spindle, depending on what length units are
being used and which axis or axes are moving.
"""
G96 = """G96 Spindle Constant Surface Speed Mode
G96 D S $
D = maximum spindle RPM
S = surface speed
$ = spindle
"""
G97 = """G97 Spindle RPM Mode
G97 selects RPM mode.
"""
G98 = """G98 Canned Cycle Return Level
G98 - retract to the position that axis was in
just before this series of one or more contiguous
canned cycles was started.
"""
G99 = """G99 Canned Cycle Return Level
G99 - retract to the position specified
by the R word of the canned cycle.
"""
|