Error query

// *****************************************************************************
// Execute two wrong commands and query the error queue - both 
// errors are reported, the error queue is cleared by reading. 
// *****************************************************************************
NONSENSE:FOO?
*NONSENSE?
SYSTem:ERRor:ALL?

// *****************************************************************************
// Execute a correct command and query the latest error - the instrument 
// reports no error.
// *****************************************************************************
*IDN?
SYSTem:ERRor?