flex_clear_pu_status |
Clear Power Up Status
Usage
status = flex_clear_pu_status(u8 boardID);
Purpose
Clears the Power-Up status bit and boots up the controller, making it ready to accept functions.
Tip Refer to the Remarks section for information about how the behavior of this function differs between controllers. |
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
Using This Function
When the NI motion controller is reset by a power cycle, watchdog timeout, or other means, the controller is suspended in a Power-Up state and a Power-Up status bit in the Communications Status Register (CSR) is set. Use this function to clear the Power-Up status bit and ready the controller for motion control communications.
You cannot execute most of the other motion control functions until the Power-Up status bit has been cleared by using this function. This lockout ensures that you are aware of the occurrence of an unexpected reset, as in the case of a watchdog timeout.
You can include this function one time at the beginning of an initialization routine. Do not include it in other routines to avoid the possibility of restarting an application unexpectedly after a power cycle or watchdog timeout. The Initialize Controller function automatically calls this function.
Note If you are running a NI-Motion startup application on ETS (PharLap) systems, the first function in your application must be either the Clear Power Up Status or Initialize Controller function. Calling any other function first may result in error –70012 (NIMC_badBoardIDError) because the driver may not have loaded before a NI-Motion function is called. |
Remarks
This section includes information about how the behavior of this function differs among the controllers that support it.
NI 73xx Controller Considerations
When the 73xx motion controller is in the Power-Up state, the Move Complete Status (MCS) register contains a power-up code that describes why the controller is in the Power-Up state. To access this code, execute the Read Move Complete Status function.
The following table describes the power-up codes:
Code | Reset Type | Cause |
0x80 | Bus reset | Normal PC power cycle |
0x40 | Power-Up reset | Normal PC power cycle |
0x20 | Watchdog timeout | Fatal internal error |
0x08 | Shutdown | Shutdown (E-Stop) input active; refer to the Enable Shutdown function |
0x02 | Software reset | Firmware download |
NI SoftMotion Controller Considerations
The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:
The power-up codes do not apply to the NI SoftMotion Controller.