Extended Markers: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
CDHayz (talk | contribs)
CDHayz (talk | contribs)
Line 123: Line 123:


=== CRC Markers ===
=== CRC Markers ===
CRC markers are supported using the standard [[CRCOffsetC]] commands as well as the new [[CRCC]] command. These commands are simply added in place of the '''chkCRC''' and '''chkCRCNum''' prog subs that are normally called on each feature. Post processors that are unable to call the standard CRC commands can use the new booleans [[CRCOnFeat|CRCOnFeat?]] and [[CRCOffFeat|CRCOffFeat?]] to know when to output the required CRC commands. The CRC marker can only change the CRC on/off state and the Left/Right state; it can not change the CRC offset number.
CRC markers are supported using the standard [[CRCOffsetC]] commands as well as the [[CRCC]] command. These commands are simply added in place of the '''chkCRC''' and '''chkCRCNum''' prog subs that are normally called on each feature. Post processors that are unable to call the standard CRC commands can use the booleans [[CRCOnFeat|CRCOnFeat?]] and [[CRCOffFeat|CRCOffFeat?]] to know when to output the required CRC commands. The CRC marker can only change the CRC on/off state and the Left/Right state; it can not change the CRC offset number.


Example:
Example:
Line 132: Line 132:


====Legacy Note====
====Legacy Note====
The existing command [[CRCOnC]] will internaly call the [[CRCC]] command, and output any needed CRC on or off codes in the toolpath. This is to allow marker support in older posts. Even though the commands will be internally identical, new posts should be writen to call [[CRCC]] for readability, as it may seem odd to some post developers that a command named CRC'''On'''C can output a CRC off code.
The existing command [[CRCOnC]] will internaly call the [[CRCC]] command, and output any needed CRC on or off codes in the toolpath. This is to allow marker support in older posts. Even though the commands will be internally identical, new posts should be writen to call [[CRCC]] for readability, as it may seem odd to some post developers that a command named CRC'''On'''C can output a CRC Off code.

Revision as of 17:23, 31 March 2008

NOTE

Please note that this is preliminary documentation for a feature that is under development. Aspects of this feature or it's posting implementation may change during development and testing.


Overview

Extended markers were added to GibbsCAM for version 9.0. They allow the user a greater level of control over the program by allowing them to optimize not only the feedrates of a tool path but many other aspects, including;

  • Feedrates
  • Spindle Speed
  • Tool Offset
  • Cutter Radius Compensation
  • Dwells
  • Tool Sub-Position
  • Text Comments
  • Prog Stop

This is all in addition to the existing feedrate marker.

Post Support

There are 2 levels of post support for markers: Legacy, and Full support.

Legacy

Legacy post will only support 2 marker types, CRC and Feedrates.

Feedrate support has been included in post processors since the .82 format from the mid 1990's.

The post engine will automatically support feedrate markers by overriding the standard behavior of the CRCOn and CRCOff commands.

This will allow some marker support in the majority of the existing posts. There are posts that will not "pick up" the marker support and that is a known issue. They will have to be upgraded as needed.

Full Marker Support

To fully support markers a post processor must be upgraded. Upgraded posts fully support all marker types that are valid for the machine type.

Upgrade

Upgrading a post to full marker support is a moderately trivial task, and simply requires a few changes to the post.

Compost Flag

In order to have the post engine send all marker types to the post processor, the form must be flagged as supporting the markers. This is an option in Compost3 1.3.3 or later, under the Flags item in the Advanced menu.

When this item is checked, the post engine will send all possible markers to the post processor as part of the toolpath (EachFeat/NextFeat loop ).

Toolpath

The first thing to do when upgrading a post is to ensure that the toolpath loop does not make any assumptions about what type of feature it is on. Some older posts will simply have an "else" case at the end of the feature tests, and assume that the feature is an arc or a point. This will cause problems if the extended marker features are passed to the post and it attempts to treat them as the wrong kind of feature. This can be solved by ensuring that every feature type has it's own corresponding IF test, and that the final ELSE case is left empty. Advanced marker support is best supported by posts that have been upgraded to the current Master Post for the machine type.

Marker Types

Each marker type is implemented in one of two ways. Markers are either supported as new feature types, or as attributes on existing features. The implementation of the markers depends on how the marker is intended to work in the program, and how it affects the features around it. All markers will "split" a feature when they are not placed on a start or end point.

Feature Based Markers

Markers that are implemented as new feature types all include a new Feat? boolean. These markers are assumed to be placed on lines by themselves and are assumed to take place instantly, and do not affect the state of any features before or after the marker. If a particular control does not support a specific marker (which is common with markers like tool sub position) then the post can simply skip the feature.

Text Comment Marker

The text comment marker will generate a feature that will cause the CommentFeat? boolean to return true. The text comment may include more than one line, so the post processor must execute an EachCommentFeatLine / NextCommentFeatLine loop. Inside this loop, the command CommentFeatLine$ is called to output the code for each line.

