I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port
I can't seem to read data from the com port I can't seem to read data from the com port
I can't seem to read data from the com port
Go Back  Xtreme Visual Basic Talk > > > I can't seem to read data from the com port


Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2012, 09:46 AM
gordk gordk is offline
Newcomer
 
Join Date: Sep 2012
Posts: 1
Default I can't seem to read data from the com port


HI

I need a simple bit of code that will read data at the serial port “SerialPort1”
and store it in a variable then show it in a RichTextBox in real time.

It will be called as a function "read_data", so I will use a button send data to the com port (that is working) then read the com port incoming data, save as a string variable and show it in a richtextbox or other kind of text box in realtime.

I have tried a lot of code examples but nothing seems to work and it’s very frustrating’

Does anyone have a bit of code that works, I can’t belive that there is not a way to do this but I can’t seem to find it.

Help Help

Thanks

Gord
Reply With Quote
  #2  
Old 09-16-2012, 07:26 PM
passel's Avatar
passelI can't seem to read data from the com port passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

Perhaps this thread on emulating VB6 OnComm event may help. I don't know the format of the data you're reading and want to display, but in the case of the example in that thread, I had a problem reading it as a string, but then the data being transferred from the mouse isn't string data, so probably shouldn't be read as a string anyway.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 09-17-2012, 12:09 PM
Cerian Knight's Avatar
Cerian KnightI can't seem to read data from the com port Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,199
Default

For lack of a better place to bring this up... when we say 'that is working', that should mean that we've seen the port actually transact data. However, in several cases recently I've seen 'that is working' (or some similar wording) refer to the status of the COM port in Device Manager rather than proof of its actual functionality.

For example, under Windows 7 (XP works fine, not sure about Vista), if someone reassigns the COM port number (under Advanced Port Settings) it is quite possible (and likely in my experience) that the port does not actually work now, even if Device Manager reports that the port is working properly. The solution is to reinstall the driver for the port after reassignment (using 'Update Driver.../Browse my computer../Let me pick from a list...' in order to avoid needing to find the driver package).
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port I can't seem to read data from the com port
I can't seem to read data from the com port
I can't seem to read data from the com port
 
I can't seem to read data from the com port
I can't seem to read data from the com port
 
-->