Cannot read from Profinet Gateway

Topics about the Software of Revolution Pi
Post Reply
novako19
Posts: 4
Joined: 02 Dec 2020, 14:57
Answers: 0

Cannot read from Profinet Gateway

Post by novako19 »

Hi!

I am trying to read a data from Profinet IRT Gateway from Python by revpimodio2 on my RevPi Connect.

When I log into the Gateway's web interface, I can see the data under in the Output section. Nevertheless, in Linux, I can't read any of them by using revpimodio2 (nor I can read it by using piTest), I only see zeros.

---

Code: Select all

piTest -d
gives

Code: Select all

Found 2 devices:

Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
     input offset: 1024 length: 6
    output offset: 1030 length: 5

Address: 31 module type: 79 (0x4f) Gateway Profinet IRT V1.2
Module is present
     input offset: 0 length: 512
    output offset: 512 length: 512
.

When I tried to update firmware by

Code: Select all

piTest -f
, it did nothing, but

Code: Select all

[ 3720.932713] piControl: error: cannot open file /lib/firmware/revpi/fw_00105_001.fwu
[ 3720.932722] piControl: update 0 addr 0 ret -2
[ 3720.932749] piControl: error: cannot open file /lib/firmware/revpi/fw_00079_001.fwu
[ 3720.932755] piControl: update 1 addr 31 ret -2
appeared in

Code: Select all

kern.log
.

I'm running

Code: Select all

Linux RevPi1002748982 4.19.95-rt38-v7+ #1 SMP PREEMPT RT Tue, 16 Jun 2020 13:25:43 +0200 armv7l GNU/Linux
,

Code: Select all

Raspbian GNU/Linux 9 \n \l \4 \6
, fully updated by

Code: Select all

apt dist-upgrade
.

Does anybody has an idea, how should I proceed next to solve this problem?

Thanks!
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Cannot read from Profinet Gateway

Post by dirk »

Hi, the I/O mapping of the data can be a bit cumbersome regarding the Modular Gateway Profinet IRT. There are different offsets for acyclic and cyclic data exchanges.
Have a look at the user manual regarding the offsets:
5.3 Exchanging Data cyclically
5.3 Exchanging Data cyclically
2020-12-03 15_17_34-Gateway Component for PROFINET.jpg (48.13 KiB) Viewed 4356 times
5.4 Exchanging Data acyclically (Records)
5.4 Exchanging Data acyclically (Records)
2020-12-03 15_19_20-Gateway Component for PROFINET.jpg (49.01 KiB) Viewed 4354 times
Check the Profinet module configuration on the PLC.
By default in PiCtory you just have access to the first 20 bytes of input and output data.
Have a look at this post how you can switch the configuration to get access to the full data range of 512 bytes for input and output data.
novako19
Posts: 4
Joined: 02 Dec 2020, 14:57
Answers: 0

Re: Cannot read from Profinet Gateway

Post by novako19 »

Thanks for the answer. I have tried to view the data by

Code: Select all

piTest -r 0,1000
to be sure I haven't confused the offset, but with no success. All displayed values were zero.
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Cannot read from Profinet Gateway

Post by dirk »

Hi novako19, thank you for your reply and your investivations about the fwu files. There are fwu files missing also for the gateway module PROFINET you are using. We have to verify the root cause of this and hope that we can send you the necesary file as soon as possible. Thank you for your patience.
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Cannot read from Profinet Gateway

Post by dirk »

Hi novako19, the Debian package revpi-firmware in version 1.5 is released in our repository. The missing files have been added. Please update your system like so:

Code: Select all

sudo apt update
sudo apt install revpi-firmware
Then it should be possible to update the devices.
novako19
Posts: 4
Joined: 02 Dec 2020, 14:57
Answers: 0

Re: Cannot read from Profinet Gateway

Post by novako19 »

Hi, thanks for the update, but the problem was not solved.

With

Code: Select all

revpi-firmware
updated to version 1.5

Code: Select all

piTest -f
now prints

Code: Select all

update firmware fail
and logs

Code: Select all

[  271.922756] piControl: stop data exchange
[  271.922791] piControl: piIoComm_gotoGateProtocol returned 0
[  271.994058] piControl: error: cannot open file /lib/firmware/revpi/fw_00105_001.fwu
[  271.994070] piControl: update 0 addr 0 ret -2
[  271.995217] piControl: firmware file length: 121552
[  272.000362] piControl: firmware is up to date: 1.2 >= 1.2
[  272.000379] piControl: update firmware fail
[  272.000387] piControl: update 1 addr 31 ret
The device behaves the same way as before the update. That is - writting from PLC to Profinet Gateway works (I can see the value on the Gateway's website), but

Code: Select all

piTest -r 0,1024,h 
only prints zeroes. Could it be a HW problem? How can I diagnose it?
novako19
Posts: 4
Joined: 02 Dec 2020, 14:57
Answers: 0

Re: Cannot read from Profinet Gateway

Post by novako19 »

Any update on this, please?
Post Reply