Menu

Bug on snap7.net.cs

2015-02-18
2015-02-21
  • Pablo Agirre

    Pablo Agirre - 2015-02-18

    Hi Davide,

    I've found a little typo on GetBitAt() and SetBitAt() in snap7.net.cs (Ver.: 1.3.0)

    Line:
    byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x10,0x40,0x80};

    Should be:
    byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};

    Mask for Bit 5 is wrong.

    Bye

     
  • Pablo Agirre

    Pablo Agirre - 2015-02-21

    I'm using last snap7-bugfix-1.3.0 and have found something else:

    In: public static void SetBitAt(ref byte[] Buffer, int Pos, int Bit, bool Value)

    Why do you use ref for Buffer ?

     

Log in to post a comment.