Triggering/Reading serial Barcode Scanner

  • Hello,


    I'm trying to trigger a scanner and read the read data over a serial connection.
    Triggering by a short message and reading the data works fine but is very slow.
    After reading the data, I want to trigger again, but I get no result. I have to wait aprox. 200ms Sleep(200). When I trigger after that time, I get a result. When I don't wait, my scanner delivers no data back.
    What could be the problem?
    I assume maybe the timeouts are the problem? But I set it to:
    COMMTIMEOUTS timeouts;
    timeouts.ReadIntervalTimeout = MAXDWORD; // MAXDWORD
    timeouts.ReadTotalTimeoutMultiplier = 0;
    timeouts.ReadTotalTimeoutConstant = 0;
    timeouts.WriteTotalTimeoutMultiplier = 0;
    timeouts.WriteTotalTimeoutConstant = 0;
    and no success.
    I raised the thread priority from THREAD_PRIORITY_NORMAL up to THREAD_PRIORITY_TIME_CRITICAL but also no success.
    Anyone a Idea? I don't know how to speed up my reading.


    Thanks a lot in advance

  • Hello,


    i assume that this is not a problem on the WCE side. What happens when you send the same data via a terminal program?
    Can you measure what happens on the data and control lines?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    yes you were right. It was indeed a problem of a very slow barcode scanner (especially the settings).
    The send/receive methods wasn't the big break.
    So the problem is solved...


    Thanks al lot anyway.