Programming Examples
Best Practice
It is generally recommended that you query the error queue after every command or query. The
advantages of this approach are:
•
when an error occurs, it’s easier to find out which command or query triggered the error
•
it can be verified that all commands are actually executed (which is not the case with syntax
or argument errors, for example)
•
the remote control software is always in sync with the instrument’s firmware, as the query
delays the remote control software until the command is completely handled and checked
The following programming examples do not show any error queries, for the sake of brevity and
readability. You are recommended to use the following pseudo-code to run the programming
examples, or any remote programming:
•
command:
1. send command string plus termination character
2. send error query string plus termination character
3. read and handle response
4. repeat steps 2–4 until no error is reported
•
query:
1. send query string plus termination character
2. read and handle response
3. send error query string plus termination character
4. read and handle response
5. repeat steps 3–5 until no error is reported
36
BitifEye Digital Test Solutions GmbH