• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profinet Example in hilschernetpi/netpi-netx-programming-examples

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

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.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

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

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Possibly Related Threads...
Thread Author Replies Views Last Post
  Profinet Startup Time Schranz 3 31 November-18th-2019, 03:22 PM
Last Post: Armin@netPI
  Codesys RTE profinet echteler 2 29 September-25th-2019, 09:56 AM
Last Post: Armin@netPI
  normal ethernet port using for Profinet MGharat 4 35 August-7th-2019, 10:39 AM
Last Post: hannes
  Detecting NetPI in Siemens TIA via Profinet andrewc 3 29 April-11th-2019, 06:42 PM
Last Post: Armin@netPI
  [SOLVED] Use netX interface as profinet controller jromero248 2 64 January-10th-2019, 12:30 PM
Last Post: jromero248
  Auflösung in hilschernetpi/netpi-desktop-hdmi ändern dennis 5 152 November-15th-2018, 11:28 AM
Last Post: Armin@netPI
  NetPi as Profinet slave with other slaves present Reimar 4 196 July-24th-2018, 02:52 PM
Last Post: Armin@netPI
  netPI PROFINET IO Limitations Reimar 5 157 June-30th-2018, 09:14 PM
Last Post: Armin@netPI
  [SOLVED] hilschernetpi/netpi-nodered-fieldbus Fieldbus configurator can't be open Andreas 6 202 June-11th-2018, 09:12 AM
Last Post: Armin@netPI
  usage of hilschernetpi/netpi-netx-ethernet-lan is working but costs 25% cpu power Michael_d 7 159 March-9th-2018, 10:52 AM
Last Post: Michael_d

Forum Jump:

Users browsing this thread: 1 Guest(s)