A
Adriano
Hello,
I'm developing an application in VB.NET 2005 that communicates with a device
through RS232,
and need to send the following sequence of hexadecimal data to the device:
0xFF, 0x01, 0xC3, 0xE3, 0xFF, 0xFF.
That's the configuration:
SerialPort.PortName = "COM1"
SerialPort.BaudRate = 9600
SerialPort.StopBits = IO.Ports.StopBits.One
SerialPort.DataBits = 8
SerialPort.Parity = IO.Ports.Parity.None
If SerialPort.IsOpen = False Then
SerialPort.Open()
End If
How to send and receive data???
??? SerialPort.Write(??????)
??? TextBox1.Text = SerialPort.ReadExisting
SerialPort.Close()
p.s. according to manual, the responce of device is also in hexadeciaml
format, smt. like 0xFF, 0x01, 0xC3, 0x00, 0x05, 0xFF
Any help would be greatly appreciated,
thanks in advance,
Adriano
I'm developing an application in VB.NET 2005 that communicates with a device
through RS232,
and need to send the following sequence of hexadecimal data to the device:
0xFF, 0x01, 0xC3, 0xE3, 0xFF, 0xFF.
That's the configuration:
SerialPort.PortName = "COM1"
SerialPort.BaudRate = 9600
SerialPort.StopBits = IO.Ports.StopBits.One
SerialPort.DataBits = 8
SerialPort.Parity = IO.Ports.Parity.None
If SerialPort.IsOpen = False Then
SerialPort.Open()
End If
How to send and receive data???
??? SerialPort.Write(??????)
??? TextBox1.Text = SerialPort.ReadExisting
SerialPort.Close()
p.s. according to manual, the responce of device is also in hexadeciaml
format, smt. like 0xFF, 0x01, 0xC3, 0x00, 0x05, 0xFF
Any help would be greatly appreciated,
thanks in advance,
Adriano