Hilscher Community Forum
Profinet Example in hilschernetpi/netpi-netx-programming-examples - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: Profinet Example in hilschernetpi/netpi-netx-programming-examples (/thread-245.html)



Answer - Thomas - November-17th-2017

Hello,

I am trying to transfer some data as done in ChannelDemo() found in PNS_simpleConfig.c on the hilschernetpi/netpi-netx-programming-examples and I think I found a discrepancy between the implementation/netX51 firmware and the GSDML file. As I understand the source code, the 10-byte input is echoed to a 4-byte output (from netPi view).
In TIA Portal the GSDML-file gives me a 10-byte input and a 4-byte output (from PLC view).

I think for one view it sould be the other way around. Just try to force all 10 netPi input bytes to a certain value while the PNS_simpleConfig ChannelDemo is running using the GSDML description included in the image.

Is there a netPi profinet firmware and GSDML-file which is capable of transferring more than 4-bytes?

Best regards
Thomas




Answer - Armin@netPI - November-17th-2017

Hello Thomas,

you are absolutely right. The sourcecode PNS_simpleConfig.c mixes inputs with outputs during the copy routine. It reads the outputs correctly coming from the PN controller but it puts it internally into the input buffer which is nonsense.

I have to correct it and provide a new source code. It might be that also EtherCAT and EtherNet/IP examples copy the wrong sizes also since the xxx_simpleConfig is all the same.

And no there isn't any GSDML file for any other sized. The GSDML file is just an example of how to make a PROFINET device with netX. Building your very own PROFINET "device" urges users to make adaptions to the GSDML file themselves in accordance with the GSDML file guideline coming from the PROFINET organization.

The sizes netX is providing as IO size can be easily change in the include file App.h by yourself. But once you change it do not forget to make the very same changes with the GSDML file, else the controller will not communicate to netX.


Answer - Armin@netPI - November-18th-2017

Hello Thomas,

I corrected the source codes of all three examples, cleared github repo (was necessary) and uploaded my work again and I also updated docker image.

It was not much execpt to change INPUT to OUTPUT and vice versa. The rest like GSDML files remains the same. Just the copy routine needed a change.

Thanks for the hint

Regards
Armin