flex_read_program_status

NI-Motion Functions

flex_read_program_status

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

Usage

status = flex_read_program_status(u8 boardID, u8 program, u8 returnVector);

Purpose

Reads the status of an onboard program.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
program u8 program number
returnVector u8 destination for the return data

Parameter Discussion

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

returnVector indicates the destination for the return data generated by this function. Available return vectors include return data to the host (0xFF), to a variable (0x01 through 0x78), to an indirect variable (0x81 through 0xF8), and return no data (0). Refer to Input and Return Vectors for more detailed information.

Note  The suffix _rtn on the function indicates that the data must be returned to the host. When this calling convention is used, no returnVector is required.

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.