GETERROR Read slave’s error |
Syntax
n : error position in the circular buffer Binary code
The GETERROR n, VAR32 retrieves n-th error stored in the non-volatile memory of the drive. The errors are stored in a circular buffer that can hold up to 8 error codes, n = 0 oldest entry and n = 7 newest entry. The errors can be saved in the EEPROM with the command SAVEERROR command.
// Retrieve oldest 3 errors and save them in the EEPROM LONG error_code; //define variable error_code GETERROR error_code; //Read oldest error from motion controller RAM SAVEERROR error_code; // Save the error in the motion controller EEPROM GETERROR error_code; //Read second error from motion controller RAM SAVEERROR error_code; // Save the error in the motion controller EEPROM GETERROR error_code; //Read third error from motion controller RAM SAVEERROR error_code; // Save the error in the EEPROM GETERROR 1, error_code; // Retrieve second error from the EEPROM SEND error_code; // Send third error code to the host
|