• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profinet Example in hilschernetpi/netpi-netx-programming-examples
#1
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

  Reply
#2
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)

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

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Raspbian OS version of the latest hilschernetpi/netpi-raspbian tad 2 2,539 March-5th-2021, 11:25 AM
Last Post: tad
  Profinet to Siemens PLC j.langlois 4 4,042 January-26th-2021, 06:11 PM
Last Post: j.langlois
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 7,490 November-25th-2020, 01:06 PM
Last Post: zen89
  Profinet name lost after reboot Dipro 7 5,400 November-16th-2020, 01:07 PM
Last Post: Armin@netPI
  Profinet stopped working (spidev spi0.0: SPI transfer timed out) Schranz 7 5,608 November-2nd-2020, 04:20 PM
Last Post: Armin@netPI
  netPI profinet device name WalterSchaefer 2 2,772 October-7th-2020, 11:10 AM
Last Post: WalterSchaefer
  netPI-netx-programming-examples update slos 12 8,618 September-14th-2020, 07:06 PM
Last Post: Armin@netPI
  netX linux driver Irina Grinberg 4 3,995 May-7th-2020, 01:33 PM
Last Post: Armin@netPI
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 6,236 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  PROFINET IO startup compilation arpan.patel@slscorp.com 3 3,174 February-24th-2020, 12:47 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)