90088262 MCS130B
CORNERSTONE 130B MONOCHROMATORS
61
15.8 COMMAND SYNCHRONIZATION
The CS130B has commands that allow an application to coordinate some of its operations. For
example, an application may need to wait for the grating rotation stage to reach a wavelength
before it begins to read a detector. The pseudo-code for this would be:
•
Send wavelength command;
•
Wait for wavelength operation (stage rotation) to finish;
•
Read detector.
Sequential versus Overlapped Commands
The CS130
B can accept and buffer more than one command. It completes “sequential” commands
before starting on the next command
in its command queue. In contrast, it handles “overlapped”
commands by initiating the appropriate operation and then starting on the next command (if any)
while the previous overlapped operation is in progress.
The wavelength command is an example of an overlapped operation. It may take some time to
move the grating to a new wavelength, so the CS130B initiates the move operation and then starts
the next command.
The CS130B provides four methods to facilitate finding out when overlapped operations have
finished. Some of these methods are adapted from the IEEE488 standard. The simplest to use is
the
“*OPC?” query. The CS130B does not send a response to this IEEE488-standard query until
all of its pending operations are complete, and then it returns the value 1. An application can send
this query and wait until it receives a response; then it will know that all pending operations are
complete. For example:
•
Send wavelength command (e.g. gowave 585);
•
Send “*opc?” and wait for response;
•
Read detector.
If an operation or a series of operations takes a long time to complete, the application may
encounter a situation where its “query” mechanism times out before the CS130B finishes the
requested operations and responds to “*OPC?”. If increasing the application’s timeout is not an
option, or if the application simply cannot afford to halt while it waits for a response, there are other
approaches that allow the application to poll the CS130B.
The second
approach uses the “idle?” query. It returns the value “1” when all operations are
complete, and “0” when there is at least one operation pending. An application may periodically
send this query to poll the CS130B for operation complete. Pseudo-code for this approach would
be:
•
Send wavelength command;
•
Send “idle?” query.
•
If response is “0”, continue sending “idle?” query until response is “1”.
•
Read detector.
The third approach, as specified in IEEE488, is more complicated. The idea is to tell the CS130B
to set bit 0 in its Event Status Register (ESR) when all operations are complete. The application
can then periodically poll the ESR until bit 0 is set. Here is some pseudo-code for that:
•
Send wavelength command (this initiates the wavelength operation);
•
Send *OPC command (tells CS130B to set bit 0 when all currently pending operations
are finished);
•
Read Event Status Register (use *ESR? query); if bit 0 is not set, read it again. Continue
until bit 0 is set.
•
Read detector.
Содержание Cornerstone 130B
Страница 1: ...90088262MCS130B Rev B s 1 8m Monochromator Family User s Manual Cornerstone 130B...
Страница 32: ...90088262 MCS130B CORNERSTONE 130B MONOCHROMATORS 32 Figure 23 Model 74010 Filter Wheel...
Страница 42: ...90088262 MCS130B CORNERSTONE 130B MONOCHROMATORS 42 14 13BDIMENSIONS Figure 30 Cornerstone 130B Dimensions...
Страница 44: ...90088262 MCS130B CORNERSTONE 130B MONOCHROMATORS 44 Figure 33 Model 74006 Mounting Plate...