PNS Signal LED Example

1. Example project

In this example the application shall handle the Signal LED on the application side. For that, it is necessary to implement the "start LED blinking indication" and "stop LED blinking indication"


The extendedConfig example can be found in the Knowledge Base on the following website:

netX 90: https://hilscher.atlassian.net/wiki/display/NXLFWHST/netX+90+-+PROFINET+IO+Device+-+Examples



This can alternatively be found under:

kb.hilscher.com → Software → LFW Host Examples → Profinet IO-Device → netX 90 APP / netX 51 → PROFINET IO Device - extendedConfig Vx.x.x.x

The extendedConfig project can be opened by double-clicking the ".solproject" file. This requires the latest version of netXStudio (https://hilscher.atlassian.net/wiki/display/NDT/).


2. PROFINET Sources

A GSDML file is required for this example. The GSDML file can be found in the netXStudio project in Project Explorer at:

netXxx_PNSVx_extendedConfig → Components → cifXApplicationDemoPNS → DeviceDescription → GSDML-V2.3x-HILSCHER-NETX xx-RE PNS-20xxxxxx.xml


The PacketHandler describes the acyclic packages and can be found in the Project Explorer under:

netXxx_PNSVx_extendedConfig → Components → cifXApplicationDemoPNS → Sources → AppPNS_DemoApplicationFunctions.c


The IO Data Handler describes the IO data that is exchanged between the application and the stack and can be found in the Project Explorer under:

    long SetModulConfig( void* pvPck )


The terminal handler uses the interface used by UART to display debug messages and is located in Project Explorer under:

netXxx_PNSVx_extendedConfig → Components → cifXApplicationDemo → Sources → App_TerminalHandler.c


The event handler shows the diagnoses and alarms, which can be found in the Project Explorer under:

netXxx_PNSVx_extendedConfig → Components → cifXApplicationDemo → Sources → App_EventHandler.c


3. Configuration packet

Nothing needs to be done in the configuration packet.


4. Indications

Implement the packet handler Indications for

  • PNS_IF_START_LED_BLINKING_IND
  • PNS_IF_STOP_LED_BLINKING_IND


Use for example the Ethernet Device Configuration Tool to trigger the Signal LED over the network using the DCP protocol.


This requires the latest version of the Ethernet Device Configuration Tool (https://hilscher.atlassian.net/wiki/display/ETHDEVCFG/).


The stack forwards the signal request to the application as an indication. The application now needs to handle the indication.

The application can now use one host controller LED to start blinking with a frequency of 1Hz. As soon as the stop indication comes, the application stops the blinking of the LED.