SAVEERROR                Save slave’s error in EEPROM

Syntax                        

SAVEERROR VAR32

GET oldest ERROR from RAM

 

OperandsVAR32: 32-bit long variable containing the slave error

       

PlaceTMLOnline

Binary code

SAVEERROR

DescriptionSaves the slave error from VAR32 in a circular buffer located in EEPROM. The buffer can hold up to 8 error codes. If the buffer is full and a new error is saved then the oldest error is overwritten. The content of VAR32 must be initialized using the GETERROR VAR32 command.

 

Example

// 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

 SEND error_code; // Send third error code to the host