User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
Making Service Requests
When the oscilloscope is used in a remote application, events often occur asynchronously; meaning, at
unpredictable times for the host computer. The most common example of this is a trigger wait after the
oscilloscope is armed. In such a case, the controller must wait until the acquisition is finished before it can
read the acquired waveform.
The simplest way of checking if a certain event has occurred is by either continuously or periodically
reading the status bit associated with it until the required transition is detected.
A more efficient way of detecting events occurring in the oscilloscope is to use Service Request (SRQ).
This GPIB interrupt line can be used to interrupt program execution in the controller. The controller can
then execute other programs while waiting for the oscilloscope.
The SRQ bit is latched until the controller reads the Status Byte Register (STB). The action of reading the
STB with the command *STB? clears the register contents except the MAV bit (bit 4) until a new event
occurs. Service requesting can be disabled by clearing the SRE register with the *SRE 0 command.
Unfortunately, not all interface manufacturers support the programming of interrupt service routines. In
particular, National Instruments supports only the SRQ bit within the ISTA% status word. This requires you
to continuously or periodically check this word, either explicitly or with the function call IBWAIT.
Enabling SRQ
In the default state, SRQ is disabled. To enable SRQ, set the Service Request Enable register with the *SRE
command, specifying which event should generate an SRQ.
The oscilloscope then interrupts the controller when the selected event(s) occur by asserting the SRQ
interface line. If several devices are connected to the GPIB, you may be required to identify which
oscilloscope caused the interrupt by serial polling the various devices.
INR and INB
This event is tracked by the INR register, which is reflected in the SRE register as the INB summary bit in
position 0. Since bit position 0 has the value 1, the command *SRE 1 enables the generation of SRQ
whenever the INB summary bit is set.
In addition, the events of the INR register that may be summarized in the INB bit must be specified. The
event "new signal acquired" corresponds to INE bit 0 (value 1) while the event "return-to-local" is assigned
to INE bit 2 (value 4). The total sum is 1+4=5. So, the command INE 5 is needed:
CMD$ = "INE 5 ; *SRE 1" : CALL IBWRT (SCOPE%, CMD$)
5-10