flex_pause_prog

NI-Motion Functions

flex_pause_prog

Device Compatibility

Device Compatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Pause/Resume Program

Usage

status = flex_pause_prog(u8 boardID, u8 program);

Purpose

Pauses a running program or resumes execution of a paused program.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
program u8 program number

Parameter Discussion

program is the program number. Valid program numbers are 0x01 through 0xFF (1 through 255).

Using This Function

This function suspends execution of a running program or resumes execution of a paused program.

A program can pause or resume another program and also can pause (but not resume) itself.

Note  Pausing a program does not affect a move already started and in progress. It does not implement a Stop Motion function.

Any run-time (modal) error in a program automatically pauses the program in addition to generating the error message. Refer to the Read Error Message function for information about errors and error handling.

A program also can automatically pause if you execute a Stop Motion function from the host computer on an axis or axes under control of the onboard program. In these cases, the program pauses when it attempts to execute a Start Motion or Blend Motion function on the stopped axes. This automatic pause also applies when the stop is due to a limit, home, software limit, or following error condition.

You can effectively single-step through an onboard program by having the program pause after every function, and then resuming the program from the host computer.

System time does not pause when you pause a program. Pausing merely stops the next function from executing. This means that a delay counter from Load Program Delay keeps counting down even while the onboard program is paused. For example, if you load both a delay of five seconds and a pause of 10 seconds, you have a total of only 10 seconds before execution of the onboard program resumes.