Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

splitting a comm port infos into array of strings

Posted on 2004-08-11
4
130 Views
Last Modified: 2010-04-23
i wnat to know what are the function that i should use to splitt a comm port incoming informations into an array of strings:
(how do i know end of line, space, tab, ...)
i know how to open the port and to get infos from and print them
0
Comment
Question by:pcnet2004
4 Comments
 
LVL 8

Accepted Solution

by:
wguerram earned 25 total points
ID: 11772847
That will depend on the hardware that is sending data to the port.

sometimes you can assign the character that will represent the end of a line or in the manual of the hardware it is specified.

If you are using the COMMPort control that ships with Visual Studio 6.0,
you can use something like a timer to check if you have not been receiving input during a lapse of time.

when the OnComm event is raised you can reset the timer to wait 1 second for example. if timer event is raised, it means that you are not receiving Data, so you should process the info you have.

If you need more help, feel free to ask it.
0
 
LVL 4

Assisted Solution

by:y1381
y1381 earned 25 total points
ID: 11775764
http://www.codeworks.it/net/VBNetRs232.htm

Use this to make you life simpler. This LIbrary is FREE and has built in routines to get data from COM ports etc. You can use this to get data from COM port and then use

String.split to split data

Refer : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp

to get information about end of line space etc you would probably need their ascii values get that from here\

http://www.asciitable.com/

hth

--yatharth

0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question