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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Hi,
everything seems ok,
you just need to map varibales.. then the process varibales should work.
(No mapping no processdata exchange)
BR
Edwin
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
Hi,
yes for me it is clear why.
BR
Edwin
or use option 2:
update always Setting.
BR
Edwin
Happy New Year!
Everything works now. The two bytes of status and control word have to be swapped.
Thanks for the help!
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?
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
thx Edwin, think i try that, but nothings happend? Will try again today, and post results!
BG
me again, now thats the error, but ip adress in krc is set to valid range
wow stupid mistake, i solved my issue ......connected all eth interfaces on unmenaged switch, nad everythings works at glance
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
Hello Edwin,
Is this already fixed?
Thanks
Bruno
hm.. guess not,
this need to be added to the RASBIAN Image by Rasbian.org
BR
Edwin