Error Message Stack
Modal errors generate an error message containing the command ID, resource ID, and error code that is pushed on the Error Message Stack on the NI motion controller and flagged in the Error Message (Err Msg) bit of the Communications Status Register (CSR). You can return a modal error message to the host by executing the Read Error Message function.
The Error Message Stack is organized as a last-in-first-out (LIFO) buffer so that the most recent error is available immediately. Older errors can be read with additional calls to the Read Error Message function and are returned in the inverse order to which they were generated. When the stack is empty, the Error Message (Err Msg) bit in the CSR is reset.
The Error Stack can hold up to 10 errors. When the stack is full, which is an unlikely event, additional error messages are thrown away.