EasyManua.ls Logo

Hioki 3166 - Rs-232 C

Hioki 3166
380 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
238
────────────────────────────────────────────────────
11.5 Sample Program
────────────────────────────────────────────────────
1
1.5.1 RS-232C
10
0
11
0
12
0
13
0
14
0
15
0
16
0
17
0
18
0
19
0
20
0
21
0
22
0
23
0
24
0
25
0
26
0
27
0
28
0
29
0
30
0
31
0
32
0
33
0
34
0
35
0
36
0
37
0
38
0
39
0
40
0
41
0
42
0
43
0
44
0
45
0
46
0
47
0
48
0
49
0
50
0
51
0
52
0
53
0
OPEN "COM1:9600,N,8,1,RS,RB4096" FOR RANDOM
AS #1
PRINT #1, ":RESET"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":DISP:INTE 3"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":DRES"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":VOLT:RANG 150"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":CURR:RANG 100"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":WIRING 1"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":SCALE:PT 1"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":SCALE:CT 1"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":OPER OFF"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":INTE:STAR:METH MANUAL"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":INTE:STOP:METH TIMER"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":INTE:TIME 1,0,0"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":HEAD OFF"
LINE INPUT #1, tmp$: PRINT tmp$
PRINT #1, ":INTE:START"
LINE INPUT #1, tmp$: PRINT tmp$
GOSUB wait3sec:
PRINT #1, ":INTE:STAT?"
INPUT #1, stat$
IF stat$ <> "1" THEN 390
PRINT #1, ":MEAS:INTE?
0,0,0,0,0,0,0,0,0,0,255,255,255"
LINE INPUT #1, MEAS$
PRINT MEAS$
CLOSE
END
wait3sec:
SEC = VAL(MID$(TIME$, 7, 2))
SEC2 = VAL(MID$(TIME$, 7, 2))
IF SEC2 < SEC THEN SEC2 = SEC2 + 60
IF (SEC2 SEC) < 3 THEN 500
RETURN
NOTE
Program list Program comments
100 Open the RS-232C line file
110 Executes a system reset.
120 Waits for a response
130 Displays the Integrated value display screen
(page 1/2 ).
150 Resets the integration data.
170 Sets the voltage to the 150V range.
190 Sets the current to the 100A range.
210 Sets the wiring to single-phase, two-wire.
230 Sets the PT ratio to "1".
250 Sets the CT ratio to "1".
270 Sets the reactive power method so that it is not
used.
290 Sets "manual start" for integration.
310 Sets integration to the stop timer.
330 Sets them timer (integration time) to 1 hour.
350 Turns the response header off.
370 Starts integrated measurement.
390 Waits for approximately 3 seconds.
400 Inquires about the integration status.
420 Jumps to 390 if stat$ is not "1" (Has the effect
of waiting until integrated measurement is
complete.)
430 Gets the integrated data.
450 Displays the integrated data on the personal
computer screen.
460 Closes the RS-232C line file.
480 to 530 Three-second wait routine
Follow commands with "LINE INPUT #1, tmp$" in the next line. (tmp$ is
optional.)
The display language is shifted to Japanese by executing a reset command.

Table of Contents