Example:

 IF CommentFeat?
   EachCommentFeatLine
     SeqC '(' CommentFeatLine$ ')' EOL
   NextCommentFeatLine
 END

The post engine will not do any processing or verification of any of the contents of the Comment Marker, it is simply output. No post script, or special command parsing of the text is provided.

Tool Sub Position Marker

The Tool SubPos marker will generate a new feature that will cause the ToolSubPosFeat? boolean to return true. This feature should be output on a line by itself by the post processor, and the post must not output any additional tool path or clearance moves. It is assumed that the customer will place these markers in the appropriate place in the tool path for his needs (e.g. on embedded retracts). The addition of moves by the post processor will prevent the program from being properly simulated.

The existing sub position command ToolSubPosition# is used to get the new sub position.

Example:

 IF ToolSubPosFeat?
     SeqC 'M19' 'S' ToolSubPosition# EOL
 END

The commands TLToolSubPosition# and ToolSubPosChange? are not used by this feature.

Program Stop Marker

The prog stop marker will generate a new feature that will cause the ProgStopFeat? boolean to return true. This feature should be output on a line by itself by the post processor, and the post must not output any additional tool path or clearance moves. It is assumed that the customer will place these markers in the appropriate place in the tool path for his needs (e.g. on embedded retracts). The addition of moves by the post processor will prevent the program from being properly simulated.

The existing OptionalStops? is used to test the type of stop.

Example:

 IF ProgStopFeat?
     SeqC
     IF OptionalStops?
       'M1'
     ELSE
       'M0'
     END
     EOL
 END

Dwell Marker

The dwell marker will generate a new feature that will cause the DwellFeat? boolean to return true. This feature should be output on a line by itself by the post processor. Dwell features have been supported for some time in a number of operation types (mostly turning ops, and expanded drill cycles), and the same commands that were used in the past are used to support the markers, including Dwell# and DwellRevs#.

Example:

 IF DwellFeat?
     SeqC 'G4 X' Dwell# EOL
 END


Attribute Based Markers

Markers that are implemented as new attributes on existing features each have a new boolean command associated with them, which must be called on every feature if the marker is to be supported. The control of where the marker is to be placed is now up to the user or the toolpath generator, not the post.While Attribute Based Markers will split the feature the marker was added to, it does not add a feature. These markers simply add a new state to the following split feature. For example, a FeedRate marker that is added to a line feature will split the feature, creating 2 line features: one before the marker, and one after the marker. The line feature after the marker will have the updated FeedRate information as a new state (or attribute) on that feature that the FeedRateC command will pick up and output.

Feedrate Markers

Feedrate makers are supported using the standard FeedRate commands. The conditional FeedRateCis simply called on every feature. This is currently supported in nearly every post. No additional change is needed.

Example:

 SeqC FeedC CRCC MoveXYZABCC FeedrateC SpeedC CRCOffsetC ToolOffsetC EOL

Spindle Speed Markers

Speed markers are supported using the standard Speed commands. The conditional SpeedC is simply called for every feature. This is not supported by most posts and must be added in a similar way to the existing feedrate commands.

Example:

 SeqC FeedC CRCC MoveXYZABCC FeedrateC SpeedC CRCOffsetC ToolOffsetC EOL

Tool Offset Change Markers

Offset change markers are supported using the standard ToolOffset# commands. The conditional ToolOffsetC command is simply called for every feature. This is not supported by most posts and must be added in a similar way to the existing CRC commands. Posts that are unable to use the Fanuc style commands can call the ToolOffsetChange? to be notified when the change happens.

Example:

 SeqC FeedC CRCC MoveXYZABCC FeedrateC SpeedC CRCOffsetC ToolOffsetC EOL

CRC Markers

CRC markers are supported using the standard CRCOffsetC commands as well as the CRCC command. These commands are simply added in place of the chkCRC and chkCRCNum prog subs that are normally called on each feature. Post processors that are unable to call the standard CRC commands can use the booleans CRCOnFeat? and CRCOffFeat? to know when to output the required CRC commands. The CRC marker can only change the CRC on/off state and the Left/Right state; it can not change the CRC offset number.

Example:

 SeqC FeedC CRCC MoveXYZABCC FeedrateC SpeedC CRCOffsetC ToolOffsetC EOL

Mode Note

By default the command CRCOffsetC will only output the CRC Offset number the first time CRC is turned on during an operation. Subsequent CRC On states will not trigger any output. If the post requires that the CRC offset be restated on each CRC On, it can call ForceCRCOffset to cause the output of the offset each time. The command ForceCRCOffsetF will cancel this mode.

Legacy Note

The existing command CRCOnC will internaly call the CRCC command, and output any needed CRC on or off codes in the toolpath. This is to allow marker support in older posts. Even though the commands will be internally identical, new posts should be writen to call CRCC for readability, as it may seem odd to some post developers that a command named CRCOnC can output a CRC Off code.