 |
| The yellow marks indicate the defined tolerance between the heads. Violating this space generates an e-stop or aborts the axes. |
The user can choose from two methods to stop the axes. It can either decelerate the axes to a controlled stop (also known as e-stop) or by disabling the amplifiers, and zeroing the DAC command voltage to the axis drive (aborting the axes). The monitoring of the relative distance between the axes, and the stopping of the axes is handled autonomously on the XMP controller, without any reliance upon the host computer. A firmware object known as the Program Sequencer allows for execution of a mini-program, or a sequence, independent of the host.
Sequences
A sequence consists of a linked list of commands. Execution of a sequence can be started, stopped, or its status queried. Execution of a sequence begins with the first command in the sequence and proceeds sequentially unless otherwise commanded (e.g., a branch command). Execution of a sequence ends when the last command in the sequence is executed, or when the host stops the execution. The XMP can be controlled directly by the host, or controlled by commands that the host downloads (for independent execution by the XMP firmware). The Program Sequencer can run up to 16 independent sequences containing a maximum of 256 Commands. The sequences are sampled in parallel, so each line in every sequence is looked at in parallel, like a thread. The XMP firmware time-slices the Program Sequencer "threads" by executing a command in every active Program Sequence, on every firmware cycle. This allows for command sequences to be of any length giving flexibility to programming a number of separate sequences to accomplish various tasks. This rich command set provides capability similar to, and beyond that provided by Programmable Logic Controller (PLC) programs. As a result, this monitoring can occur, even if the users program is not executing.
A Typical Sequence
| Sequence |
| 1. Start a motion |
| 2. Wait 60 msec |
| 3. Turn on specific I/O bit |
| 4. Wait for motion to finish |
| 5. Wait for another I/O bit |
| 6. Start a new motion |
|
 |
| The green bars indicate foreground priority tasks exectued every firmware cycle. The yellow bars indicate background tasks and depeding on length, are completed each cycle or across several cycles. |
Program Sequencer & Firmware
Writing sequences for use with the Program Sequencer is an optimal way of programming very small routines that occur repetitively and are relatively small in size. In this manner, the host computer gives priority to decision making and the DSP can execute other time-critical tasks on-board.
The firmware is divided into foreground and background tasks. This means that every cycle, the firmware allocates time and space as a priority to handle certain tasks, such as encoder feedback and other types of I/O. Background tasks are then handled in remaining firmware cycles depending on their size. The Program Sequencer is a background task and sequences developed and run never interfere with priority, or foreground tasks. The nature of the XMP DSP makes it an optimal platform for developing host specific programs as well as DSP run mini-applications without degradation in performance.
Host or XMP?
Collision avoidance is an optimal sequence to run via the Program Sequencer. In the case of a linear motor with two heads sharing an axis, collision avoidance is an important and redundant operation that can be offloaded from the host. And because of latency issues in operating systems like Windows, monitoring the axes position is better suited for the DSP in real time at the DSP sample rate. Other tasks are better suited for the host to execute. Debugging, troubleshooting and optimizing are better performed on the host with MEI tools available such as Motion Console, Motion Scope and the Controls Tookit.
The MPI
The XMPs robust application programming interface, the MPI provides a layer of abstraction on top of the XMP sequencer. In doing so, this allows a user to access the powerful Program Sequencer via the MPI without exposure to the added complexity of the underlying firmware. The MPI sequence object maintains a list of MPI command objects. Commands exist to perform motion, compute/load/store data, branch-on/wait-for conditions (arithmetic, logical, I/O bits, events), delay, generate user defined events, etc. There are a variety of command types, each with type-specific command parameters.
|