D.8 Demande De Service - Rohde & Schwarz NRT Manuel D'utilisation

Table des Matières

Publicité

NRT
D.8
Demande de service
La routine de demande de service exige une initialisation étendue de l'appareil, dans laquelle sont ré-
glés les bits associés des registres de transition et de validation.
Pour utiliser la fonction de demande de service conjointement avec un gestionnaire de périphérique
GPIB de National Instruments, on doit régler "Disable Auto Serial Poll" sur "yes" au moyen de IBCONF.
REM --------------- Example of initialization of the SRQ in the case of errors --
CALL IECOUT("*CLS")
CALL IECOUT("*SRE 168")
CALL IECOUT("*ESE 61")
CALL IECOUT("STAT:OPER:ENAB 32767")
CALL IECOUT("STAT:OPER:PTR 32767")
CALL IECOUT("STAT:QUES:ENAB 32767")
CALL IECOUT("STAT:QUES:PTR 32767")
ON PEN GOSUB Srq
PEN ON
REM -------------------------- Continue main program here -----------------------
STOP
REM******************************************************************************
Srq:
REM -------------------------- Service Request Routine --------------------------
DO
SRQFOUND% = 0
FOR I% = UserN% TO UserM%
ON ERROR GOTO noUser
CALL IBRSP(I%, STB%)
IF STB% > 0 THEN
SRQFOUND% = 1
IF (STB% AND 16) > 0 THEN GOSUB Outputqueue
IF (STB% AND 4) > 0 THEN GOSUB Failure
IF (STB% AND 8) > 0 THEN GOSUB Questionablestatus
IF (STB% AND 128) > 0 THEN GOSUB Operationstatus
IF (STB% AND 32) > 0 THEN GOSUB Esrread
END IF
noUser:
NEXT I%
LOOP UNTIL SRQFOUND% = 0
ON ERROR GOTO Errorhandling
ON PEN GOSUB Srq: RETURN
REM******************************************************************************
REM -------------------------- Subroutines for the individual STB bits ----------
Outputqueue:
CALL IECIN(Message$)
PRINT "Message in output buffer:"; Message$
RETURN
1080.9506.02
Exemples de programmation
'Reset Status Reporting System,
'Enable service request for
'STAT:OPER-,STAT:QUES- and ESR-
'registers,
'Set Event-Enable bit for
'command execution,device
'dependent and query errors,
'Set OPERation Enable Bit
'for all events,
'Set associated OPERation
'Ptransition bits,
'Set Questionable Enable bits
'for all events,
'Set associated Questionable
'Ptransition bits,
'Initialize service
'request routine.
'End of program
'Poll all bus users.
'No user existing.
'Serial Poll, read Status Byte,
'This instrument has bits set
'in the STB.
'Enable SRQ routine again;
'End of SRQ routine.
'Reading the output buffer.
D.5
F-6

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

Nrt-b1Nrt-b2Nrt-b3Nrt-z3Nrt-z4Nrt-b1z43 ... Afficher tout

Table des Matières