Structure of custom homing sequences
User-specific homing sequences can be created in a simple manner from the available function blocks. Note that when doing so every sequence must always be ended by a finalizing FB so that, if necessary, modified parameters of the TwinCAT NC or the drive controller can be reconstructed and the "HomingState" is also changed correspondingly.
Example: structure of a "Home-on-block" sequence
A "Home-on-block" sequence can be built very easily by using the function blocks MC_StepBlock and depending on the result of the function block MC_FinishHoming or MC_AbortHoming.
The MC_StepBlock is parameterized and triggered accordingly. If the sequence contained therein is run through without errors (Done = TRUE), the function block MC_FinishHoming is called at the end. In the other case (Error = TRUE or CommandAborted = TRUE) a MC_AbortHoming is called to terminate the sequence.
Also see Samples.