RS232 problem

E

epanda

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
 
I

Ian Collins

epanda said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top