Robin466
Posts: 29
Joined: Tue May 08, 2018 5:55 am
Location: Fryslân, The Netherlands

profibus on Raspberry pi

Wed May 16, 2018 7:31 am

Hi All,

I am looking for some help....

Because for my final practical Exam, I have to make a device which can test communication via profibus, the system has to communicate via different systems (for example: PLC & HMI) also with different brands. All it has to do is make connection via profibus and throw a error if connection is lost.

now has the company, I need to do this project for, allready bought some modules, the Amescon Pilot mainboard (former Raspicomm+) and a profibus module, a good start I thought. How wrong could I be, it seems that there is no information from amescon, i tried everything, commenting on their forum, e-mail them, facebook,twitter, and calling but no succes.

by google i found out something like pyprofibus, and downloaded that to my PI, however it doesnt tell anything about hardware to use....
I'am in the final prototyping fase of my project, so starting all over would be a major setback.

so my question is, does anyone know how to make this work ?

hardware :
Raspberry Pi 3 model B+

software:
Rasbian

User avatar
CFLanger
Posts: 41
Joined: Fri Feb 06, 2015 5:04 pm
Contact: Website

Re: profibus on Raspberry pi

Wed May 16, 2018 5:58 pm

are you making a slave device or a master? If a master, good luck. I implemented a Profibus DP slave using an off the shelf SOC that implements the profibus layers 1 and 2. The chip is VPC3 from procentec. This chip would be easy to connect to a raspberry spi I2C or SPI channel. It has a data link pin thats asserted when a master connects with it. The only catch is u have to write some code on the PI to move data to and from the VPC3. Youll also need an edge sensitive interrupt.
CFLanger
Senior Software Engineer at
www.ljtechnologies.com

ranpitime
Posts: 75
Joined: Sat Mar 23, 2013 5:21 am

Re: profibus on Raspberry pi

Thu May 17, 2018 5:35 pm

Hi,
you could use:
CODESYS on the Pi:
https://faq.codesys.com/display/CDSFAQ/Raspberry+-+FAQ
this make a full featured profinet controller or profinet device out of your Pi.
Even scan the pn devices which are connected on the network is possible.
See here a CODESYS Project example with two Pi's
one of them is profinet Controller the other the pn device.

https://forum.codesys.com/viewtopic.php ... 724#p12724

BR
ranpitime

Robin466
Posts: 29
Joined: Tue May 08, 2018 5:55 am
Location: Fryslân, The Netherlands

Re: profibus on Raspberry pi

Fri May 18, 2018 5:43 am

ranpitime wrote:
Thu May 17, 2018 5:35 pm
Hi,
you could use:
CODESYS on the Pi:
https://faq.codesys.com/display/CDSFAQ/Raspberry+-+FAQ
this make a full featured profinet controller or profinet device out of your Pi.
Even scan the pn devices which are connected on the network is possible.
See here a CODESYS Project example with two Pi's
one of them is profinet Controller the other the pn device.

https://forum.codesys.com/viewtopic.php ... 724#p12724

BR
ranpitime
it looks like Codesys does not support Profibus on PI.... So it looks like i am out of luck

ranpitime
Posts: 75
Joined: Sat Mar 23, 2013 5:21 am

Re: profibus on Raspberry pi

Fri May 18, 2018 6:24 am

Hi,
it does but you need additional hardware:
You Need to use ethercat with EK1100 coupler and EL6731 - profibus master and profibus slave is possible
to use.
So Pi could finally act as profibus master or profibus slave that way.


BR
ranpitime
Attachments
Profibus_with_PI.jpg
Profibus_with_PI.jpg (150.39 KiB) Viewed 6881 times
Last edited by ranpitime on Fri May 18, 2018 7:13 am, edited 1 time in total.

Robin466
Posts: 29
Joined: Tue May 08, 2018 5:55 am
Location: Fryslân, The Netherlands

Re: profibus on Raspberry pi

Fri May 18, 2018 6:57 am

yeah but can all of this be GUI controlled via the PI ? Right now i have a profibus module, with no information, in my project but that can/has to be controlled via a GUI and/or Push buttons which i have allready working..... but if Codesys needs a PC everytime it runs, we got a problem...

ranpitime
Posts: 75
Joined: Sat Mar 23, 2013 5:21 am

Re: profibus on Raspberry pi

Fri May 18, 2018 7:16 am

no pc is needed... you could control everthing from PI.
PC is only needed to do the application once - download it to the PI and then everything is running on the PI.
You could connect a mobilephone to push buttons or use Raspberry PI LCD and do the hmi on this..
BR
ranpitime

Robin466
Posts: 29
Joined: Tue May 08, 2018 5:55 am
Location: Fryslân, The Netherlands

Re: profibus on Raspberry pi

Fri May 18, 2018 7:32 am

ranpitime wrote:
Fri May 18, 2018 7:16 am
no pc is needed... you could control everthing from PI.
PC is only needed to do the application once - download it to the PI and then everything is running on the PI.
You could connect a mobilephone to push buttons or use Raspberry PI LCD and do the hmi on this..
BR
ranpitime
i understand what you're saying. however i designed a enslosure with a Touch LCD running rasbian right now, the pi boots directly in a python GUI i wrote to operate the test device. it has to test communication with a PLC or HMI, notthing more notthing less.

so looking for a way to imploment this in my design. thank you for your help for so far !

ranpitime
Posts: 75
Joined: Sat Mar 23, 2013 5:21 am

Re: profibus on Raspberry pi

Sun May 20, 2018 5:59 am

Hi,

you could use the LCD with either webvisu, means add all to the CODESYS visualisation (is more easy , you have only one part to maintain) or use for example a OPCUA Client in your application
to access the plc symbols:
For doing this there is an example available here:
https://forum.codesys.com/viewtopic.php ... 932#p19932

BR
ranpitime

Return to “Automation, sensing and robotics”