cpppo icon indicating copy to clipboard operation
cpppo copied to clipboard

how to test master/server and slave?

Open shangarnithi opened this issue 6 years ago • 2 comments

shangarnithi avatar Jan 17 '19 06:01 shangarnithi

Hi , I am new to fieldbus protocols. I want to understand ethernetip implementaion , i have downloaded the package and done with necessary steps.

1st termainal iot_iot@lab:~/cpppo-master$ python -m cpppo.server.enip.historize some_file.hst Tag_Name=INT[1000]

in 2nd terminal when i run this ..

iot_iot@lab:~/cpppo-master$ python -m cpppo.server.enip.client Tag_Name[0-3]=[0,1,2,3] Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1649, in sys.exit( main() ) File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1630, in main fragment=fragment, printing=printing, timeout=timeout ) File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1406, in process transactions = list( self.results( operations=operations, kwds )) File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1398, in results for idx,dsc,req,rpy,sts,val in self.operate( operations, kwds ): File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1393, in operate for idx,dsc,req,rpy,sts,val in harvested: File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1283, in validate for index,descr,request,reply,status,val in harvested: File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 1248, in pipeline iss = next( issuer ) File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 972, in issue for op in operations: File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 238, in parse_operations opr['data'] = list( map( cast, val_list )) File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 158, in 'INT': (enip.INT.tag_type, enip.INT.struct_calcsize, lambda x: int_validate( x, -215, 216-1 )), # extra range File "/usr/local/lib/python2.7/dist-packages/cpppo-3.9.7-py2.7.egg/cpppo/server/enip/client.py", line 134, in int_validate res = int( x ) ValueError: invalid literal for int() with base 10: '[0'

getting following error , please assist on this.

thanks

shangarnithi avatar Jan 17 '19 06:01 shangarnithi

@pjkundert Can you please help me on this?

shangarnithi avatar Feb 15 '19 10:02 shangarnithi