Replies: 1 comment
-
HERE IS THE IMAGE OF DB : |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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)
Beta Was this translation helpful? Give feedback.
All reactions