Read the Error/Event Queue
You read the error queue with the :SYSTem:ERRor? query.
Example:
SEND → :SYST:ERR?
READ ← -220,"Parameter error;Wrong enum value '25x' for setting 'AttenuationA'"
The query returns the error number followed by the error description.
If more than one error occurred, the query will return the error that occurred first. When you read an error, you will also remove it from the queue. You can read the next error by repeating the query.
When you have read all errors, the queue is empty, and the :SYSTem:ERRor? query will return:
0, "No error"
When errors occur and you do not read these errors, the Error Queue may overflow. Then the instrument will overwrite the last error in the queue with:
-350, "Queue overflow"
If more errors occur they will be discarded.
It is a good practice to check for errors after instrument configuration and before starting a measurement.