Télécharger Imprimer la page

Rohde & Schwarz FPL1000 Manuel D'utilisation page 1026

Masquer les pouces Voir aussi pour FPL1000:

Publicité

Les langues disponibles

Les langues disponibles

®
R&S
FPL1000
10.12.7.1
Initiate service request
REM ---- Example of initialization of the SRQ in the case
' of errors -------
PUBLIC SUB SetupSRQ()
CALL InstrWrite (analyzer, "*CLS") 'Reset status reporting system
CALL InstrWrite (analyzer, "*SRE 168") 'Enable service request for
'STAT:OPER, STAT:QUES and ESR
'register
CALL InstrWrite (analyzer, "*ESE 60") 'Set event enable bit for
'command, execution, device-
'dependent and query error
CALL InstrWrite (analyzer, "STAT:OPER:ENAB 32767")
'Set OPERation enable bit for
'all events
CALL InstrWrite (analyzer, "STAT:OPER:PTR 32767")
'Set appropriate OPERation
'Ptransition bits
CALL InstrWrite (analyzer, "STAT:QUES:ENAB 32767")
'Set questionable enable bits
'for all events
CALL InstrWrite (analyzer, "STAT:QUES:PTR 32767")
'Set appropriate questionable
'Ptransition bits
CALL viEnableEvent(analyzer, VI_EVENT_SERVICE_REQ, VI_QUEUE, 0)
'Enable the event for service
'request
Status = viWaitOnEvent(analyzer, VI_EVENT_SERVICE_REQ, SRQWaitTimeout, VI_NULL,
VI_NULL)
IF (status = VI_SUCCESS) THEN CALL Srq
'If SRQ is recognized =>
'subroutine for evaluation
END SUB
REM ***********************************************************************
Private mbSession As MessageBasedSession
Sub Main()
Console.WriteLine("Example of initialization
Dim SRQWaitTimeout = 4000 ' Timeout As Integer for WaitOnEvent
'Opening session
Try
Manuel d'utilisation 1179.5860.09 - 12
of the SRQ in the case of errors.")
'Analyzer is alias, instead of using resource string.
'For example on TCP use TCPIP0::192.168.1.2::inst0::INSTR
mbSession = CType(ResourceManager.GetLocalManager().Open("Analyzer"), _
mbSession.TerminationCharacterEnabled = True
Try
mbSession.Write("*CLS") 'Reset status reporting system
Using the status register
_
MessageBasedSession)
Remote commands
1026
1026

Publicité

loading