通过 gpib 将硬拷贝文件从 fsp 传输到 pc -九游官网下载

问题

能否使用 gpib 命令,将硬拷贝文件从 fsp 硬盘传输到 pc 的软盘?

回答

是的,可以这样做。下面描述了如何将硬拷贝文件从 fsp 硬盘复制到 gpib 控制器的 basic 示例。

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

网站地图