Temat: Jak odczytać dane z portu COM RS232 ? VBA
Witam,W jaki sposób pobrać wartość z wagi Mettler Toledo połączonej kablem COM to COM RS232.
Otwieram chyba port ale co dalej ...?
function pobierz_dane()
Dim MSComm1 As MSComm
Dim Cmnd As String
Dim InpVal As String
Set MSComm1 = New MSComm
With MSComm1
.CommPort = 4 '"COM1"
.InBufferSize = 1024
.Settings = "9600,n,8,1"
'.Settings = "9600,e,8,1"
.InputLen = 12
.PortOpen = True
'.InputMode = comInputModeText
' Cmnd = "11:0"
'.Output = Cmnd
End With
msgbox "Wynik z wagi ..."
end function
Paweł