Comments (4)
I just tried reproducing this, using cpppo version 3.9.5 on a Mac:
import time
from repr import repr
import cpppo
from cpppo.server.enip import client
plc_ip_address ='127.0.0.1'
d = cpppo.dotdict( { 'data': [] } )
with client.connector( host= plc_ip_address) as conn:
while True:
time_prev=time.time()
req = conn.read("tag_1")
try:
assert conn.readable( timeout=2.0 ), "Failed to receive reply"
rpy = next(conn)
d.data.append(rpy.enip.CIP.send_data.CPF.item[1].unconnected_send.request.read_frag.data[0])#0
except AssertionError:
print "Response timed out!! Tearing Connection and Reconnecting!!!!!"
break
except AttributeError:
print "Tag not written:::Will try again::"
break
print "%5d: %s" % ( len( d.data ), d.data )
time.sleep( 1 )
I first ran a simulator:
$ python -m cpppo.server.enip -v tag_1=DINT[100]
Then, I ran the above program:
$ python src/cpppo_connector_read.py
1: [0]
2: [0, 0]
3: [0, 0, 0]
4: [0, 0, 0, 0]
5: [0, 0, 0, 0, 0]
...
Is this still happening for you?
from cpppo.
Hello Sir,
The same program works on simulated plc controller. But does not work when given the IP address of an actual PLC. But the programs function well on 3.9.4 on communicating with actual PLC
from cpppo.
Is there any significant updates which I would miss out on 3.9.5?. I tested the programs on 3.9.4 and it works great!!. So please advise. Thank you!!
from cpppo.
Support for the CIP STRING type, and cpppo.server.enip.get_attribute proxy.write support (the ability to write via the proxy API). And other minor fixes.
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.