please your help i try to make an bool true on my plc but its only switch to false but wen i want to turn it to true nothing happen below my code please your help and sorry for my bad english 👍 my code :
i```
mport snap7
from snap7.util import set_string, get_string
db = plc.db_read(db_n,startn,16)
your_int_value = int(True)
snap7.util.set_int(db, 16, your_int_value)
plc.db_write(1,0,db)
this is my plc db :
![image](https://user-images.githubusercontent.com/76669327/147162712-a35e4c85-f5f0-4551-8dce-5ef630dfb9b1.png)
please anyone to help to understand the problem
THANKS
hello guys
please your help i try to make an bool true on my plc but its only switch to false but wen i want to turn it to true nothing happen below my code please your help and sorry for my bad english 👍 my code :
i``` mport snap7 from snap7.util import set_string, get_string
IP = "192.168.43.87" RACK = 0 SLOT = 1 db_n = 1 startn = 0 plc = snap7.client.Client() plc.connect(IP,RACK,SLOT)
db = plc.db_read(db_n,startn,16) your_int_value = int(True) snap7.util.set_int(db, 16, your_int_value) plc.db_write(1,0,db)