215
────────────────────────────────────────────────────
12.6 Sample Programs
────────────────────────────────────────────────────
Voltage 150 V range
Current 10 A range
PT ratio 3
CT ratio 2
Rectifier type RMS
Integration time 1 hour
Integration item Active power
Data output interval 1 minute
12.6.1 GP-IB
10 DIM A$[100]
10 文字配列の宣言
20 CLEAR 701
20 インタフェース初期化
30 OUTPUT 701;"*RST"
30 3193を初期化する
40 OUTPUT 701;":TRAN:TERM 1"
40 ターミネータをCR+LFにする
50 OUTPUT 701;":VOLT1:RANG 150;AUTO OFF;MEAN OFF" 50 電圧レンジ150V
60 OUTPUT 701;":CURR1:RANG 10;AUTO OFF;MEAN OFF" 60 電流レンジ10A
70 OUTPUT 701;":SCAL1:PT 3;CT 2;CONT ON,ON,OFF" 70 スケーリング PT比3、CT比2
80 OUTPUT 701;":TIMER:TIME 1,0;CONTROL ON"
80 タイマ時間セット
90 OUTPUT 701;":INTER:TIME 0,1,0;CONTROL ON"
90 インターバル時間セット
100 OUTPUT 701;"*ESE 0;*ESE0 4;*SRE 0"
100 ESE、ESE0のセット
110 OUTPUT 701;":HEAD ON"
110 ヘッダ ON
120 OUTPUT 701;"*CLS"
120 イベントステータスレジスタクリア
130 OUTPUT 701;":INTEG:START"
130 積算スタート
140 OUTPUT 701;"*STB?"
140 STB問合わせ
150 ENTER 701;A$
150 STB読み込み
160 IF A$<>"*STB 1" THEN GOTO 140
160 STBが1でなかったら140行へ。
170 OUTPUT 701;":MEAS? TIME,WP1,PWP1,MWP1"
170 積算値と積算時間の問合せ
180 ENTER 701;A$
180 積算値と積算時間の読み込み
190 PRINT A$
190 積算値の表示
200 OUTPUT 701;":INTEG?"
200 積算状態の問合せ
210 ENTER 701;A$
210 積算状態の読み込み
220 IF A$=":INTEGRATE 0" THEN GOTO 250
220 積算が終了していたら250行へ
230 OUTPUT 701;"*CLS"
230 イベントステータスレジスタクリア
240 GOTO 140
240 140行へ飛ぶ
250 OUTPUT 701;":INTEG:RESET"
250 積算リセット
260 END
260 終了
10 Declare character arrays
20 Initialize the interface
30 Initialize
40 Set delimiter to "CR+LF"
50 Set ranges to 150 V
60 Set ranges to 10 A
70 Set PT ratio to 3, CT ratio to 2
80 Set timer
90 Set interval time
100 Set ESE, ESE0
110 Enable header
120 Clear event status registers
130 Start integration
140 Query contents of status byte
150 Get contents of status byte
160 Branches to line 140 when STB is not 1
170 Query integration value and time
180 Get integration value and time
190 Display integration value
200 Query integration condition
210 Get integration condition
220 Branches to line 250 when integration stops
230 Clear event status registers
240 Branches to line 140
250 Reset integration value
260 End of program
TIME 00000,00,00;WP1 +0.00000kWh;PWP1 +0.00000kWh;MWP1 ‑0.00000kWh
TIME 00000,01,00;WP1 +0.06000kWh;PWP1 +0.06000kWh;MWP1 ‑0.00000kWh
TIME 00000,02,00;WP1 +0.12000kWh;PWP1 +0.12000kWh;MWP1 ‑0.00000kWh
TIME 00000,03,00;WP1 +0.18000kWh;PWP1 +0.18000kWh;MWP1 ‑0.00000kWh
TIME 00000,04,00;WP1 +0.24000kWh;PWP1 +0.24000kWh;MWP1 ‑0.00000kWh
TIME 00000,05,00;WP1 +0.30000kWh;PWP1 +0.30000kWh;MWP1 ‑0.00000kWh
TIME 00000,06,00;WP1 +0.36000kWh;PWP1 +0.36000kWh;MWP1 ‑0.00000kWh
TIME 00000,56,00;WP1 +3.36000kWh;PWP1 +3.36000kWh;MWP1 ‑0.00000kWh
TIME 00000,57,00;WP1 +3.42000kWh;PWP1 +3.42000kWh;MWP1 ‑0.00000kWh
TIME 00000,58,00;WP1 +3.48000kWh;PWP1 +3.48000kWh;MWP1 ‑0.00000kWh
TIME 00000,59,00;WP1 +3.54000kWh;PWP1 +3.54000kWh;MWP1 ‑0.00000kWh
TIME 00001,00,00;WPI +3.60000kWh;PWP1 +3.60000kWh;MWP1 ‑0.00000kWh
Execution results
12.6 Sample Programs
As examples of interface, shows sample programs.
The contents of programs: Setting of range, scaling and rectifier type and
displaying to get integrate elapsed time and integrate value at regular
intervals (a minute at this point).
The sample programs of GP-IB and RS-232C are the same contents.
The sample programs of GP-IB are written in HP-BASIC (by Hewlett
Packard) and of RS-232C are written in Quick BASIC (by Microsoft).
Setting condition
Program list
Program comments
Summary of Contents for Power HiTester 3193
Page 2: ......
Page 50: ...32 3 9 Operations During Power Failure ...
Page 76: ...58 4 13 Degaussing ...
Page 80: ...62 5 2 Setting the Frequency Range fa ...
Page 108: ...90 9 3 Internal Circuit for the External Control and Timing ...
Page 112: ...94 10 3 Output Rate ...
Page 250: ...232 13 9 Error and Overflow Displays ...
Page 278: ...260 17 5 Internal Block Diagram ...
Page 284: ...266 19 2 Installation Procedures For JIS standard For EIA standard External Dimensions ...
Page 300: ...282 20 4 Internal Block Diagram of the 3193 ...
Page 306: ...INDEX 4 Index ...
Page 307: ......
Page 308: ......
Page 309: ......
Page 310: ......