- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I'm trying to modify my Mazak post processor to output operations as local subprograms and to share subprograms for patterned sections. I've been using both the Fanuc and Haas NGC post as references but am having a hard time understanding these implementations and the edge cases they're covering. Could someone familiar with these implementations share a bit more about them?
The subprogram implementations seem to consist of:
// Called on every onSection
function subprogramDefine(_initialPosition, _abc, _retracted, _zIsOutput) {}
// Sets up redirection buffer
function subprogramStart(_initialPosition, _abc, _incremental) {}
// Empties redirection buffer and saves the subprogram to be output in onClose
function subprogramEnd() {}
// Very confused by this function. It seems to both determine whether the
// current operation is "valid" as a subprogram, but it also seems to be
// actually writing rotations/translations and defining the work plane for
// the section?
function subprogramIsValid(_section, _patternId, _patternType) {}
// Also confused by these -- what determines whether the pattern
// needs to be output as absolute or incremental?
function setAxisMode(_format, _output, _prefix, _value, _incr) {}
function setIncrementalMode(xyz, abc) {}
function setAbsoluteMode(xyz, abc) {}
// Utilities used by subprogramIsValid -- don't fully understand them
function areSpacialBoxesSame(_box1, _box2) {}
function areSpacialBoxesTranslated(_box1, _box2) {}
function areSpacialVectorsDifferent(_vector1, _vector2) {}
My big open questions -- What makes a subprogram "valid"? What are the supported pattern types? How does the implementation know whether a subprogram needs to be output in absolute or incremental mode?
Also, my actual use-case for this is in using multiple WCS, which is output as a pattern by specifying multiple WCS in the Setup as opposed to creating an actual pattern folder. For these, the code is identical except that the WCS changes. Is it sufficient to check the initial and final position of sections with the same pattern ID to identify this kind of pattern?
Thanks for any and all help in understanding this.
Best regards,
Zach
Solved! Go to Solution.