Manual

P
ART
O
NE
:
ABOUT
REMOTE
CONTROL
22
ISSUED: February 2005
WM-RCM-E Rev D
MAKE SERVICE REQUESTS
When an X-Stream DSO is used in a remote application, events often occur asynchronously, i.e., at times that
are unpredictable for the host computer. The most common example of this is a trigger wait after the
oscilloscope is armed: 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. Continuous status
bit polling is described in more detail below. For a complete explanation of status bits, refer to Chapter 5.
Perhaps a more efficient way of detecting events occurring in the oscilloscope is the use of the 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. 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. In the absence of real interrupt service
routines, the use of SRQ may not be very advantageous.
In the default state, after power-on, the Service ReQuest is disabled. You enable SRQ by setting the Service
Request Enable register with the command “*SRE” and by specifying which event should generate an SRQ.
The X-Stream DSO will interrupt the controller as soon as 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.
Example: To assert SRQ in response to “new signal acquired.” 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. Thus the command INE 5 is needed:
CMD$ = “INE 5 ; *SRE 1”
CALL IBWRT (SCOPE%, CMD$)