pjkundert / cpppo

Communications Protocol Python Parser and Originator -- EtherNet/IP CIP
https://hardconsulting.com/products/6-cpppo-enip-api
Other
340 stars 112 forks source link

How to handle minimal "simulated" CompactLogix PLC array #74

Open bobbuilder123 opened 5 years ago

bobbuilder123 commented 5 years ago

We can run the minimal server with this command line.

python.exe -m cpppo.server.enip Scada=DINT[5]

Is it possible to call a function when the array gets modified and return the state of the array? E.G:

$ python -m cpppo.server.enip.client -v --print Scada[1]=99

will result in the server calling a function with the array as argument :

Scada = [25, 99, -51, 110, 25]

The problem is the minimal server only outputs on screen which part of the array got modified :

Scada[1] [ 1-1] <= [99] 'OK'

Thanks