Solved

splitting a comm port infos into array of strings

Posted on 2004-08-11
4
128 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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now