Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = 9600,n,8,1
MSComm1.InBufferSize =1024
MSComm1.OutBufferSize =1024
MSComm1.InputLen = 0
MSComm1.PortOpen = True
End Sub
Private Sub Command1_Click()
MSComm1.Output =“ *RST ”+ Chr$(13) ’设置缺省配置
MSComm1.Output = “OUTX0;LOCL1” + Chr$(13) ’设置传输协议,“0”为RS232,“1”为GPIB
MSComm1.Output = “DDEF1,1,0;DDEF2,1,0” + Chr$(13) ’设置所用通道
MSComm1.Output = "FPOP1,0;FPOP2,0" + Chr$(13) ’设置通道的显示面板
MSComm1.Output = SENSIT$ + Chr$(13) ’设置灵敏度
MSComm1.Output = PHA_SHIFT + Chr$(13) ’设置参考相位偏移
MSComm1.Output = OUT_AMPLIT + Chr$(13) ’设置正弦信号幅度
MSComm1.Output = "SEND0" + Chr$(13) ’设置缓冲区存储数据的模式
MSComm1.Output = SAMRATE$ + Chr$(13) ’设置采样率
End Sub
[此贴子已经被作者于2007-9-26 11:25:56编辑过]