Comments (13)
Thanks for your report.
Can you please send the GSD file via mail to me, so that I can reproduce the behaviour?
Thanks.
from pyprofibus.
File attached.
from pyprofibus.
Thanks.
I checked this problem and what I found out is:
- The GSD parser currently does not parse Bit() or BitArea() definitions.
- The GSD interpreter currently does not interpret the ExtUserPrmData fields.
- Unknown/unimplemented sections are simply ignored.
That is why the UserPrmData ends up with size 0 instead of size 5 as specified in your GSD.
That's why I currently consider this a missing feature rather than a bug. The GSD parser isn't fully prepared to parse all details of your GSD file, yet. There are a couple of other ignored fields as well. These will be shown, if GSD parser debugging is enabled (set debug=True in the parser.py file)
from pyprofibus.
Please also note that you probably won't get your device working, if the UserPrmData from the GSD file is ignored by pyprofibus. That is unless you somehow hack the code and hardcode the required UserPrmData somewhere.
from pyprofibus.
I appreciate very much for spending the time to investigate the issue. Despite these missing features, I believe the pyprofibus will still be a very good application to help my Profibus application development.
Thanks for a job well done.
from pyprofibus.
Re-opening the issue, to keep track of this feature, because it should be implemented at some point.
I think it is fairly easy to work around this missing feature, by just hard coding the required UserPrmData in the user code that uses pyprofibus for a particular device. However the plan is to also have this GSD feature to be part of pyprofibus. If you have any enhancements to pyprofibus, that are of general use, please feel free to create pull requests. Your help is greatly appreciated.
from pyprofibus.
Currently I can get around the problem by setting "DPV1_Slave = 0" to remove DPV1 support. If I do need DPV1 support, I will consider come back and see if I can contribute to this issue.
from pyprofibus.
That will silence the error message, but the root of the problem will still persist.
No valid UserPrmData will be generated and no UserPrmData will be sent to the slave. The slave probably won't successfully pass configuration state and probably won't enter Data_Exchange without valid UserPrmData.
from pyprofibus.
In my module configuration, I only have the following defined:
module_1=16 Bytes In
module_5=16 Bytes Out
This is working fine:
DPM1: Trying to initialize slave 2...
PHY-serial: TX 10 02 7D 49 C8 16
PHY-serial: RX 10 7D 02 00 7F 16
DPM1: slave[02].state --> 'wait for diag'
DPM1: Requesting Slave_Diag from slave 2...
PHY-serial: TX 68 05 05 68 82 FD 6D 3C 3E 66 16
PHY-serial: RX 68 0B 0B 68 FD 82 08 3E 3C 02 05 00 FF 0B 69 7B 16
DPM1: slave[02].state --> 'wait for Prm'
DPM1: Sending Set_Prm to slave 2...
PHY-serial: TX 68 0C 0C 68 82 FD 5D 3D 3E B8 C8 01 00 0B 69 01 4D 16
PHY-serial: RX E5
DPM1: slave[02].state --> 'wait for Cfg'
DPM1: Sending Chk_Cfg to slave 2...
PHY-serial: TX 68 07 07 68 82 FD 7D 3E 3E 9F AF C6 16
PHY-serial: RX E5
DPM1: slave[02].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 2...
PHY-serial: TX 68 05 05 68 82 FD 5D 3C 3E 56 16
PHY-serial: RX 68 0B 0B 68 FD 82 08 3E 3C 00 0C 00 7D 0B 69 FE 16
DPM1: slave[02].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 2...
PHY-serial: TX 68 13 13 68 02 7D 7D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FC 16
PHY-serial: RX 68 13 13 68 7D 02 08 01 23 45 67 89 AB CD EF 01 23 45 67 89 AA BB CC D1 16
PHY-serial: TX 68 13 13 68 02 7D 5D 10 0F 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 64 16
PHY-serial: RX 68 13 13 68 7D 02 08 01 23 45 67 89 AB CD EF 01 23 45 67 89 AA BB CC D1 16
............
from pyprofibus.
Ok. Fair enough. So your device is not as picky about missing data as mine. :)
from pyprofibus.
Hi,
maybe question for @derekyu56: did you use rs485 physical link? If yes, did you use bus termination even if there is only 1 slave device on the bus?
I get :
DPM1: Trying to initialize slave 8...
DPM1: RX error: PHY-serial: Failed to get received telegram size:
Invalid telegram format.
......
from pyprofibus.
I used a RS232 to RS485 dongle from HMS. It is a direct connection to one slave using a serial cable with no terminator.
from pyprofibus.
from pyprofibus.
Related Issues (20)
- CP5711: Is this CP supported? HOT 3
- Modules are sorted lexicographically, not numerically HOT 1
- Acyclic communcation support HOT 1
- Function code response error handling needs improvement HOT 3
- Siemens DP/AS-i LINK 20 support HOT 4
- Warning in GSD: User_Prm_Data truncated by User_Prm_Data_Len HOT 9
- Festo CPV Valve terminal HOT 40
- PC - FPGA interface HOT 2
- "input byte, "output byte" confusion HOT 6
- pyprofibus hardware documentation HOT 3
- TxDen pin Question HOT 4
- Help with WAGO 750-343 HOT 7
- connecting Pyprofibus with DP/PA coupler to communcate with PA devices (Invalid telegram format) HOT 4
- Сonnection SIEMENS et200s HOT 4
- How to get to debugMsg to prompt them in Tkinker window HOT 1
- After slave was reset/reloaded timeout occurs and slave-object changes its state to STATE_INIT, but its fcb remained in previous state ( fcv=1 fcb=0/1 ) HOT 1
- Is there any communication function between the master station and the master station in this project? HOT 1
- GSD file reading error. HOT 1
- [Question] how to read data without write ? HOT 12
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 pyprofibus.