YOKOGAWA WT200 User Manual page 154

Digital power meter
Table of Contents

Advertisement

IM 253421-01E
IF (ibsta% AND EERR) THEN
CALL gpiberr("Ibrd error")
ELSE
RD$ = LEFT$(RD$, ibcnt% - 2)
PRINT RD$
IF (RD$ <> "END") GOTO RDDAT
END IF
NEXT I
'STOP
'END
'
'
'*******************************************************
'*
read measurement data used service request
'*
'*******************************************************
PRINT ""
' interface clear
CALL IBCLR(DEV%)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibclr error")
' SRQ interrupt enable
WRT$ = "IM1"
CALL IBWRT(DEV%, WRT$)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibwrt error")
' statusbyte initialize
CALL IBRSP(DEV%, SPR%)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibrsp error")
FOR J = 1 TO 10
SBWAIT:
MASK% = &H4800
CALL IBWAIT(DEV%, MASK%)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibwait error")
' read status byte
CALL IBRSP(DEV%, SPR%)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibrsp error")
IF (SPR% <> &H41) GOTO SBWAIT
' read mesurement data
WRT$ = "OD"
CALL IBWRT(DEV%, WRT$)
IF (ibsta% AND EERR) THEN CALL gpiberr("Ibwrt error")
RDDAT2:
RD$ = SPACE$(255)
CALL IBRD(DEV%, RD$)
IF (ibsta% AND EERR) THEN
CALL gpiberr("Ibrd error")
ELSE
RD$ = LEFT$(RD$, ibcnt% - 2)
PRINT RD$
IF (RD$ <> "END") GOTO RDDAT2
END IF
NEXT J
'
Call the IBONL function to disable the hardware and software.
CALL IBONL(DEV%, 0)
END
13.2 Sample Program
*
*
13-15
13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents