Synchronisation Des Instructions - Rohde & Schwarz NRT Manuel D'utilisation

Table des Matières

Publicité

Exemples de programmation
D . 7

Synchronisation des instructions

Les options de synchronisation implémentées dans l'exemple suivant sont décrites au paragraphe 3.6.6,
Ordre des instructions et leur synchronisation.
REM ---Examples for Command Synchronization: ---------
REM ---The command TRIGer:trigger:immediate requires a relatively long execution
REM ---time (sensor-dependent). It should be ensured that the next command is only
REM ---executed after the result of the measurement has been obtained.
CALL IECOUT("SENS1:FUNC:CONC OFF")
CALL IECOUT("SENS1:FUNC 'POW:FORW:AVER:BURS'") 'Switch on Average Burst
REM -------------------------- First option: Use of *WAI -------------------------
CALL IECOUT("TRIG; *WAI; :SENS1:DATA? 'POW:FORW:AVER:BURS'")
CALL IECIN(Value$)
PRINT "Measured value TRIG WAI: ";Value$
REM -------------------------- Second option: Use of *OPC? -----------------------
CALL IECOUT("TRIG; *OPC?")
REM ---------------------------- here the controller can service other devices ---
CALL IECIN(OpcOk$)
CALL IECOUT("SENS1:DATA? 'POW:FORW:AVER:BURS'")
CALL IECIN(Value$)
PRINT "Measured value TRIG *OPC?: "; Value$
REM -------------------------- Third option: Use of *OPC ------------------------
REM ---In order to use the service request function with National Instruments
REM ---GPIB driver, the setting "Disable Auto Serial Poll" must be changed to
REM ---"yes" by means of IBCONF!
CALL IECOUT("*SRE 32")
CALL IECOUT("*ESE 1")
ON PEN GOSUB OpcReady
PEN ON
CALL IECOUT("TRIG; *OPC")
REM ------------------------------- Continue main program -----------------------
STOP
OpcReady:
REM --- As soon as the result of the measurement has been obtained, this subroutine
REM --- is activated.
REM --- Program reaction suitable for the OPC service request, e. g.:
CALL IECOUT("SENS1:DATA? 'POW:FORW:AVER:BURS'")
CALL IECIN(Value$)
RETURN
REM********************************************************************************
1080.9506.02
'Only one measuring function must be
'active.
'measuring function.
'Wait for "1" from *OPC?
'i. e. the triggered measured result
'is available,
'only then the result can be
'read out.
'Enable service request for ESR,
'Set event enable bit for
'operation complete bit.
'Initialize service
'request routine.
'End of program.
D.4
NRT
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