Macro Drilling: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Jeffm (talk | contribs)
No edit summary
Jeffm (talk | contribs)
No edit summary
Line 62: Line 62:


====Longhand output of unknown cycles====
====Longhand output of unknown cycles====
Milling posts do not output moves for unknown cycle types so the following changes must be made to mill posts. Lathe posts and the lathe section of mill/turn posts do not need any changes to support this part of custom drilling.


Replace all instances of '''Flag?('SupportDrillCycle')''' with Flag?('OutputDrillCycles')
Replace all instances of '''Flag?('SupportDrillCycle')''' with Flag?('OutputDrillCycles')
Line 95: Line 97:


In the output code section, replace it with the cycle codes needed by the machine and use the [[OpFieldData|OpFieldData commands]] to get any cycle data that is provided by the macro. The field names are defined by the macro developer and should be provided with the macro.
In the output code section, replace it with the cycle codes needed by the machine and use the [[OpFieldData|OpFieldData commands]] to get any cycle data that is provided by the macro. The field names are defined by the macro developer and should be provided with the macro.
These types of checks can also be made in the lathe posts and the lathe section of mill/turn posts to output canned cycles for lathe drilling. The post should also check the [[PreferCan?]] boolean to see if the end user wanted a canned cycle or not.


==Flags==
==Flags==

Revision as of 21:09, 25 April 2011

Overview

Macro drilling is the feature where a GibbsCAM macro can fully define the cycle used for a drilling operation.

Names

Given that custom drilling ops can do a great number of things, a naming convention has been created in order for post developers, macro developers, MDD editors, and customers to all know exactly what type of drill cycle is being defined.

The name of the custom cycle contains 3 parts.

Developer Name, Cycle Name, Machine Type.

Additional words or numbers can be placed at the end of the macro name if needed to further differentiate them.

Names must be unique.

Sample

The macro name for Fadal specific Web drilling as written by Gibbs would be Gibbs.WebDrill.Fadal The macro name for a generic (not optimized for any specific machine) Gun Drill would be Gibbs.GunDrill.Generic

Macros

A number of macros are required to define a drill cycle. All of the macros go into a folder with the name of the custom cycle. This folder will then be placed inside the Macros/CustomDrillCycles folder that is located at the same level as the all users MDD and VMM folders.

Macros can be reused for different customers and the post dept will maintain a library of existing macros.

This will allow the macros to be packaged in the normal post package that is used to deliver MDDs and VMMs.


Samples

LINK TO MIKES SAMPLES ON THE MACRO WIKI.......


MDD

A custom MDD is required to support macro drilling. The macro is added to the MDD using the Extended Drill Cycles section of the MDD editor.

Cycles are added like normal extended cycles but the type is set to Custom Drill Cycle and the macro name is specified. This macro name MUST match the folder name used above.

Prog

The prog requires 2 changes to support macro drilling.

  1. Output any unknown cycle as longhand.
  2. Check for supported custom cycles and output the appropriate cycle and field data.

Commands

The commands used in macro drilling are;

HasDrillCycle? CycleType? OpFieldData commands


HasDrillCycle? replaces the call to GetCycle and returns true if the drilling operation is a standard cycle type that has a definition in the drilling section of the form. When true the post can then output the cycle as a normal drilling operation. When the command is false the post must ether detect the cycle type and output the correct canned cycle codes or output the path for the drilling op longhand using the EachMillDrillFeat [[[NextMillDrillFeat]] loop.

The CycleType?('n') command is used to detect custom cycles that the post can output as a canned cycle using the custom cycle macro name.

Suggested Changes to Prog

The simplest set of changes to the prog are as follows.

Longhand output of unknown cycles

Milling posts do not output moves for unknown cycle types so the following changes must be made to mill posts. Lathe posts and the lathe section of mill/turn posts do not need any changes to support this part of custom drilling.

Replace all instances of Flag?('SupportDrillCycle') with Flag?('OutputDrillCycles')

Remove calls to GetCycle

In the opGuts sub add the following code somewhere near the top of the sub.

 SetFlagF('OutputDrillCycles')
 IF Drilling? AND Flag?('SupportDrillCycle')
   IF HasDrillCycle? {OR CycleType? ('CUSTOM_MACRO_NAME')}
     SetFlag('OutputDrillCycles')
   END
 END

This will force the post to output the drilling operation longhand if a cycle does not exist in the form.

Support for custom canned cycles

In order to output a custom drill op as a canned cycle only a few small changes have to be made.

On the line IF HasDrillCycle? {OR CycleType? ('CUSTOM_MACRO_NAME')} remove the comments from the CycleType? section of the if test and replace CUSTOM_MACRO_NAME with name of the cycle that is to be supported. If multiple cycles are needed then simply add additional OR cases to the test.

In the sub defDrillCycle make the folowing changes.

 defDrillCycle:
   IF CycleType?('Gibbs.WebDrill.Fadal')
     {OUTPUT CODE HERE}
   ELSE
     doCycle doFromCP doDrillStartPos ZDepth doRLevel doPullOff doPeck doRetract doDwell FeedEnt
   END
 RETURN

In the output code section, replace it with the cycle codes needed by the machine and use the OpFieldData commands to get any cycle data that is provided by the macro. The field names are defined by the macro developer and should be provided with the macro.

These types of checks can also be made in the lathe posts and the lathe section of mill/turn posts to output canned cycles for lathe drilling. The post should also check the PreferCan? boolean to see if the end user wanted a canned cycle or not.

Flags

In order to support custom drilling a post must have the "Support Extended Drilling" flag turned on in the Compost Flags Dialog.