Basically I was planning to create a program block containing a config command, followed by a dynamic move command, using stage. To move to a target with a particular profile, load the profile into a set of DW and run the program block After the move executed, the program would exit, and thus the move would be complete.
The problem is not in the move, it's in the alarm logic. On any alarm, I want all executing moves to end. My first thought was to simply halt the motion program, but I could not predict if this would physically stop the motor - thus my question. After reading your reply, I rewrote the motion commands into program blocks that will be scanned continuously, so a move in progress can be halted by the "Any Alarm Active" bit, and terminate correctly.
I suppose with a bit of effort, I could have kept the original prg blocks and worked out how to stop them cleanly, but when you pointed out that the move command needs to execute to completion, I felt that continuous scan was the best way to ensure that.
By the way, casting did turn out to be a marvelous use of vectors. I also discovered the user-defined memory blocks, and they are fantastic. Now your conversation with Controls Guy about structures makes alot more sense, and let me chime in in support of User-Defined structures - it would be great to design a Motion Structure for each of my axes, instead of "YAxisB0-32" for bits and "YAxisDW0-15" for motion parameters.
Thanks!
TM