yarmiaanuj
Member
- Joined
- May 21, 2012
- Messages
- 12
- Programming Experience
- 1-3
hello...now i have come with a new problem....the above problem was solved and i got quiet a close result i wanted....
now i am trying to receive 53 bytes in one go but the data is coming in two chunks....and size of each is variable all the time.
below is the code:
the device is sending all 53 bytes at same time, Realterm is showing all of them....but when i tried it on vb.net, the value of 'n' is variable but sums to 53 all the time.
How can i recieve all 53 bytes and display all 53 in textbox1 ???
now i am trying to receive 53 bytes in one go but the data is coming in two chunks....and size of each is variable all the time.
below is the code:
Dim n As Integer = SerialPort1.BytesToRead comBuffer = New Byte(n - 1) {} SerialPort1.Read(comBuffer, 0, n) comBuffer.Reverse() dat = dat & CStr(Hex(comBuffer(0))) If Len(dat) = 1 Then dat = "0" & dat End If MsgBox(n) TextBox1.Text = TextBox1.Text & Environment.NewLine & dat
the device is sending all 53 bytes at same time, Realterm is showing all of them....but when i tried it on vb.net, the value of 'n' is variable but sums to 53 all the time.
How can i recieve all 53 bytes and display all 53 in textbox1 ???