具有RPI主站和从站的Profibus [英] Profibus with rpi master and slave

查看:95
本文介绍了具有RPI主站和从站的Profibus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是使用Rpi和Rs-485转换器构建Profibus主站和从站网络。



一个Rpi将成为主站,另一个Rpi将成为从站。我正在对DP堆栈使用

解决方案

由于您谈论的是IP地址,我认为您可能将Profibus与Profinet混淆了。如果是这种情况,您可能想看看5.2版本的Linux内核中引入的Fieldbus驱动程序。我没有时间测试它们,但是它们应该提供您所需要的。



如果相反,您的确是指Profibus,恐怕什么也没有在开源方面,您可以将其用作RPi的Profibus从站堆栈。如您所说,有一个主堆栈(PyProfibus)可以很好地工作。



如果目标是为教育目的或内部使用而构建Profibus网络,则可以使用 BeagleBone Black或BBB SBC,其成本与RPi大致相同。不幸的是,Profibus堆栈软件(主从)都不在Linux上运行,而是在TI RTOS(用于多个Texas Instruments处理器的轻量级OS)上运行。为了符合Profibus的实时要求,该软件利用了TI的Sitara PRU-ICSS (可编程实时单元工业通信子系统),这有点过分简化了,将几个微控制器与Sitara的SoC集成在一起。显然,这意味着该软件无法移植到任何其他硬件(TI的Sitara系列除外)上。



如果您决定尝试一下,您将拥有安装TI的开发环境。可以在TI的处理器论坛中找到详细说明: 1 2



在硬件方面,您将需要几个BBB板,或者只需要一个BBB板和一个Profibus主站或从站(PLC或任何您拥有的设备)。如果您要与PLC或任何其他标准Profibus设备(而不是另一个BBB板)进行接口连接,则还需要便宜的(几块钱)RS485转TTL收发器。



如果您愿意支付硬件和/或许可费用,那么前景会更光明。德国公司 Kunbus ,以 Revolution Pi 系列基于Raspberry Pi的类似PLC的计算机会产生 Profibus从站网关。他们还提供了可在Linux和TI RTOS上运行的TI Sitara处理器的Profibus软件,但购买该库需要支付许可费或固定价格。不久前,他们正在考虑发布Profibus Master软件堆栈



为完成我的回答,我只想说它们是过去要实施的一些项目在多个微控制器上的Profibus从站(来自 Atmel TI )。我想应该可以从这些项目中获得可用的东西,并成功地构建Profibus从站,但是除非您已经拥有MCU和编程/调试工具,或者您真的要进行硬件原型设计,否则我怀疑这样做会比这更容易或更便宜。



免责声明:我与德州仪器(TI)或Kunbus无关。以上所有都是基于我自己的研究,经验和观点。


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.com/mbuesch/pyprofibus for DP-stack to implement the same.

How can I assign address to master and slave rpi boards to use in profibus initialization sequence. It is not accepting the IP address given to the rpi boards

解决方案

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.

这篇关于具有RPI主站和从站的Profibus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