Menu

daveSetPLCTimeToSystime - bug...

Help
2007-08-13
2013-05-09
  • Nobody/Anonymous

    Intentionally or not daveSetPLCTimeToSystime is changing day of week in unpredictable manner.
    It is easy to check it by executing SFC0 or reading local data (eg. OB35_DATE_TIME in OB35).

    BTW. Great project - thx!

    Regards,

    Pawel

     
    • Nobody/Anonymous

      Fix:

      int DECL2 daveSetPLCTimeToSystime(daveConnection * dc) {
          int res, len;
          PDU p2;
          uc pa[]={0,1,18,4,17,'G',2,0};

      {.....

      ts[9]=daveToBCD(t1.tv_usec%100);   <- here in Most Significant Decade write time of the week

      .....}

      Regards,

      Pawel

      phryniszak@gmail.com

       

Anonymous
Anonymous

Add attachments
Cancel