code python:
import snap7
from time import sleep
import struct
import snap7.client as c
plc = snap7.client.Client()
plc.connect("192.168.0.1")
plc.writeMem('QX0.0',True) # write Q0.0 to be true, which will only turn on the output if it isn't connected to any rung in your ladder code
print plc.getMem('MX0.1') # read memory bit M0.1
print plc.getMem('IX0.0') # read input bit I0.0
plc.plc.disconnect()
////
error line ==> plc = snap7.client.Client()
I connected with the plc but the problem stay same
if some one here can help me to resolve this problem
import snap7
from time import sleep
import struct
import snap7.client as c
plc = snap7.client.Client()
plc.connect("192.168.0.1")
plc.writeMem('QX0.0',True) # write Q0.0 to be true, which will only turn on the output if it isn't connected to any rung in your ladder code
print plc.getMem('MX0.1') # read memory bit M0.1
print plc.getMem('IX0.0') # read input bit I0.0
plc.plc.disconnect()
////
error line ==> plc = snap7.client.Client()
I connected with the plc but the problem stay same
if some one here can help me to resolve this problem