Exemples de programmation
Failure:
CALL IECOUT("SYSTEM:ERROR?")
CALL IECIN(ERROR$)
PRINT "Error text:"; ERROR$
RETURN
Questionablestatus:
CALL IECOUT("STATus:QUEStionable:EVENt?")
CALL IECIN(Ques$)
IF (VAL(Ques$) AND 8) > 0 THEN PRINT "Power ranging control"
IF (VAL(Ques$) AND 512) > 0 THEN PRINT "SWR-warning"
IF (VAL(Ques$) AND 1024) > 0 THEN PRINT "Sensor warning"
IF (VAL(Ques$) AND 2048) > 0 THEN PRINT "Burst parameters invalid"
RETURN
Operationstatus:
CALL IECOUT("STATus:OPERation:EVENt?")
CALL IECIN(Oper$)
IF (VAL(Oper$) AND 2) > 0 THEN PRINT "Initializing sensor"
IF (VAL(Oper$) AND 16) > 0 THEN PRINT "Measurement started"
IF (VAL(Oper$) AND 32) > 0 THEN PRINT "Waiting for trigger"
IF (VAL(Oper$) AND 256) > 0 THEN PRINT "Battery operation"
IF (VAL(Oper$) AND 512) > 0 THEN PRINT "Determination of max./min values active"
RETURN
Esrread:
CALL IECOUT("*ESR?")
CALL IECIN(Esr$)
IF (VAL(Esr$) AND 1) > 0 THEN PRINT "Operation complete"
IF (VAL(Esr$) AND 4) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 8) > 0 THEN PRINT "Device dependent error"
IF (VAL(Esr$) AND 16) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 32) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 64) > 0 THEN PRINT "User request"
IF (VAL(Esr$) AND 128) > 0 THEN PRINT "Power on"
RETURN
REM **********************************************************
REM ---------------------------- Error routine -----------------------------------
Errorhandling:
PRINT "ERROR"
STOP
REM*******************************************************************************
REM*******************************************************************************
1080.9506.02
'Read error queue.
'Read Questionable Status register.
'Power value questionable,
'Standing wave ratio questionable,
'Read Operation-Status register.
'Read Event-Status register,
'Read ESR.
'Output error message,
'Abort program.
D.6
NRT
F-6