Automatic Pausing; Single-Stepping Using Pause; Conditionally Executing Onboard Programs - National Instruments NI-Motion User Manual

Motion control
Table of Contents

Advertisement

Note
It is not possible for an onboard program to resume itself.
Similarly to the Stop Program function, Pause/Resume Program has no effect on
Tip
moves that have started.

Conditionally Executing Onboard Programs

© National Instruments Corporation
You can resume an onboard program with a function call from the host or
from another running onboard program.

Automatic Pausing

Any run-time error that occurs during execution automatically pauses the
onboard program.
An onboard program also pauses automatically when it executes the Start
function or the Blend Motion function on an axis that has been stopped by
the host, or when an axis is stopped due to a limit, home, software limit, or
following error condition.

Single-Stepping Using Pause

You can use the Pause/Resume Program function to effectively single-step
through an onboard program. To single-step, add a Pause/Resume Program
call after each function, and then resume the onboard program from the
host.
You can set conditions that affect the execution of the onboard programs.
For example, you may want the onboard program to wait until a specific
event occurs, and then continue executing.
The Wait on Condition function allows you to create onboard programs that
wait for events, such as move complete and blend complete. These onboard
programs can send functions to start moves and wait for moves to complete.
The onboard program uses almost no processor time while waiting for an
event such as move complete. When the move is complete, the trajectory
generator enables the I/O reaction task, which causes the onboard program
to continue executing the next function in its sequence, as shown in
Figure 14-5.
14-9
Chapter 14
Onboard Programs
NI-Motion User Manual

Advertisement

Table of Contents
loading

Table of Contents