Solved

splitting a comm port infos into array of strings

Posted on 2004-08-11
4
131 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 58
Calculate number of nights between two dates 5 86
Generate Numbers in JQuery file 11 71
Filtering a datagrid view 8 33
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

680 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