473,468 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

RS232 problem

Hi,
I use the windows API to communicate from RS232 to remote four
devices.

The first I tell to those devices is their states

the first time they answer that :
device1 : stateOK
device2 : stateOK
device3 : stateOK
device4 : stateOK

In cyclic mode each 50 ms

device1 : stateOK
device2 : stateOK
device3 : stateKO
device4 : stateOK

I think it is atimout pb but I would like to know more about them :
I have a COMMTIMEOUTS structure but don't knw whatconfiguration should
I do :
ctmoCommPort.ReadIntervalTimeout = MAX_DELAY;
ctmoCommPort.ReadTotalTimeoutMultiplier = 1;
ctmoCommPort.ReadTotalTimeoutConstant = MAX_DELAY;
ctmoCommPort.WriteTotalTimeoutMultiplier = 1;
ctmoCommPort.WriteTotalTimeoutConstant = MAX_DELAY;
or
ctmoCommPort.ReadIntervalTimeout = MAX_DELAY;
ctmoCommPort.ReadTotalTimeoutMultiplier = MAX_DELAY;
ctmoCommPort.ReadTotalTimeoutConstant = MAX_DELAY;
ctmoCommPort.WriteTotalTimeoutMultiplier = 0;
ctmoCommPort.WriteTotalTimeoutConstant = 0;
or
ctmoCommPort.ReadIntervalTimeout = MAX_DELAY;
ctmoCommPort.ReadTotalTimeoutMultiplier = 0;
ctmoCommPort.ReadTotalTimeoutConstant = 0;
ctmoCommPort.WriteTotalTimeoutMultiplier = 0;
ctmoCommPort.WriteTotalTimeoutConstant = 0;

I have let 1000 ms to MAX_DELAY. I don't understand the meaning of
each timeout.

Thanks if you can help
Best Regards
Jun 27 '08 #1
1 1491
epanda wrote:
>
I use the windows API to communicate from RS232 to remote four
devices.
You're asking in the wrong place, try a windows programming group.

--
Ian Collins.
Jun 27 '08 #2

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

Similar topics

1
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import...
6
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many...
6
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am...
8
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents...
1
by: Tony Papadimitriou | last post by:
Hi all, I've written an app using RS232.VB (by Keith Langer 2/5/02 -- Modified to handle overlapped IO and provide asynchronous read/write) and the executable works as expected under XP Pro but,...
13
by: jay.dow | last post by:
I want to write to the pins of an RS232 without using the serial protocol. The use would be every pin could act to complete a circuit in customized hardware. I could use python to communicate...
2
by: KCUK | last post by:
I have created a software to receive data from an equipment through RS232 communication. It is a simple application of the RS232 class. The software does receive strings from the equipment every time...
4
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened...
6
by: Henning M | last post by:
Hi all, Im trying to send a command to my uprocessor project, but when i try to read the answer for the uPU I get the same commed I just send to it??? It is as if the command isn't send before I...
0
by: kvu95111 | last post by:
Hi All, I have wrote a simple program using RS232 protocol. However, I have the following problem in hand. I used the software to receive data from a RFID reader (you may simply treat it like a...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.