PNS Check Indication Example
1. Example project
In this example, the application shall handle Check Indication on application side.
Check Indication comes, if the configuration between IO Controller and IO Device is not the same. Here is shown the situation what to do if an old device gets a stack update.
The extendedConfig example can be found in the Knowledge Base on the following website:
netX 90: https://kb.hilscher.com/display/NXLFWHST/netX+90+-+PROFINET+IO+Device+-+Examples (from V3.0.0.0)
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
Because of the change from PNS Stack V5.1 to PNS Stack V5.3 a new DeviceAccessPoint (DAP) in the GSDML is necessary. The new DAP (for the new stack) supports new PROFINET features.
(for example: PNS Stack V5.1 (netload Class 1 or 2) and PNS Stack V5.3 (netload Class 3))
The configuration packet has been changed to new ModuleIdentNumber and SubmoduleIdentNumber for the new DAP.
old DAP:
Slot 0               → ModuleIdentNumber: 0x00003011
Subslot 1         → SubmoduleIdentNumber: 0x00003010
Subslot 0x8000 → SubmoduleIdentNumber: 0x00003011
Subslot 0x8001 → SubmoduleIdentNumber: 0x00003012
Subslot 0x8002 → SubmoduleIdentNumber: 0x00003013
new DAP:
Slot 0               → ModuleIdentNumber: 0x00003021
Subslot 1         → SubmoduleIdentNumber: 0x00003020
Subslot 0x8000 → SubmoduleIdentNumber: 0x00003021
Subslot 0x8001 → SubmoduleIdentNumber: 0x00003022
Subslot 0x8002 → SubmoduleIdentNumber: 0x00003023
4. Check Indication
If a PLC is configured with the DAP from the old GSDML or with the old DAP from new GSDML and it is used with a device with new Module- and SubmoduleIdentNumbers, the stack sends a check indication to the application for all submodules with a configuration differences between IO Controller and IO Device in the connection establishment.
The application has meanwhile to decide whether the new software version of the new DAP is compatible to the old DAP or not.
If the DAP is compatible, the application has to return "Substitute".
In the most cases, this will be the case, because no one wants to update the running PLC program. The new device software should always be compatible to the old device software.