In my motion programs I often start an absolute motion command inside an Sequential Function Chart Entry Action. Then I want to stay in that step until the command is completed. I find that I usually need to define my own logic for when the command is completed. I've had to do this for MLC and MLD, PLCOpen and AxisInterface. It looks MotionInterface is the same. The problem is due to two issues:
1. The transition out of the SFC is evaluated immediately after the SFC step. This will be before the motion engine has been updated. So you can't use the standard "command done" signal eg. arAxisStatus_gb[AxisA.AxisNo].Admin.CmdDone;Â This signal will still have the status for the last move.Â
2. If you command an axis to the same position the command done signal may not go off and on again. (Sometimes this happens due to the machine process or maybe a recovery routine.)
So, what I usually do is add my own "motion done" bit that I reset in in the SFC entry action, just after the motion commands. Then I write some code that runs after the motion interface call. This updates my motion done bit depending on the output of the motion interface.Â
I am wondering if there is already something in ctrlX MotionInterface that does this? Or could be added? Or is there another way to handle this situation. I don't want to add minimum times to all my SFC motion steps.Â
Â