Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: Word Search Style Game Pin
Jason C Bourne10-Jan-09 3:47
Jason C Bourne10-Jan-09 3:47 
GeneralRe: Word Search Style Game Pin
VinceAshbySmith10-Jan-09 5:01
VinceAshbySmith10-Jan-09 5:01 
GeneralRe: Word Search Style Game Pin
Jason C Bourne11-Jan-09 1:47
Jason C Bourne11-Jan-09 1:47 
GeneralRe: Word Search Style Game Pin
VinceAshbySmith11-Jan-09 10:50
VinceAshbySmith11-Jan-09 10:50 
GeneralRe: Word Search Style Game Pin
Eddy Vluggen10-Jan-09 9:23
professionalEddy Vluggen10-Jan-09 9:23 
AnswerRe: Word Search Style Game Pin
Jason C Bourne10-Jan-09 1:42
Jason C Bourne10-Jan-09 1:42 
QuestionHow ENQ command is sent to serial port Pin
Member 465172910-Jan-09 0:19
Member 465172910-Jan-09 0:19 
AnswerRe: How ENQ command is sent to serial port Pin
Luc Pattyn10-Jan-09 1:47
sitebuilderLuc Pattyn10-Jan-09 1:47 
Hi,

I can't give you the solution to your problems, since it is a broad topic that needs lots of information
you did not provide, but I can give you some commments and suggestions:

1.
please show your code using PRE tags, that makes it easier to read and spot mistakes.

2.
I suggest you start using autoincrement as in bytDataToSend[intDataLength++] = data.bytCommandParameter;
that makes your intentions more clear and your code less error-prone.

3.
make sure your SerialPort initialization is correct; is there anything working? are some characters coming through in one direction? in the other?

4.
on your SendData method:
- parameter intTimeout is not used
- buffer size: what is the magical 0x109? you don't fill that many bytes in the array, but you
do send them (unless the driver discards the NULL bytes). Shouldn't the last parameter of com.Write
be intDataLength?
- you insert a 2B length at the beginning, are you sure adding 2 to it is correct?
- the data length gets handled by intDataLength += data.intDataLength;
this may or may not be correct, I don't know your data struct/class,
intDataLength += data.bytTxDataBuffer.Length would always be right.

5.
your SendData sends STX somedata ETX; your textual description of a read said
sending STX waiting for ACK then sending ENQ; that would not be possible based on the SendData
you have shown (but then maybe you don't use SendData where you implement Read).
BTW: ENQ is just a simple ASCII character, similar to STX and others.

Hope this helps.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Love, happiness and fewer bugs for 2009!


AnswerRe: How ENQ command is sent to serial port Pin
Member 465172910-Jan-09 2:43
Member 465172910-Jan-09 2:43 
GeneralRe: How ENQ command is sent to serial port Pin
Member 465172910-Jan-09 2:57
Member 465172910-Jan-09 2:57 
GeneralRe: How ENQ command is sent to serial port Pin
Luc Pattyn10-Jan-09 3:02
sitebuilderLuc Pattyn10-Jan-09 3:02 
QuestionChange user controls in runtime using c# Pin
bensonbenadict10-Jan-09 0:11
bensonbenadict10-Jan-09 0:11 
AnswerRe: Change user controls in runtime using c# (ASP.Net Question ) Pin
Abhijit Jana10-Jan-09 0:15
professionalAbhijit Jana10-Jan-09 0:15 
GeneralRe: Change user controls in runtime using c# (ASP.Net Question ) Pin
sudhanvag10-Jan-09 4:40
sudhanvag10-Jan-09 4:40 
AnswerRe: Change user controls in runtime using c# Pin
Colin Angus Mackay10-Jan-09 0:22
Colin Angus Mackay10-Jan-09 0:22 
AnswerRe: Change user controls in runtime using c# Pin
#realJSOP11-Jan-09 0:28
professional#realJSOP11-Jan-09 0:28 
GeneralRe: Change user controls in runtime using c# Pin
bensonbenadict11-Jan-09 19:31
bensonbenadict11-Jan-09 19:31 
QuestionCreate new url type for RichTextBox [modified] Pin
ghbloos9-Jan-09 23:45
ghbloos9-Jan-09 23:45 
AnswerRe: Create new url type for RichTextBox Pin
Eddy Vluggen10-Jan-09 0:37
professionalEddy Vluggen10-Jan-09 0:37 
GeneralRe: Create new url type for RichTextBox Pin
ghbloos10-Jan-09 1:03
ghbloos10-Jan-09 1:03 
AnswerRe: Create new url type for RichTextBox Pin
mav.northwind10-Jan-09 1:17
mav.northwind10-Jan-09 1:17 
GeneralRe: Create new url type for RichTextBox Pin
ghbloos10-Jan-09 1:33
ghbloos10-Jan-09 1:33 
QuestionThread.Abort Pin
thenewbee9-Jan-09 19:42
thenewbee9-Jan-09 19:42 
AnswerRe: Thread.Abort Pin
Wendelius9-Jan-09 21:24
mentorWendelius9-Jan-09 21:24 
AnswerRe: Thread.Abort Pin
Luc Pattyn10-Jan-09 0:10
sitebuilderLuc Pattyn10-Jan-09 0:10 

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.