Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

RPi 3 as Profinet Master with Profinet Device

rKtiC
2017-12-04
2019-03-27
  • rKtiC - 2017-12-04

    Hi everyone,

    I have a problem using the RPi 3 Model B as a Profinet Master in Codesys.
    My system is as follows:

    I have a computer running Windows 7 with CoDeSys v. 3.5 SP11 to program the PLC. The computer is connected via a switch a raspberry pi 3 Model B and a profinet device. I installed the profinet device with a GSDML-file. The device is a SCHUNK EGL90 PN.
    In CoDeSys I can find the RPi3. I added an Ethernet device and below this a profinet controler (with the IP of the RPi3) and below that the profinet device.
    When I log in everything seems to work but I do not get any values (see screenshots CoDeSys_1 & CoDeSys_2).

    Does anyone have an idea why? Do I have to switch lowbyte and highbyte and if yes, how do I do this?

    I would be very grateful to get any tip!

    rKtiC

    IMG: Bild

    IMG: CoDeSys_2.png

    IMG: CoDeSys_1.png

     
  • eschwellinger

    eschwellinger - 2017-12-04

    Hi,
    everything seems ok,
    you just need to map varibales.. then the process varibales should work.
    (No mapping no processdata exchange)
    BR
    Edwin

    IMG: AlwaysUpdate.jpg

     
  • rKtiC - 2017-12-07

    Thank you for your answer Edwin.
    Mapping the variables wasn't a problem but now it seems that I get values for only some of the BOOL-variables. The other ones are greyed out (screenshot ‘CoDeSys_3’).
    Sometimes I got also values for other REAL-variables but then they disappeared again.
    As you can see in screenshot ‘CoDeSys_4’ it looks like that port-001 of the PN-controller is not active. Could that be a reason? If yes, how can I activate it?

    rKtic

    IMG: CoDeSys_3.png

    IMG: CoDeSys_4.png

     
  • eschwellinger

    eschwellinger - 2017-12-08

    Hi,
    yes for me it is clear why.

    BR
    Edwin

    IMG: mapping.jpg

     
  • eschwellinger

    eschwellinger - 2017-12-08

    or use option 2:
    update always Setting.

    BR
    Edwin

    IMG: Enable2.jpg

     
  • rKtiC - 2018-01-02

    Happy New Year!

    Everything works now. The two bytes of status and control word have to be swapped.
    Thanks for the help!

     
  • grunf - 2018-07-24

    Well, dont know what i did wrong. When i scan for device i can see my Kuka robot and ip adress that i set on KRC, but got this error?

    IMG: viber image.jpg

     
  • eschwellinger

    eschwellinger - 2018-07-25

    Hi,
    which error do you mean - there is no error - next step is to select the line in this scan dialog and exceute
    'Set Name + IP'.

    -> then 'copy all devices to project' - and do a new download

    BR
    Edwin

    IMG: SetIPandName.png

     
  • grunf - 2018-07-25

    thx Edwin, think i try that, but nothings happend? Will try again today, and post results!

    BG

     
  • grunf - 2018-07-25

    me again, now thats the error, but ip adress in krc is set to valid range

    IMG: Untitled.png

     
  • grunf - 2018-07-25

    wow stupid mistake, i solved my issue ......connected all eth interfaces on unmenaged switch, nad everythings works at glance

     
  • eschwellinger

    eschwellinger - 2018-07-27

    Important Information for PI3B plus and current Raspbian:

    If someone is using PI3B+ with Profinet Controller / Device on eth0.

    There is a known issue with current Raspian and new Ethernet Driver:
    the following steps are needed:

    sudo apt install vlan   # VLAN-Paket installierensudo modprobe 8021q     # 8021q Kernelmodul laden

    loading the kernel module could be done on restart by:
    sudo su -c 'echo "8021q" >> /etc/modules'

    BR
    Edwin

     
  • Snoopy354 - 2019-03-27

    Hello Edwin,

    Is this already fixed?

    Thanks
    Bruno

     
  • eschwellinger

    eschwellinger - 2019-03-27

    hm.. guess not,
    this need to be added to the RASBIAN Image by Rasbian.org

    BR
    Edwin

     

Log in to post a comment.