I am new to .NET and have tried to convert an existing working VB6 application over to 2008 VB
.NET. For the most part, everything is OK and workable but the fundamental COM object is totally different. I need to write a series of Bytes from a buffer using "SerialPort". I have an instance of the object on a form and have checked the instance's properties (called SerialPort1) to be correct - 9600 Baud, 8 bit characters, no handshaking. I am using the following command to send 9 bytes from a command button on the form
SerialPort1.Write(OutputBuffer, Offset, 9)
The Write routine contains:
Public Sub Write(ByVal buffer As Byte(), ByVal offset As Integer _
ByVal count As Integer)
I am establishing Byte values within the OutputBuffer array that contain numeric values and in debug mode they are there correctly for transmission. It is pretty straightforward but not working. I know the hardware is good as the same app running in VB6 runs fine to the same board on the same PC with the same cable. My .NET code does not generate any errors in design time or run time, but I get no output on the target hardware. the string should light a series of LEDs on the I/O board.
Does anybody have experience in fundamental non-handshaking RS232C serial communications that is doing this or can point me in the right direction?