发表于:2003-04-10 20:57:00
楼主
MSComm1.CommPort = 1
MSComm1.Settings = "4800,n,8,2"
MSComm1.InputMode = 1
MSComm1.InputLen = 0
MSComm1.RTSEnable = False
MSComm1.DTREnable = True
MSComm1.PortOpen = True
combyte(0) = 128 + 0
combyte(1) = 128 + 0
combyte(2) = 67
combyte(3) = 0
MSComm1.Output = combyte
Do
DoEvents
Loop Until MSComm1.InBufferCount >= 8
instring = MSComm1.Input
MSComm1.PortOpen = False
mTempSam(1) = (instring(0) + 256 * instring(1)) / 10
txtTemp(0) = Str(mTempSam(1))
那位大虾能把它转换成labview
不胜感激请发zhangminzhe@msn.com