R3753-01.txt

Togotech (토론 | 기여)님의 2020년 5월 7일 (목) 17:18 판 (새 문서: R3753BH <pre> 10 !채널 1,2 각가 AMPL. phase 20 GOSUB Declaration 30 GOSUB Fileopen 40 GOSUB Measure_select 50 GOSUB Network_setup 60 GOSUB Measure 70...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

R3753BH

10     !채널 1,2 각가 AMPL. phase
20     GOSUB Declaration
30     GOSUB Fileopen
40     GOSUB Measure_select
50     GOSUB Network_setup
60     GOSUB Measure
70     GOSUB Fileclose
80     STOP
90 Declaration:              !!!!!!!!!!!!!!!!
100    OPTION BASE 1
110    DIM Msg$[255]
120    DIM Form1(1201),Form2(1201)   !NOP=401
130    INTEGER I
140    RETURN
150 Measure_select:             !!!!!!!!!!!!!!!!
160    ASSIGN @Na TO 711
170    OUTPUT @Na;"OLDC ON"  !IEEE488.1-1987 command mode가 ON된다.
180  ! ASSIGN @Na_fmt_off TO 711;FORMAT OFF,SWAP ON
190    RETURN
200   !!!!!!!디바이스 개별에 따른 초기값 세팅 !!!!!!!
210 Network_setup:             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
220    OUTPUT @Na;"*IDN?"
230    ENTER @Na;Msg$
240    DISP Msg$
250 !  OUTPUT @Na;"FORM3"  ! FORMAT:DATA:REAL,64
260    OUTPUT @Na;"FORM0"  ! ascii
270    RETURN
280 Fileclose:             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
290    ASSIGN @File TO *
300    OUTPUT @Na;"REM 0"  !remote false 이 명령어를 수행해야 local 후 버튼이 동작한다.
310    ASSIGN @Na TO *
320    RETURN
330 Measure:              !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
340  ! OUTPUT @Na;"*OPC?"
350  ! OUTPUT @Na;"SINGLE"
360  ! ENTER @Na;Tmp
370    OUTPUT @Na;"OT1DFOR"   !output trace / first wave/ data formatting
380  ! OUTPUT @Na;"OT1MFOR"   !output trace / 1(~4) ch / memory formatting
390  !  ENTER @Na_fmt_off;Form(*)
400    ENTER @Na;Form1(*)
410    OUTPUT @Na;"OT2DFOR"   !output trace / second wave  / data formatting
420    ENTER @Na;Form2(*)
430    FOR I=1 TO 1201
440      DISP I,Form1(I),Form2(I)
450      OUTPUT @File;I,Form1(I),Form2(I)
460    NEXT I
470    RETURN
480 Fileopen:             !
490    DIM Filename$[20],Dhms$[8]
500    Time$=TIME$(TIMEDATE)
510    Date$=DATE$(TIMEDATE)
520    Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
530    Filename$=Dhms$&".txt"
540    CREATE Filename$,1
550    ASSIGN @File TO Filename$;FORMAT ON
560    RETURN
570    END