Comments (6)
Hi, Johan; Thanks for the report.
How were you doing the REAL Tag writes and reads? If you use the cpppo.server.enip and cpppo.server.enip.client modules, it seems to work:
$ python -m cpppo.server.enip --print -v SCADA=REAL[100]
(in another window):
$ python3 -m cpppo.server.enip.client -p 'SCADA[0]=(REAL)1.234' SCADA[0]
SCADA[ 0-0 ] <= [1.234]: 'OK'
SCADA[ 0-0 ] == [1.2339999675750732]: 'OK'
Since the value contains decimal points, the cpppo.server.enip.client will automatically deduce that it should write REAL values (otherwise, if all the values are integer, it will default to INT).
Can you tell me more details about the failure?
Thanks!
from cpppo.
In that case it works fine, but try the same thing with a length 1 array, e.g.:
$ python -m cpppo.server.enip --print -v SCADA=REAL[1]
$ python3 -m cpppo.server.enip.client -p 'SCADA[0]=(REAL)1.234' SCADA[0]
SCADA[ 0-0 ] <= [1.234]: 'OK'
SCADA[ 0-0 ] == [1.0]: 'OK'
from cpppo.
Confirmed; working on a fix now. I am treating "scalar" values different than "vectors" (because assignment to vectors can be intercepted with getitem/setitem, to support remote access in the PLC back-end). I incorrectly used the Python type of the default value to cast the incoming value -- and provided an integer default for REAL scalars. I'm re-engineering the handling of data types now, to ensure that it correctly handles current (SINT/INT/DINT/REAL) and future EtherNet/IP data types correctly. Should have a fix later today.
from cpppo.
Great! BTW, is there a reason there is no BOOL type? It seems to be present in the EtherNet/IP standard. (A different issue, perhaps...)
from cpppo.
There are a multitude of data types in the EtherNet/IP standard that are not (yet) supported. No particular reason -- just have not had a client use-case for them, yet.
from cpppo.
Fixed in version 3.4.1
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.