RS232 problem

Discussion in 'C++' started by epanda, Jun 15, 2008.

  1. epanda

    epanda Guest

    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
     
    epanda, Jun 15, 2008
    #1
    1. Advertising

  2. epanda

    Ian Collins Guest

    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.
     
    Ian Collins, Jun 15, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Petzold

    problem sending code via rs232

    Martin Petzold, Apr 12, 2004, in forum: C++
    Replies:
    8
    Views:
    432
    red floyd
    Apr 13, 2004
  2. Martin Petzold

    problem sending code via rs232

    Martin Petzold, Apr 12, 2004, in forum: C Programming
    Replies:
    4
    Views:
    582
    CBFalconer
    Apr 12, 2004
  3. Problem with rs232

    , Jul 5, 2007, in forum: C++
    Replies:
    4
    Views:
    353
  4. Gekko
    Replies:
    2
    Views:
    453
    Gekko
    Oct 6, 2007
  5. deena102

    RS232 Communication problem

    deena102, Apr 12, 2009, in forum: VHDL
    Replies:
    0
    Views:
    508
    deena102
    Apr 12, 2009
Loading...

Share This Page