Hey dudes,
We are trying to access the S7-1500 with snap7.
We've followed the tutorials & the answers in the forum with no luck (we managed to do so in the S7-1200).
('CON STATUS: ', True)
ERROR:snap7.common:CLI : function refused by CPU (Unknown error)
Traceback (most recent call last):
File "X.py", line 10, in <module>
PLC.WriteOutput(myplc,0,3,True)
File "C:\snap7\plc.py", line 6, in WriteOutput
data = dev.read_area(0x82,0,byte,1)
File "C:\snap7\client.py", line 239, in read_area
check_error(result, context="client")
File "C:\snap7\common.py", line 65, in check_error
raise Snap7Exception(error)
snap7.snap7exceptions.Snap7Exception: CLI : function refused by CPU (Unknown error)
Note that we've unchecked the "Optimized something..." in the block properties and also enabled remote full access (with "GET\PUT...") according to the tutorial.
But the CPU is still refusing to be remote controlled.
We will be glad for any help!
Thanks in advance,
Kinces.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am going to read the DBarea from PLC S7 1200, for this goal I try to import some of the libraries in to the python but I could not solve this error. I am new in pythone. Can you help me
import snap7
from snap7.util import *
import struct
import snap7.client
plc=snap7.client.Client()
plc.connect('10.1.1.98',0,0)
area= 0x84
start=0
length=1
bit=0
byte= plc.read_area(0x82,0,start,length)
No handlers could be found for logger "snap7.common"
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/snap7/client.py", line 242, in read_area
check_error(result, context="client")
File "/usr/local/lib/python2.7/dist-packages/snap7/common.py", line 69, in check_error
raise Snap7Exception(error)
snap7.snap7exceptions.Snap7Exception: CLI : function refused by CPU (Unknown error)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey dudes,
We are trying to access the S7-1500 with snap7.
We've followed the tutorials & the answers in the forum with no luck (we managed to do so in the S7-1200).
We've used the python version of snap7 (X.py):
And we are getting:
Note that we've unchecked the "Optimized something..." in the block properties and also enabled remote full access (with "GET\PUT...") according to the tutorial.
But the CPU is still refusing to be remote controlled.
We will be glad for any help!
Thanks in advance,
Kinces.
Try the compiled demo (of your OS) and use Rack=0 and Slot=0 (192.168.0.15,0,0)
Hello,
I am going to read the DBarea from PLC S7 1200, for this goal I try to import some of the libraries in to the python but I could not solve this error. I am new in pythone. Can you help me
import snap7
from snap7.util import *
import struct
import snap7.client
plc=snap7.client.Client()
plc.connect('10.1.1.98',0,0)
area= 0x84
start=0
length=1
bit=0
byte= plc.read_area(0x82,0,start,length)
No handlers could be found for logger "snap7.common"
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/snap7/client.py", line 242, in read_area
check_error(result, context="client")
File "/usr/local/lib/python2.7/dist-packages/snap7/common.py", line 69, in check_error
raise Snap7Exception(error)
snap7.snap7exceptions.Snap7Exception: CLI : function refused by CPU (Unknown error)