Download Print this page

Fluke 225C Programming Reference Manual page 90

Remote control and programming reference
Hide thumbs Also See for 225C:

Advertisement

'
'*****************
CLS
OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1
PRINT #1, "RI"
GOSUB Acknowledge
SLEEP 2
GOSUB ClearPort
PRINT #1, "ID"
GOSUB Acknowledge
INPUT #1, IDENT$
PRINT IDENT$
CLOSE #1
END
'****************
'Use this subroutine after each command or query sent to the
'ScopeMeter. This routine inputs the acknowledge
'response from the ScopeMeter. If the response is non-zero,
'the previous command was not correct or was not correctly
'received by the ScopeMeter. Then an error message is
'displayed and the program is aborted.
Acknowledge:
INPUT #1, ACK
IF ACK <> 0 THEN
PRINT "Error "; ACK; ": ";
SELECT CASE ACK
CASE 1
PRINT "Syntax Error"
CASE 2
PRINT "Execution Error"
CASE 3
PRINT "Synchronization Error"
CASE 4
PRINT "Communication Error"
CASE IS < 1
PRINT "Unknown Acknowledge"
CASE IS > 4
PRINT "Unknown Acknowledge"
END SELECT
PRINT "Program aborted."
END
END IF
RETURN
'*******
Clears pending data from the RS232 port *********
ClearPort:
WHILE LOC(1) > 0
Dummy$ = INPUT$(1, #1)
WEND
RETURN
'******************
Page 3.62
Begin example program
'Clears the PC screen.
'Sends the RESET INSTRUMENT command.
'Input acknowledge from ScopeMeter.
'Delay (2 s) necessary after reset.
'Clears pending data from port.
'Sends IDENTIFICATION query.
'Input acknowledge from ScopeMeter.
'Inputs the queried data.
'Displays queried data.
Acknowledge subroutine
'Reads acknowledge from ScopeMeter.
End example program
*****************
******************
******************

Advertisement

loading

This manual is also suitable for:

Scopemeter 190 series