Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

SysComRead Timeout Parameter

MYM
2018-11-11
2019-06-07
  • MYM - 2018-11-11

    Hello,

    Raspberry pi with V3.5 SP13;

    There is a problem regarding the ulTimeout parameter of Syscomread function of syscom library; With the code below I see that tdiff:=0ms which means that the syscomread command does not wait at least 1000ms as given in ultimeout paramater of the syscomread function. Does anyone has any recent information what could be the reason for that?

    t1:=time();
    SysComRead(hCom:= dwhandle, pbyBuffer:= ADR(btRxArray[1]), ulSize:= 130, ulTimeout:= 1000, pResult:= ADR(Resultread));
    tdiff:=time()-t1;

    Note: During my test Serial port cable is not connected so there is not 130 characters to read for the function as given in UlSize:=130.

     

    Related

    Talk.ru: 1

  • MYM - 2018-11-12

    Could anyone test that on raspberry pi if it works or not?

     
  • eschwellinger

    eschwellinger - 2018-11-13

    Hi,
    this seems to be bug,
    but I see no date when it will be fixed.
    only Timeout=0 Setting make sense ….

    BR
    Edwin

     
  • MYM - 2018-11-14

    Thanks for the reply,

    Can the Ulsize parameter function correctly and have meaning in that case?

    I could try to use the SP11 package if it is a bug of SP13 version. does it cover all versions?

    BR

     
  • eschwellinger

    eschwellinger - 2018-11-14

    Hi,
    this covers all Versions..
    BR
    Edwin

     
  • MYM - 2019-06-07

    Hi,

    Has this topic been solved in the newest version?

    Another question: is this occurs only in raspberry pi or is it for all other controllers sold with the codesys 3.5?

    I have a project that I have to use the serial library with timeout feature in codesys version 3.5, so I need to get an answer, or need to know if you have a workaround.

    Best Regards,

     

Log in to post a comment.