FAQs from Rohde & Schwarz

GPIB를 통해 FSP에서 PC로 하드카피 전송

질문

GPIB 명령을 사용하여 FSP 하드 디스크에서 PC의 플로피 디스크로 하드카피 파일을 복사할 수 있습니까?

답변

네, 가능합니다. 아래에 FSP 하드 디스크에서 GPIB 컨트롤러로 하드카피 파일을 복사하는 방법을 보여주는 예제가 나와 있습니다.

10 REM Set the termination EOI

20 IEC TERM 1

30 IEC OUT 20,"SYST:COMM:GPIB:RTER EOI"

40 REM Change the hardcopy language to WMF

50 IEC OUT 20,"HCOP:DEV:LANG WMF"

60 REM Change the hardcopy port to file

70 IEC OUT 20,"HCOP:DEST1 'MMEM'"

80 REM Set the file name

90 IEC OUT 20,"MMEM:NAME 'C:\USER\DATA\FILE.WMF'"

100 REM Make the hardcopy

110 IEC OUT 20,"HCOP;*WAI"

130 REM Set the path to hard disk c:

140 IEC OUT 20,"MMEM:MSIS 'C'"

150 REM Set the path

160 IEC OUT 20,"MMEM:CDIR '\USER\DATA\'"

170 REM Place the file in the output buffer

180 IEC OUT 20,"MMEM:DATA? 'FILE.WMF'"

190 REM The file is transferred with header. The first character is '#'

200 REM The next character indicates how many characters will follow

210 REM plus how large the file is without header

220 REM The header, for example #43210, will be removed by the

230 REM next steps.

240 REM Get the file out of the buffer

250 IEC IN 20,S$

270 X=VAL(MID$(S$,2,1))

280 Z=VAL(MID$(S$,3,X))

290 T$=MID$(S$,X+3,Z)

300 REM Open a file as output

310 OPENO# 1,"A:\HARDCOPY.WMF"

320 REM Save the WMF data to this file

330 PRINT# 1,T$

340 END