JDS Uniphase RM3750 ユーザーズマニュアル

ページ / 41
RM3 SERIES BACKREFLECTION METER
USER’S MANUAL
10112341 Rev 002
Page 40 of 39
Programming Examples
RS232 Interface Program Example
The following program can be used to connect the RM meter with an external device through
the RS232 serial interface.
100 CLOSE #1
' Initialize the RS232C port
110 OPEN "COM1:300,N,8,2" AS #1
200 PRINT #1,"B";
' Go to Backreflection mode
210 INPUT #1,IN$
220 IF IN$ = "Y" THEN GOTO 250 ' Check if the command was accepted
230 PRINT "WILL NOT DISPLAY BR"
240 STOP
250 FOR I=1 TO 5
Read 
and 
display 
five 
BR
measurements
260  PRINT #1,"G";
270  INPUT #1,IN$
280  PRINT IN$
290 NEXT I
300 PRINT #1,"A";
' Go to Power mode
310 INPUT #1,IN$
320 IF IN$ = "Y" THEN GOTO 350 ' Check if the command was accepted
330 PRINT "WILL NOT DISPLAY POWER"
340 STOP
350 FOR I=1 TO 5
' Read, display five power
measurements
360  PRINT #1,"G";
370  INPUT #1,IN$
380  PRINT IN$
390 NEXT I
400 CLOSE #1
410 END