473,289 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

SerialPort Control in VC# Express 2005

Hello,

I have a problem with the SerialPort Control under VC# Express 2005.
In my application I have to read data from an external device through RS 232.
The process is built on a software-based handshaking which depends on the
device.

The process has been implemented by me and works but unfortunately only the
first time.
All data are donwloaded successfully as required.
The process is simple serialPort11.Open(), Handshaking, Data Download,
Handshaking, serialPort1.Close().

The problem occurs with the second run, when the same procedure is executed
again (using a button_onclick event), then the Port is opened again with
serialPort1.Open() and with the first serialPort1.readByte() a TimeOut Error
occurs.
Even if the Timeout is set to 10sec it does not help.

If the application is restarted and the process is again executed, then the
data are read perfectly from the device. Hence it does not depend on the
state of the external device, but on the PC (Soft and/or Hardware).

I have the feeling, that closing the SerialPort with serialPort1.Close()
does not free all resources and possibly the hardware RS232 is not fully
reset.

Has anyone had a similar problem and found a solution for it?
Can you rely on serialPort1.Close()? Are all resources freed?

I hope someone can help

Thanks a lot in advance
Best regards,

Carsten

Jul 18 '06 #1
0 1368

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: seankub | last post by:
I am trying to read data from com1 and I am using the new serialport control. I downloaded the script from microsoft that does a readline from the comm port, but I keep getting the "operation timed...
1
by: Richie Carey | last post by:
Here's my problem. I'm using Visual C# 2005 Express for a small project that requires simple AT modem commands to be sent to an external serial device. The device requires 2400 baud, no parity,...
0
by: LordHog | last post by:
Hello all, I would like to use the new SerialPort class in Visual C++ 2005 Express edition, but I am having problems adding my event handler to the DataReceived event. In the header file I have...
6
by: DraguVaso | last post by:
Hi, I'm experimenting with the Serial Port in VB.NET 2005. Although it isn't that easy to get any feedback from my COM-port as I thought it would be... How can I read all the Data that the...
2
by: Andrea Judge | last post by:
Hi there, I'm developing an application to catch OBD sensors' data from my car. I connect it via a RS232 interface. Now. with HyperTerminal I can connect and send/receive data, but I'd like to...
3
by: SamB | last post by:
Hello all! MY CASE: I'm using VB.net 2005 express on a Dell Laptop with an USB Bluetooth key. I'm trying to send data to a pocketPC. COM numbers changes each time i've got a new bluetooh...
7
by: Tamir.D | last post by:
is there a way to embed the System.IO.Ports.SerialPort object in my html . so that the client can access to a device connected to his SerialCOM ? i tried to wrap the System.IO.Ports.SerialPort in...
0
by: nmsreddi | last post by:
Hi Friends I am using c#2005 ,for serial communication i think the control in toolbox (serialport ) is not needed for sending and reeiving data through rs232 just io.ports name space enough....
3
by: Adriano | last post by:
Hello, I'm developing an application in VB.NET 2005 that communicates with a device through RS232, and need to send the following sequence of hexadecimal data to the device: 0xFF, 0x01, 0xC3,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.