fg71
 
In your settimino you have a function ReadBit with 4 arguments. This method use S7WLBit
In my world it looks to me it should be 5 arguments.
 
Siemens LOGO memory bit M2 start at 1104 and use bit from 0..7
 
ex.
 
ReadBit(Area, DB, ByteIndex, BitIndex, Result)
 
I could do this to write M2 to True
s7Client.WriteBit(S7AreaDB, db1, 1104, 1, true);
 
so it would be logic to me the ReadBit should be
s7Client.ReadBit(S7AreaDB, db1, 1104, 1, result);
Reply 0 0
fg71
So I have update this ReadBit function to work as same as WriteBit, let me know if that is correct or not....
 
settimino.cpp
int S7Client::ReadBit(int Area, uint16_t DBNumber, uint16_t ByteIndex, uint16_t BitInByte, bool &Bit)
{
  //return ReadArea(Area, DBNumber, BitStart, 1, S7WLBit, &Bit);
  return ReadArea(Area, DBNumber, ByteIndex*8+BitInByte, 1, S7WLBit, &Bit);
}
 
settimino.h
int ReadBit(int Area, uint16_t DBNumber, uint16_t ByteIndex, uint16_t BitInByte, bool &Bit);
 
Reply 1 0
Reply