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 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