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.
After sending such a Prompt the Slave will not talk again until it receives another command.
Three different Prompts are defined:
|?>||Syntax Error Prompt|
|!>||Execution Error Prompt|
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.
Prompts normally start on a new line. One exception is when the OK Prompt is sent when a Slave gets selected after receiving its own address.
When a Slave has completed executing a command without errors it will send the OK Prompt. This also indicates that the Slave will not send anything else and 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.
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.
For instance when uploading of a file fails for whatever reason, the rest of the upload will be interpreted as commands again. Without a doubt the upload will trigger many Syntax Errors. Not changing the error description will enable you to find the cause of the failing upload once you managed to cancel the uploading process.
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.