Example Program - Stanford Research Systems SR844 User Manual

Rf lock-in amplifier
Table of Contents

Advertisement

Since most commands execute very quickly, the host computer does not need to
continually check the IFC bit. Commands may be sent one after another and they will be
processed immediately.
However, some commands, such as reset and auto–function commands, may require a
long time to execute. In addition, the host program may need to check that these
operations executed without error. In these cases, after the command is sent, the status
should be queried.
When using the GPIB interface, serial polling may be used to check the IFC bit in the
Serial Poll status while an operation is in progress. After the IFC bit becomes set,
signaling the completion of the command, then the ERR or ESB bits may be checked to
verify successful completion of the command.
If the RS232 interface is used, or serial polling is not available, then the *STB? query
command may be used to read the Serial Poll status word. However, *STB? never
returns the IFC bit set (since *STB? is itself a command).
Since the SR844 processes one command at a time, status queries will not be processed
until the previous operation is finished. Thus a response to a status query in itself signals
that the previous command is finished. The query response may then be checked for
various errors.

Example Program

An example program is included at the end of this chapter. This program is a good
reference for writing your own programs to control the SR844.
Remote Operation
SR844 RF Lock-In Amplifier
4-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents