Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    OpconBase – PageFault Exception

    English 🠦 Deutsch
     

    When updating the OpconBase library a PageFault Exception can occur.

    Exception 01.png

     

    Exception 02.png

     
    This behavior is currently under investigation, however we would like to describe currently known error causes and solutions in this article.
     
    Known code locations in the OpconBase library (displayed in call stack):
    • Addon._stdExecFsm
    • Addon.InfoStorage/WarningStorage/ErrorStorage.xxx
    • Extension._panelSwitch

    Call Stack.png

     
    Error cause - Different parameter sets OpconBaseConfig

    A known cause of error is due to different parameter sets of OpconBaseConfig between PLC runtime and PLC development environment.
     
    OpconBaseConfig.png

     
    For example, the maximum number of subchains per handler would be increased via OPCON_HANDLER_SUBCHAINS_PER_HANDLER. After an update of the OpconBase library the set values are set back to the default value. When loading the changes, a PageFault exception can occur, an Activate Configuration does not solve the problem in all cases.

    OPCON_HANDLER_SUBCHAINS_PER_HANDLER.png

     

    We recommend to document such adjustments with message pragmas in the Application
    Compiler Pragmas.png

     

     

    Solution - Different parameter sets OpconBaseConfig

    The parameters must be reset to the last loaded parameter values, then the PLC program can be loaded without any problems. The set parameters can be taken from the PlcProject.plcProj. It is to be considered that the PlcProject.plcProj is overwritten with an Activate Configuration, afterwards the original parameters are no longer visible.

    PlcProject.plcProj.png

     
    Remarks
    Furthermore, this behavior was also observed without changing the parameter set of the OpconBaseConfig. For this specific behavior, the cause of the error is not yet known.

    The following procedures have provided relief in the past::

      •  Change library version of OpconBase temporarily.
        Library version.png
     
    • Delete, rename and move addons
      (Deleting the addon with exception is usually not enough. The error then shifts further).
    • Other code changes in the declaration area, i.e. things that have influence on the memory (change/delete structures/FBs).
    • Delete the OPC UA attributes generated by the Control plus Studio, then do Clean and Activate Configuration. Then take the attributes back and do Clean + Activate Configuration again.
    • On the target system, delete C:\TwinCAT\3.1\Boot\Plc. On the laptop in the station folder also delete Boot folder and CompileInfo. Then Clean, Build and Activate Configuration.
      This procedure corresponds to a "safe" reset origin, i.e. all persistent data is gone. The persistent data can be saved and restored (save file C:\TwinCAT\3.1\Boot\Plc\Port_851.bootdata).
    • Download of old software versions.
    • Upgrade TwinCAT version (4020.28 -> 4020.56, 4022.2x -> 4022.3x) or downgrade (4022.32 -> 4022.30).

    After the PageFault exception no longer occurs, all changes can be undone. The original software can now be installed without the PageFault exception.

     
    Deutsch 🠦 English
     

    Beim update der OpconBase-Library kann es zu einer PageFault Exception kommen.

    Exception 01.png

     

    Exception 02.png

     
    Dieses Verhalten wird aktuell untersucht, dennoch möchten wir aktuell bekante Fehlerursachen und Lösungen in diesem Artikel beschreiben.
     
    Bekannte Code-Stellen in OpconBase library (angezeigt im Call Stack):
    • Addon._stdExecFsm
    • Addon.InfoStorage/WarningStorage/ErrorStorage.xxx
    • Extension._panelSwitch

    Call Stack.png

     
    Fehlerursache – Unterschiedliche Parametersätze OpconBaseConfig

    Eine bekannte Fehlerursache ist auf unterschiedliche Parametersätze der OpconBaseConfig zwischen SPS-Runtime und SPS-Entwicklungsumgebung zurückzuführen.
     
    OpconBaseConfig.png

     
    Beispielsweise würde die maximale Anzahl der Subchains per Handler über OPCON_HANDLER_SUBCHAINS_PER_HANDLER erhöht. Nach einem Update der OpconBase-Library werden die eingestellten Werte wieder auf den Default-Wert gesetzt. Beim Laden der Änderungen kann es zur PageFault-Exception kommen, ein Activate Configuration schafft nicht in allen Fällen Abhilfe.

    OPCON_HANDLER_SUBCHAINS_PER_HANDLER.png

     

    Wir empfehlen, solche Anpassungen mit Meldungspragmas in der Application zu dokumentieren.
    Compiler Pragmas.png

     

    Lösung – Unterschiedliche Parametersätze OpconBaseConfig

    Die Parameter müssen auf die zuletzt geladenen Parameterwerte zurückgestellt werden, danach kann das SPS-Programm problemlos geladen werden. Die eingestellten Parameter können der PlcProject.plcProj entnommen. Es ist zu beachten dass die der PlcProject.plcProj bei einem Activate Configuration überschrieben, danach sind die ursprünglichen Parameter nicht mehr ersichtlich.

    PlcProject.plcProj.png

     
    Bemerkungen
    Weiterhin wurde dieses Verhalten auch beobachtet ohne dass der Parametersatz der OpconBaseConfig geändert wurde. Für dieses spezifische Verhalten ist die Fehlerursache noch nicht bekannt.

    Folgende Vorgehensweise haben in Vergangenheit Abhilfe geschaffen:

      •  Bibliotheksversion der OpconBase temporär ändern.
        Library version.png
     
    • Addons löschen, umbenennen und verschieben
      (Das Löschen des Addons mit Exception reicht meistens nicht aus. Der Fehler „wandert“ dann weiter.)
    • Sonstige Code-Änderungen im Deklarationsbereich, d.h. Dinge, die Einfluss auf den Speicher haben (Strukturen/FBs ändern/löschen).
    • Die vom Control plus Studio generierten OPC UA Attribute löschen, dann Clean und Activate Configuration machen. Danach die Attribute wieder reinnehmen und wieder Clean + Activate Configuration.
    • Auf dem Zielsystem C:\TwinCAT\3.1\Boot\Plc löschen. Auf dem Laptop im Stationsordner ebenfalls Boot-Ordner und CompileInfo löschen. Danach Clean, Build und Activate Configuration.
      Dieses Vorgehen entspricht einem „sicheren“ Reset Ursprung, d.h. alle persistente Daten sind weg. Die persistenten Daten können gesichert und wiederhergestellt werden (Datei C:\TwinCAT\3.1\Boot\Plc\Port_851.bootdata sichern).
    • Einspielen alter Softwärestände.
    • TwinCAT-Version aktualisieren (4020.28 -> 4020.56, 4022.2x -> 4022.3x) oder downgraden (4022.32 -> 4022.30).

    Nachdem die PageFault-Exception nicht mehr auftritt können alle Änderungen rückgängig gemacht werden. Die ursprüngliche Software kann nun ohne PageFault-Exception eingespielt werden.

    Version history
    Last update:
    ‎03-03-2023 08:41 AM
    Updated by:
    Contributors
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist