Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15038

[MSComm] receiving binary and ASCII data

$
0
0
Quote:

20/ 9/10 8:59 000000074290ZےےJA?¨4.88 13.2 41.1 84.2 27.0 32.1 319 42.4 7.3 50.3 3.7 0.6 4.4 14.0 42.7 8.9 7.9 10.7 57.9145.6 - ---

"(..+&
+G]dZD/! 4UdYD5'
$11 C10
I get the above data when I use the following code:
Code:

Dim bBuffer() As Byte

comRS232.InputMode = comInputModeBinary

If comRS232.InBufferCount > 0 Then
    ReDim bBuffer(comRS232.InBufferCount - 1) As Byte
    bBuffer = comRS232.Input
    inpString = inpString + StrConv(bBuffer, vbUnicode)
End If

'Parse inpString when whole the message is received

It is incorrect and missing a lot of binary data as per described by the instrument manual :(

When I use ComTestSerial from MicroRidge company it receives the following data which is the correct data:
Quote:

20/ 9/10 8:44 000000074284Z ےے ےے ےے Kے †œ+D نu l ' ‹v x ] ×C
7.5 5.09 13.4 41.3 81.1 26.3 32.4 228 37.3 10.8 51.9 2.8 0.8 3.9 13.9 37.4 12.0 9.3 21.5 57.9154.9 -
6db8
ے
%/7:71*
ے<Xd]F0"ے -NbdZMB8-#


.>Qdے11 C10 U
I do appreciate your help!

Viewing all articles
Browse latest Browse all 15038

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>