Joel,
In my client's application, the use of the stepmoveabs statements are at a very small rate. In my case it is possible for the PLC to run for days or weeks without needing to move the stepper motors, so I have not run into the problem.
But, I did run into something, similar, back in August 2016 with the high speed counters. The problem with the highspeed counter mechanism was that it was supposed to invoke a CF when a count value was reached. But, periodically, the CF was not invoked. This caused all sorts of havoc with the behavior of the system that my client sold and delivered to his customers. I worked this problem offline with Leon at TRI.
Leon traced the problem to how the PLC firmware handled interrupts. My understanding was that the low level firmware responded to an interrupt caused by the PLC hardware and in response to this event queued a request to call the CF. The bottom line problem was that the queue mechanism would periodically, loose (ignore, discard, ...) the queued request and the CF never was invoked.
It is possible that the stepper notification (RELAY set) mechanism may be implemented in the low-level PLC firmware in a very similar way. If this is true, then the same issues with the low-level PLC firmware may be causing the problem that you are observing.
I do have a suggestion that may help both detect your problem and make your PLC way more reliable. This is the sort of work-around that I am still doing for the HighSpeed counter:
- Use a "dead man timer" to detect the absence of a response (RELAY set from completion of the motion comand).
- When you issue the StepMoveAbs statement, set RELAY that is connected to the dead man TIMER. The Set Value of the TIMER should be greater than the worst case time required for the stepper to move to the new position.
- If the RELAY associated with the StepMoveAbs is received, clear the RELAY controlling the dead man timer.
- If the dead man TIMER goes off, then you know that the StepMoveAbs command has failed to set the RELAY specified by the command and you can now clear the RELAY that controls the dead man TIMER.
Another approach is to set up a mechanism that periodically calls a CF while your StepMovAbs command is active. The CF that is called periodically will use the StepCountAbs(1) function to read the current absolute position for the stepper system. If the stepper has moved to the position that you have commanded and the RELAY has not been set, you can then set the RELAY in your CF and then the rest of your PLC code will operate as you have designed. Problem is not solved, but you have a work around.
Best regards,
Gary D*ckinson