Error using the serial comunication

  • Thread starter Nuno A. Couto Dos Santos
  • Start date
N

Thread Starter

Nuno A. Couto Dos Santos

I am using the serial comunication on my program. If there are no errors in the serial comunication there are no problems, but when there are communication errors my program is blocked! And the system says "The Project1 is not responing! End the task?" I would like to know how I can debug my problem.
 
J

Jeff LeBlanc

You have got to be kidding me. Where are the moderators?

This is equivalent to "My car is broken the red light thingy say check engine, can someone make it go?"
 
Can you be more specific? It sounds like you are looping waiting for a character which isn't coming. This is "spinning". if it's VB, you might want to put a DoEvents
inside the loop.

Rufus
 
N

Nuno A. Couto Dos Santos

Thanks for the ansers!

What i really want to known is how can i observe the communication status in my program, using the Visual basic.
 
K

Karl Hunsley

The only way you can monitor you programs status is by putting trap code to print some stuff to the screen on various events and using break points.

But really you need to be more specific, and maybe throw in some sample code of what you are doing.

What sort of serial errors are you getting?
Are you using overlapped IO and threads?
Are you using some form of communications control such as MSCOMM?
What data are sending, what protocol are you using?
Are you using all the exception handling you can in your program?

I am no expert in VB, so codewise I am probably not going to be able to help to much, but if you provide answers to some of the questions above you may get some useful comments.

Hope that helps.

Karl Hunsley
Mission Critical Software Ltd.
 
Top