In Postbuilder I want some machine code to come out at the end of an operation, but before the CAM Machine Control - End of Path Events.
The desired code is written within a custom command.
If I tie the custom command to the End of Path Event it occurs after defined Events Used.
I don't want to tie the Custom Command to the Retract Move, Return Move nor Gohome Move as many times I won't have these types of moves programmed.
UDEs fire a handler proc which is the name: MOM_ This is done at the time it is encountered and is not configurable. Unfortunately markers won't be any help at end of path (which will delay output.) If this proc has no output - meaning no call to MOM_output_literal or MOM_do_template etc then nothing is output to G code at that time. The data in the fields of the ude are global and there until they are written over or unset. It in the end_of_path area you put a block template at the end of it that uses one of these globals - it will be after the end_of_path output (what you have there so far.)
I use delayed output too. In start event and end event - to control localization of ude output.
When you have delayed output you cant use this ude for local return in turning or in generic motion event - during operation.
I use delayed output in first/initial move - to have proper place of ude output.
And I use delayed output in the end of paths -the same reason.
To make it work in local return or generic motion - I switched it (command in ude MOM) to immediatelly output.
I was switching it by command executed in the very end of first/inital move .
But in the end paths section - I needed to identify the "last move" where I can to switch it back to delayed output.
This is my only problem.
I use operator message, insert, stop, opstop this way.