FAQs from Rohde & Schwarz

Transfer Hardcopy from FSP to PC via GPIB

Question

Is it possible to copy a hardcopy file from the FSP hard disk to the floppy disk of a PC by using GPIB commands?

Answer

Yes, it is possible to do so. In the following, you will find a BASIC example showing how to copy a hardcopy file from the FSP hard disk to the GPIB controller.

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