Comments (4)
Yes, you can indeed specify the backplane slot to perform I/O operations on.
The default 'route_path' is [{"port": 1, "link": 0}]. This indicates the Backplane ("port": 1), slot 0 ("link": 0). You can specify any other slot X ("link": X), or even multi-hop 'route_path', by putting multiple entries in the route_path list.
I am working on a fairly major update to Cpppo, to provide 3.7 compatiblity (ie. due to the new 'await' keyword), and to provide better support for arbitrary route_path in requests. You can access this new version (presently 4.0.1) using pip/pip2/pip3:
pip install --upgrade git+https://github.com/pjkundert/cpppo.git@feature-multipath
To simulate something like a backplane with a CPU in slot 3, with a tag something like "This.SCADA" which is an array of 100 DINTs:
python -m cpppo.server.enip --route-path=1/3 -v 'This.SCADA=DINT[100]'
Then to read this, in another terminal on the same host, run:
python -m cpppo.server.enip.client -v --route-path=1/3 'This.SCADA[0-99]'
This actually simulates a Logix Read Tag request, with multiple symbolic name entries in its request path:
"enip.CIP.send_data.CPF.item[1].unconnected_send.request.path.segment[0].symbolic": "This",
"enip.CIP.send_data.CPF.item[1].unconnected_send.request.path.segment[1].symbolic": "SCADA",
"enip.CIP.send_data.CPF.item[1].unconnected_send.request.path.segment[2].element": 0,
Note that this is pretty much all possible right now, in the stock 3.9.7 version of Cpppo, but the route_path components must be specified in JSON, eg: '[{"port": 1, "link": 3}]', eg.:
python -m cpppo.server.enip --route-path='[{"link": 1, "port": 3 }]' -vv 'This.SCADA=DINT[100]'
from cpppo.
Thanks for this, the path selection works fine!
Say now that i would like to pull data every x ms and put it int my DB.
Should i make a loop in python or do we have already such libraries to pull that out?
from cpppo.
Take a look at: https://github.com/pjkundert/cpppo/blob/master/server/enip/poll_example_many.py
If you replace the import of powerflex_750_series with:
from cpppo.server.enip.get_attribute import proxy
and use and instance of that as the via
, you should be able to provide tag names in the targets
dict.
from cpppo.
Great!
Next question that comes naturally is: is there any way to get all the tags at once from a PLC?
from cpppo.
Related Issues (20)
- Connection manager: unconnected send
- Receiving (not pulling or writing) data from AB Compact GuardLogix PLC
- Question: Getting single attribute
- Question: read an array of structures in one request
- Question: write to structure field
- CIP Class 0x66
- AssertionError on harvest HOT 1
- Simulate Omron Adapter
- (Question) Duplicate Responses to CIP Discovery Packet HOT 3
- Sending SINT write request using client results in error
- Python 3.11 import problem HOT 1
- Question: What is the meaning of "Tag communications capability"
- Question: CPPPO Server configuration as Generic Ethernet Module in Studio 5000
- Client import problem HOT 1
- SMC JXC91 write HOT 5
- Question: How to call vendor specific services?
- Question: How to send Instance Service "reset (0x05)" instead of "get_attributes_all (0x01)" using Cpppo? HOT 1
- AssertionError: Failed to receive any response
- Implicit (cyclic) communication for lower latency
- Can we have a simple example of writing a single register to a ControlLogix please
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpppo.