EmbDev.net

Forum: µC & Digital Electronics Profibus Master


Author: Zen (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi
There is a Profibus device DP-Slave (encoder), there is documentation on 
it, but it describes in detail how to connect it to the PLC and how to 
configure it using STEP7. I just need to connect it to the 
microcontroller(Master-Slave)

Maybe someone has already written Master code or maybe there are 
examples of data packets from master to slave with a description of the 
whole procedure?

Author: Bastler (Guest)
Posted on:

Rate this post
0 useful
not useful
If you need a DP-Master with just one Slave, this is possible.
You need one timer and one UART.
I did this for testing DP-Slaves on a STM8.
I`ll send some documentation and examples when I´m at home.

Or maybe you can use a Master-Simulator?
There is a cheap one on eBay. It works like a RS232 to DP-Master 
Gateway.
(B&N Elektronik Profibus DP Master Simulator)

Author: Zen (Guest)
Posted on:

Rate this post
0 useful
not useful
Thank you very much. I need just examples what I have to send to the 
sensor
I googled about Profibus frame structure but it's not clear for I need 
examples like
0x68 0x04 0x02 ...
where 0x68 is a start byte ...etc

Author: Ulrich K. (elektromechanikus)
Posted on:
Attached files:

Rate this post
0 useful
not useful
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

Author: Bastler (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Sorry for the delay...

Her are some functions that may helpful.

Author: Zen (Guest)
Posted on:

Rate this post
0 useful
not useful
Thank you very much for this it's very helpful!

Author: Irshad (Guest)
Posted on:

Rate this post
0 useful
not useful
Sir
  If anyone  have example code of Profibus-DP Master code with single 
slave, please share.I have slave example code. To test that I want a 
Master Code.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig