flex_read_program_status_rtn

NI-Motion Functions

flex_read_program_status_rtn

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

Read Program Status Return

Usage

status = flex_read_program_status_rtn(u8 boardID, u8 program, u16* programStatus);

Purpose

Reads the status of an onboard program.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
program u8 program number
programStatus u16* status of specified program

Parameter Discussion

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

programStatus is the status of the specified program. Possible values are as follows:

Value Definition
0 NIMC_PROGRAM_DONE
1 NIMC_PROGRAM_PLAYING
2 NIMC_PROGRAM_PAUSED
3 NIMC_PROGRAM_STORING

Using This Function

You can use this function to determine the state of an onboard program. You can only read the state of other onboard programs from an onboard program.