Rehoming in a Pipe Network application
Typically in many applications, homing motion is done first, and then addition motion related to manual or automatic modes of operation.
In the pipe network homing is typically done at the axis level with Axis block function calls before a pipe is connected to the axis block. Once a pipe is connected to the axis then the axis motion is a sum of the Axis motion plus the motion that comes through the as shown here:
If rehoming after pipe motion has been commanded through a pipe by a MLMst, MLPmp , or MLSmp pipe blocks care must be taking to account for the position that comes through a pipe network block. Often this position will be set to 0.For example if after an initial home the MLMst block is used to command a position of 5000. When a rehome is then done the pipe network position must be cleared or a 5000 offset will remain.
One method to eliminate the pipe position would be to include the following in the homing code:
Before the homing move disconnect the pipe and force the Master position to 0. Example:
MLMstForcePos( PipeNetwork.SMotion1,LReal#0.0 );
After the homing move and typically MLAxisWritePos can be called to reset position, reconnect the pipe
MLCNVConnect( PipeNetwork.CNV1, PipeNetwork.Axis1 );