Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn13-Feb-12 3:31
sitebuilderLuc Pattyn13-Feb-12 3:31 
GeneralRe: Please help me understand serial communication Pin
turbosupramk313-Feb-12 4:00
turbosupramk313-Feb-12 4:00 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn13-Feb-12 4:12
sitebuilderLuc Pattyn13-Feb-12 4:12 
GeneralRe: Please help me understand serial communication Pin
turbosupramk313-Feb-12 4:18
turbosupramk313-Feb-12 4:18 
GeneralRe: Please help me understand serial communication Pin
turbosupramk317-Feb-12 11:52
turbosupramk317-Feb-12 11:52 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn17-Feb-12 17:36
sitebuilderLuc Pattyn17-Feb-12 17:36 
GeneralRe: Please help me understand serial communication Pin
turbosupramk317-Feb-12 18:33
turbosupramk317-Feb-12 18:33 
AnswerRe: Please help me understand serial communication Pin
Dan Mos12-Feb-12 2:11
Dan Mos12-Feb-12 2:11 
As OriginalGriff and Luc already pointed out it's a let's say tricky thing.

When I createed my first program that dealt with searial port I was like "What's up with all this nonsence about SerialPort headeaches?".
I was lucky in that I only recevied a "1", "2", "3" or "X" and I always recieved the whole message.

Later on with some more complex messaging I started to see the "headeaches".

The only way to deal with is corectly is to have and know the message start and end specifications known as preffix and suffix in the "serialport world".

Since that day on, I always create(if possible) the suffix and the prefix for devices let's say a RS232 scanner.
If I'm not in control of the suffix and prefix I ask for them and won't accept a situation with no clear prefix and suffix data.

One needs to know when the message starts and when it ends. How you deal with it(e.g event or background worker as Luc suggested) it's your choice.
But you need to know when a message starts and when it ends. Else it's a gamble. I mean it.

Ex: 3CXXXXXXXXXXX[CR][LF]
In this example 3C marks the start of the message and "\r\n" the end. XXXXXXX is the actual message.
Smile | :)
All the best,

Dan

GeneralRe: Please help me understand serial communication Pin
turbosupramk312-Feb-12 4:21
turbosupramk312-Feb-12 4:21 
GeneralRe: Please help me understand serial communication Pin
Dan Mos12-Feb-12 5:44
Dan Mos12-Feb-12 5:44 
AnswerRe: Please help me understand serial communication Pin
turbosupramk312-Feb-12 7:44
turbosupramk312-Feb-12 7:44 
Questioncom add in excel2010 Pin
PozzaVecia11-Feb-12 0:19
PozzaVecia11-Feb-12 0:19 
AnswerRe: com add in excel2010 Pin
Eddy Vluggen11-Feb-12 3:29
professionalEddy Vluggen11-Feb-12 3:29 
GeneralRe: com add in excel2010 Pin
PozzaVecia11-Feb-12 6:18
PozzaVecia11-Feb-12 6:18 
AnswerRe: com add in excel2010 Pin
Abhinav S11-Feb-12 5:08
Abhinav S11-Feb-12 5:08 
GeneralRe: com add in excel2010 Pin
PozzaVecia11-Feb-12 5:31
PozzaVecia11-Feb-12 5:31 
GeneralRe: com add in excel2010 Pin
Abhinav S11-Feb-12 17:04
Abhinav S11-Feb-12 17:04 
GeneralRe: com add in excel2010 Pin
PozzaVecia11-Feb-12 6:09
PozzaVecia11-Feb-12 6:09 
Questionocr from japenese to english using c# with MODI Pin
udayakumard10-Feb-12 23:21
udayakumard10-Feb-12 23:21 
AnswerRe: ocr from japenese to english using c# with MODI Pin
Dave Kreskowiak11-Feb-12 2:08
mveDave Kreskowiak11-Feb-12 2:08 
QuestionAccess is denied Pin
jon-8010-Feb-12 22:29
professionaljon-8010-Feb-12 22:29 
AnswerRe: Access is denied Pin
fjdiewornncalwe11-Feb-12 5:40
professionalfjdiewornncalwe11-Feb-12 5:40 
QuestionWriting to an excel file Pin
JFRobertson10-Feb-12 20:12
JFRobertson10-Feb-12 20:12 
AnswerRe: Writing to an excel file Pin
Richard MacCutchan10-Feb-12 23:48
mveRichard MacCutchan10-Feb-12 23:48 
GeneralRe: Writing to an excel file Pin
JFRobertson11-Feb-12 8:08
JFRobertson11-Feb-12 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.