Page 1 of 1

profibus on Raspberry pi

Posted: Wed May 16, 2018 7:31 am
by Robin466
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

Re: profibus on Raspberry pi

Posted: Wed May 16, 2018 5:58 pm
by CFLanger
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.

Re: profibus on Raspberry pi

Posted: Thu May 17, 2018 5:35 pm
by ranpitime
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

Re: profibus on Raspberry pi

Posted: Fri May 18, 2018 5:43 am
by Robin466
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

Re: profibus on Raspberry pi

Posted: Fri May 18, 2018 6:24 am
by ranpitime
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

Re: profibus on Raspberry pi

Posted: Fri May 18, 2018 6:57 am
by Robin466
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...

Re: profibus on Raspberry pi

Posted: Fri May 18, 2018 7:16 am
by ranpitime
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

Re: profibus on Raspberry pi

Posted: Fri May 18, 2018 7:32 am
by Robin466
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 !

Re: profibus on Raspberry pi

Posted: Sun May 20, 2018 5:59 am
by ranpitime
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