Monitoring System Operation

Monitoring System Operation

Monitoring System Operation Without Using Service Requests

The easiest method to synchronize the execution of commands with other events is with the DONE command. This has the disadvantage that the computer is not available for other processing while waiting for the analyzer to complete its commands.

The STB command may be used to monitor the value of the status byte at any time. Executing STB? returns the decimal equivalent of the status-byte register to the computer. Executing STB? is similar but not identical to conducting a serial poll of the status byte. Both methods will return the current value of hte status byte. When STB? is executed, the status-byte register is cleared, and then bit 4, COMMAND-COMPLETE, is set. When a serial poll is done, the status byte is cleared only if the service request mask is nonzero, as set by the RQS command.

To use the status byte to monitor the completion of any command without using the computer interrupt system, the following sequence should be followed:

1.Send all commands required before the command that is to be monitored.

2.Send DONE? to the analyzer followed by a query. The purpose is to ensure that all above commands have been completed.

3.Send RQS 16, COMMAND-COMPLETE, to the analyzer. This instructs the analyzer to generate a service interrupt when the command is complete. It is not necessary to enable the interrupt system of the computer.

4.Do a serial poll of the analyzer status byte (by using SPOLL in HP BASIC). This clears the status byte including bit 4, COMMAND-COMPLETE.

5.Send the command that is to be monitored to the analyzer.

6.Do a serial poll of the analyzer status byte anytime that it is desired in order to determine if the command sent in step 5 above has been completed. Bit 4 of the status byte will be clear until the command completes. Once the command is completed, bit 4 will be set the next time that the status byte is queried.

4-11