I'm using S7.Net Plus for Modbus TCP communication with Siemens S7 1200 PLc. I'm able to sent all types(integer, word, double) of data to PLC. Boolean only when I'm using Read single variable class eg:
plc.write("DB12.DBX0.0",false);
This is not an optimised code when I want to send a number of variables, So I'm using the following code and sending in array format
byte[] db12Bytes = new byte[1];
S7.Net.Types.Boolean.SetBit(db12Bytes[0],0);
plc.WriteBytes(DataType.DataBlock, 12, 0, d12Bytes);
But this not working as expected, the boolean value is not getting updated.
Is there a solution to this? Can anyone help me with this?