Menu

Sharp7 GetCpInfo error

2019-08-27
2020-09-16
  • Christoph Fankhauser

    Hello, I just wanted to report, that GetCpInfo has an error.

    Change

                    Info.MaxPduLength = S7.GetIntAt(PDU, 2);
                    Info.MaxConnections = S7.GetIntAt(PDU, 4);
                    Info.MaxMpiRate = S7.GetDIntAt(PDU, 6);
                    Info.MaxBusRate = S7.GetDIntAt(PDU, 10);
    

    To

                    Info.MaxPduLength = S7.GetIntAt(SZL.Data, 2);
                    Info.MaxConnections = S7.GetIntAt(SZL.Data, 4);
                    Info.MaxMpiRate = S7.GetDIntAt(SZL.Data, 6);
                    Info.MaxBusRate = S7.GetDIntAt(SZL.Data, 10);
    

    And there must be an error with ReadSZL too, because GetCpuInfo and things like

    client.ReadSZL(0x0132, 0x001, ref SZL, ref Size);
    

    does not work on most CPUs.

    Best regards
    Christoph

     

    Last edit: Christoph Fankhauser 2019-08-27
  • steven noppe

    steven noppe - 2020-09-16

    hello, I also tried the CPUInfo in sharp7 and it doesn't work like you said.
    But changing the code does not get me any further. :(

     

Log in to post a comment.