A Slave is not allowed to talk on the bus unless instructed to so by the Master.
The selected Slave signals the completion of its last instruction by sending one of tree Prompts.
Such a Prompt consists of 2 characters, followed by a Carriage Return character and reflects the status of the last instruction.
Three different Prompts are defined:
Some commands may take some time to complete before the Slave responds with one of the three Prompts. No maximum delay is defined between the start of the command and the response from the Slave.
Query commands may answer with one or more lines of data before they finally send a Prompt.
Non query commands may only send one of the three Prompt.
=> OK Prompt
When a Slave executed a command without errors it will send the OK Prompt. This also indicates that the Slave is ready to accept a new command.
The OK Prompt is also sent when a Slave gets selected by its own Address. By definition the Slave should send the OK Prompt within 0.5 seconds after receiving its own Address.
An *ERROR? command, executed after receiving an OK Prompt, will always respond with "NO ERROR".
?> Syntax Error Prompt
The selected Slave will respond with this Prompt when it received a command that it does not understand. A Syntax Error may be caused by a typo or when a command is totally unknown to the Slave.
An *ERROR? command, executed after receiving a Syntax Error Prompt, will usually respond with "SYNTAX ERROR".
Some Slaves however will not change the error message when a Syntax Error is encountered.
This means that the *ERROR? command will generate the Error description of a previous command, which was not necessarily a Syntax Error.
!> Execution Error Prompt
The Execution Error is sent whenever the Slave did understand the previous command, but was unable to complete it without errors. An Execution Error can be cause by numerous reasons. Some of the reasons are listed below:
As always the *ERROR? command will tell you the exact reason why the Execution Error Prompt was returned.