H
Henning M
Hi all,
Im trying to send a command to my uprocessor project, but when i try to read
the answer for the uPU I get the same commed I just send to it???
It is as if the command isn't send before I close the connection?
Can it have something to do with Async/sync read/write????
Everything works when I just type the commands i Hyper Terminal
I get the respond as I should...
Here is the code I use...
Dim obj_RS232 As New Rs232()
Dim char_input As Char
obj_RS232.Open(1, 19200, 8, Rs232.DataParity.Parity_None,
Rs232.DataStopBit.StopBit_1, 128)
obj_RS232.Write("DSTATUS" & vbCr)
txtb_result.Clear()
Do
obj_RS232.Read(1)
char_input = obj_RS232.InputStreamString()
txtb_result.Text &= char_input
Loop While Not (char_input = vbCr)
obj_RS232.Close()
Hope someone can help.
/Henning
Im trying to send a command to my uprocessor project, but when i try to read
the answer for the uPU I get the same commed I just send to it???
It is as if the command isn't send before I close the connection?
Can it have something to do with Async/sync read/write????
Everything works when I just type the commands i Hyper Terminal
I get the respond as I should...
Here is the code I use...
Dim obj_RS232 As New Rs232()
Dim char_input As Char
obj_RS232.Open(1, 19200, 8, Rs232.DataParity.Parity_None,
Rs232.DataStopBit.StopBit_1, 128)
obj_RS232.Write("DSTATUS" & vbCr)
txtb_result.Clear()
Do
obj_RS232.Read(1)
char_input = obj_RS232.InputStreamString()
txtb_result.Text &= char_input
Loop While Not (char_input = vbCr)
obj_RS232.Close()
Hope someone can help.
/Henning