INOS
|
The Hilscher module driver can be enabled in the iDev project properties under the feature settings:
Data is exchanged with the Hilscher module with a Dual-Port-Ram. The data that comes in from the external bus is read and stored in memory whereas the data to be sent is taken from the memory and put onto the external bus. Even though the offset may be the same for both buffers they are stored on different addresses in the DPR. The content and format of this data depends on the configuration of the external field bus. If the remote communication partner uses a different endianness then the data needs to be interpreted correctly.
As the DPR is not fast and should permanently be polled for incoming data this polling is usually done in a dedicated task with low priority. Never call the Hilscher functions from a realtime task or a realtime hook!
This example consists of a master and a slave, both running on Indel targets. The master sends data to the slave and the slave returns it unchanged (echo). Then the master can receive the data and compare it to the originally sent data.