Comments (8)
I did try the same implementation though on windows ( python using anaconda environment) + on a raspberry pi jessie. For those systems the same python module still had errors.
from libplctag.
(above from the email thread on the forum)
from libplctag.
It works on RPi 2B, with the latest 2016-11-25 Raspian image.
from libplctag.
I have to rewrite the wrapper anyway to use the 2.0 API. I will attempt to fix this at that time. As noted, it works on the RPi for me.
from libplctag.
I will be testing on Windows soon.
from libplctag.
Hmm, Windows 10 with Python 3.7.1 does not run. I got it to compile correctly, but I get a similar error to the one above.
return plcTagCreate(attributeString, timeout) ctypes.ArgumentError: argument 1 <class TypeError>: wrong type
Does anyone have experience with ctypes and Python on Windows 10 x64?
from libplctag.
Seems to be a string encoding problem. It seems to work with both Python 2.7 (Linux) and 3.7 (Windows 10). Seems to be fixed. Closing.
from libplctag.
Seem to be getting the same issue that you noted with plcTagCreate returning argument 1:<class 'TypeError'>: wrong type.
This is on windows 10 and python 3.8.10.
Command passed:
python .\tag_rw.py -t uint8 -p 'protocol=ab_eip&gateway=192.168.45.92&path=1,0&cpu=LGX&elem_size=1&name=MySINT'
Tried all the -t variables and always the same traceback:
Traceback (most recent call last):
File ".\tag_rw.py", line 170, in
main()
File ".\tag_rw.py", line 76, in main
tag = libplctag.plc_tag_create(plc_path, CREATE_TIMEOUT)
File "C:\Users\jonathons\Documents\comms_py\plctag\libplctag.py", line 275, in plc_tag_create
return plcTagCreate(attributeString, timeout)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
EDIT: Added .encode() to the attributeString in libplctag.py and seems to have fixed the above issue will do some further testing and confirm this. plc_tag_create() now looks like the below in libplctag.py:
def plc_tag_create(attributeString, timeout):
return plcTagCreate(attributeString**.encode()**, timeout)
from libplctag.
Related Issues (20)
- omron ethernet/ip writing error HOT 3
- Add support for FINS? HOT 2
- Write MyTag[1] error HOT 4
- Reading subarrays on Omron NJ HOT 2
- Reading strings fields in structures on Omron NJ HOT 7
- Cannot connect to EN2T help HOT 6
- Reading AB PLC Fault State HOT 2
- writing problem in omron nx1p2 PLC HOT 1
- Potential PRs for static WIN32 builds and separating shared and static builds HOT 2
- Unknown data type DT HOT 2
- Unable to Read from Allen-Bradley 1756-L73 A ControlLogix PLC HOT 7
- Reading 1000 tags using libplctag HOT 2
- Notification when all of the tags have been read with "auto_sync_read_ms"...? HOT 5
- Many "INFO" messages output in command prompt after .AddTag(something) command HOT 2
- how many characters can we write using libplctag write?
- Problems with Greek letters in tag names HOT 1
- Connection Issue When Processor Is Deep In Rack ex.. Slot16 HOT 3
- Access AB L73 PLC through Private LAN HOT 1
- Can we use unconnected messaging with multi service request? HOT 3
- Use Libplctag Library as Server HOT 2
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 libplctag.