Closed TwoRedCells closed 7 years ago
I just tried running:
python -m cpppo.server.enip -v SCADA@0x6b/1/1=DINT
to simulate a rough approximation of the Fanuc data, and then ran:
from cpppo.server.enip.get_attribute import proxy as plc
host = "0.0.0.0"
param = "@0x6b/1/1=(DINT)5"
fanuc = plc(host=host)
try:
with fanuc:
result, = fanuc.write(param)
print param, '==', result
except Exception as e:
print param, e
(because my simulator was on my local machine). It worked.
$ python testproxy.py
@0x6b/1/1=(DINT)5 == True
Try:
I'm not sure what else to suggest...
When I issue this I get
@0x6b/1/1=(DINT)5 'str' object has no attribute 'items'
I have tried making param a list of strings, list of tuples,parameter_substitution
, but I get the same error, with a different type instead ofstr
.I am trying to achieve the same programmatically as
python -m cpppo.server.enip.get_attribute -a 192.168.178.15 -S "@0x6b/1/1=(DINT)5"
.