Hi Zen,
Profibus is not as easy as e.g. Modbus.
Your Master first reads the GSD file (kind of electronic data sheet) and
with the information contained there and additional parameters you may
enter ,then sends configuration data to your slave.
After that the master polls all connected devices (only one in your
case).
With different services the master now can read/write information
from/to the slave device.
You have to know the structure of the data within your Profibus slave
and the service to access them.
Without much deeper knowlege of Profibus, I don't think you will be able
to write your own communication interface.
I have attached screen shots from an old Profibus specification (it is
protected) which shall only indicate the complexity. The Profibus spec
is part of an international standard and thus no longer available for
free.
You should look at technology companies which offer solutions in
industrial communication (e.g. Hilscher, HMS, Molex). They have scalable
solutions from code to chip to modules.
I have done internal Profibus certification for a couple of years but
all devices I have seen made use of a standard front-end from one of the
above mentioned companies.
wish you best luck with your Profibus
Ulrich