Profibus with rpi master and slave

前端 未结 1 1013
南笙
南笙 2021-01-26 02:25

I am tasked with building profibus master and slave network using Rpi and Rs-485 convertor .

One Rpi will be master and other will be slave. I am using https://github.co

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-26 02:27

    Since you talk about IP addresses I think you may be mistaken Profibus with Profinet. If that's the case you might want to take a look at the Fieldbus drivers introduced in the Linux Kernel from version 5.2. I did not have time to test them but they should offer what you need.

    If, on the contrary, you are indeed referring to Profibus I'm afraid there is nothing on the open-source front that you could use as a Profibus slave stack for the RPi. As you say, there is a master stack (PyProfibus) that works well.

    If the target is to build a Profibus network for educational purposes or in-house use you can use the BeagleBone Black or BBB SBC, which is more or less the same cost as the RPi. Unfortunately, the Profibus stack software (both master and slave) does not run on Linux but on TI RTOS (a lightweight OS for several Texas Instruments processors). To comply with the hard real-time requirements of Profibus, this software takes advantage of TI's Sitara PRU-ICSS (Programmable Real-Time Unit Industrial Communication Subsystem), which is, oversimplifying a bit, a couple of microcontrollers integrated together with Sitara's SoC. This means, obviously, this software won't be portable to any other hardware (other than TI's Sitara family).

    If you decide to give it a try you will have to install TI's development environment. In-detail instructions can be found in TI's Processors Forums: 1 and 2.

    On the hardware front, you will need either a couple of BBB boards or just the one and a Profibus Master or Slave (PLC or whatever device you have). If you are interfacing with a PLC or any other standard Profibus device (so not to another BBB board) you will also need a cheap (a couple of bucks) RS485 to TTL transceiver.

    If you are willing to pay for hardware and/or licensing fees, the prospects are a bit brighter. The German company Kunbus, well-known for its Revolution Pi range of PLC-like-computers based on the Raspberry Pi, produce a Profibus Slave Gateway. They also offer Profibus software for TI's Sitara processors that works on Linux and TI RTOS, but there are licensing fees or a fixed-price you have to pay to purchase the library. And some time ago they were thinking about releasing a Profibus Master software stack for the Revolution Pi, but as far as I can tell that came to nothing.

    To complete my answer I will just mention that they were some projects in the past to implement a Profibus slave on several microcontrollers (from Atmel and TI). I guess it should be possible to take what is available from those projects and successfully build a Profibus slave but unless you already have the MCU and programming/debugging tools or you are really into hardware prototyping, I doubt that endeavor would be easier or cheaper than the BBB solution referred above.

    Disclaimer: I'm not affiliated with either Texas Instruments or Kunbus. All of the above is based on my own research, experience, and opinions.

    0 讨论(0)
提交回复
热议问题