Solved

splitting a comm port infos into array of strings

Posted on 2004-08-11
4
132 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
[X]
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
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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