Question SerialPort no reaction

Min Ha Jin

New member
Joined
Jul 10, 2013
Messages
1
Programming Experience
3-5
I have been testing the SerialPort communications.

The packet format

STX + M + ENQ + ETX + BCC

My coding

SerialPort1.Open()

Dim b(4) As Byte
b(0) = &H2 'STX
b(1) = CByte(Asc("M"))
b(2) = &H5 'ENQ
b(3) = &H3 'ETX
Dim bcc As Byte = 0 'checksum????

For x As Integer = 0 To 3
bcc ^= b(x)
Next
b(4) = bcc

SerialPort1.Write(b, 0, b.Length)


I do not know what the problem is.
Equipment does not have a reaction.
To ask for help.
 
Back
Top