Srq Mask Register; Gpib Programming Examples - JDS Uniphase SCG Series User Manual

Fiberoptic switch
Table of Contents

Advertisement

Bit 2 (Settled) is set when bit 2 in the condition register changes from 0 to 1.
Bit 0 (Parameter Error) is set when a parameter value is out of the range of the SCG unit.
The status register can be read with the status register query (STB?) or by serial polling the
GPIB interface. During power-up, the status register contains 0 and can only be read by serial
polling. After initial power-up, only the settled bit (bit 2) is set to 1. The clear status byte
command (CSB) and the clear device command (CLR) clear the status register. STB? also
clears the status register, but only if the service request bit (bit 6) is set to 1.

SRQ Mask Register

The SRQ mask register unmasks specific events in the status register that generate service
request interrupts on the GPIB interface. The SRQ mask command (SRE) writes to the SRQ
mask register. When a bit in the SRQ mask register is set to 1, the interrupt logic of the switch
monitors the corresponding event bit in the status register; an SRQ is generated and bit 6 in the
status register is set when the corresponding bit changes from 0 to 1.
The SRQ mask register can unmask more than one event at a time. The first unmasked event
to change from 0 to 1 causes an interrupt. To acknowledge this interrupt, the GPIB interface can
be serial polled or the status register can be read with STB?. The first time the SCG unit is
serial polled after an SRQ is generated, bit 6 is on. Subsequent serial polling returns a value
with bit 6 off. Similarly, STB? returns the status register with the SRQ bit set, but the logic of the
SCG unit automatically clears the register. As a result, subsequent STB? queries return 0.
The SRQ mask register is cleared by powering up the SCG unit, by the clear device command
(CLR), or by the universal device clear command (DC1).
Bit 7
Bit 6
Self-Test
n/a
Error

GPIB Programming Examples

This section provides programming examples for controlling the SCG unit over the GPIB
interface. The examples are written in MS-DOS Qbasic and run on a personal computer
equipped with a National Instruments
Universal Language Interface drivers loaded. The commands that control the GPIB are very
similar to Hewlett Packard
provide basic output and input statements for communicating messages to a GPIB instrument.
The GPIB commands provided in this section do not always show the terminating sequence
<CR><LF>; however, it is implied.
4
National Instruments is a trademark of National Instruments.
5
Hewlett Packard is a registered trademark of Hewlett-Packard Co.
SRQ Mask Register
Bit 5
Bit 4
Syntax
Message
Error
Available
4
GPIB interface board, with National Instruments
5
HP Basic commands. Most other controller board manufacturers
Bit 3
Bit 2
n/a
Settled
Programming Guide – 31
Bit 1
Bit 0
n/a
Parameter
Error

Advertisement

Table of Contents
loading

This manual is also suitable for:

Scg-dScg-eScg-f

Table of Contents