|
-
Jun 14th, 2013, 08:21 AM
#5
Thread Starter
New Member
Re: SerialPort problems, readline() hangs when using win xp (fine on win 7)
After more head pounding I am left very confused.
I dropped the serial receiving event and used just readline and write methods triggered simply by button presses. Still i get it hanging at readline.
For example:
Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
txtResponce.Clear()
ClearBuffer = SerialPort1.ReadExisting 'just in case clear any previous data
SerialPort1.Write("s")
responce = SerialPort1.ReadLine 'expect to read back the char "E" in reponce
txtResponce.Text &= responce
End Sub
There are now several other buttons to send out the other parts of the sequence, all following the code structure above. The following sequence of buttons pressed in turn would give: "1" , "1000" + vbcr , "500" + vbcr and finally "100" + vbcr. Completing the output sequence of command parameters.
Now here's the thing that that's really killing me. If I use a win 7 machine the app runs fine. If I use hyperterminal to send out the sequence above that too works fine. As soon as I go near XP it fails......
Not sure what to do now, but I am going to be avoiding high places for the foreseeable future 
Any help, suggestions, or debugging ideas will be hugely appreciated....
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|