Comments (6)
These two options reside in the [SLAVE_x]
section(s) of the configuration.
All options in these sections configure the slave.
Therefore the terms output
and input
are to be interpreted from the slave's perspective. Just like the comment suggests.
That means your values are swapped.
from pyprofibus.
Swapping the values does not work because then the component doesn't create the correct number/direction for the halpins.
In my opinion the information the slave transmits to the master needs to be put into hal-pins of direction OUT (ie. "profibus.slave.8.input.bit.x.x")
information the slave recieves from the master needs to come from hal-pins of direction IN (ie. profibus.slave.8.output.bit.x.x)
To illustrate my point I have configured my input-bytes and output-bytes as posted below. With this I would expect to see 4x8 halpins of direction OUT to make the slaves response data (4 bytes) available in the HAL environment and 2x8 halpins of direction IN for the data that is to be sent from the master (2 bytes):
; The number of output bytes this slave transmits to the
; master in Data_Exchange.
; This usually depends on the modules plugged into the slave.
output_size=4
; The number of input bytes this slave expects to receive
; in Data_Exchange.
; This usually depends on the modules plugged into the slave.
input_size=2
However, this creates the exact opposite:
4 x 8 halpins "profibus.slave.8.output.bit.x.x" with hal-direction IN
2 x 8 halpins "profibus.slave.8.input.bit.x.x" with hal-direction OUT
Which is wrong since now we have too many pins with direction IN and not enough with direction OUT
Since your component embeds the slave in HAL we need IN pins for "input_size" (data sent to the slave) and OUT pins for "output_size" (data received from the slave).
I hope this makes at least somewhat sense.
from pyprofibus.
Yes, the LinuxCNC HAL component might be buggy here.
That is one of the least tested and least used parts of pyprofibus.
One could also argue that the input/output HAL pin naming is swapped. It doesn't match the configuration's understanding of inputs and outputs.
from pyprofibus.
Absolutely, I think it would make more sense to create the halpins "profibus.slave.n.output.x.y.z" with hal-direction OUT
halpins "profibus.slave.n.input.x.y.z" with hal-direction IN.
I've tried to change profibus-linuxcnc-hal accordingly but I get errors.
from pyprofibus.
The change 26d6696 swaps the HAL's interpretation of input and output.
It's necessary to swap the input/output naming in the HAL configuration.
from pyprofibus.
The change has been integrated in the pyprofibus release 1.11.
Thanks for your report!
from pyprofibus.
Related Issues (20)
- Terminating: GSD 'HIL_0B69.gsd': DPv1 User_Prm_Data is shorter than 3 bytes HOT 13
- 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
- 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.