Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example the application shall handle Devicename and IP on application side. For that it is necessary to change the configuration packet, to implement the "save station name indication",

the "save ip adress inddication address indication" and the "reset to factory indication". For that the application need needs a posibilty possibilty to save information remanent in a falshflash.

Example Sourccode Sourcecode can be found is in the Extended Config Example: netX 90 - PROFINET IO Device - extendedConfig V2.2.0.0

...

In the configuration packet it is necessary to change the ptSetConfig→ulSystemFlags. First step ist is to disable the flag PNS_IF_SYSTEM_NAME_IP_HANDLING_BY_STACK_ENABLED.

...

The next step is the use of devicename and ip address parameter in the configuration packet.

The application reads the last remanent safed data from the (application) flash the last remanent safed data.

ptSetConfig→abNameOfStation = value from Flash  flash  (240 signs)

ptSetConfig->ulIpAddr = value from Flash  flash  

ptSetConfig->ulGateway = value from Flash flash 

ptSetConfig→ulNetMask = value from Flash  flash  

3. Indications

Implement in the packet handler the Indications for

PNS_IF_SAVE_STATION_NAME_IND

...

Use for example the Ethernet Device Configuration Tool to change the devicename or IP address over the network with DCP protocoll the devicename or IP addressthe DCP protocol.

https://kb.hilscher.com/display/ETHDEVCFG


The stack forward forwards this change to the application as an indication. The application now needs now to handle the indication.

...

If the bRemanent value is 1, the application shall check if the value in the appliaction flash is still the same like in the indication. If it is not the same value, write the new value in into the application flash.

If the bRemanent value is 0, than you your application need needs to save the value temporary. That meens, the saved value in the application flash need needs to be deleted.