Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Fuzzy Logic C++ to ST

truly-bent
2019-01-21
2 days ago
  • truly-bent - 2019-01-21

    Hi All;
    I have been translating the (open source) eFFL Fuzzy Logic library https://github.com/zerokol/eFLL

    The persistent problem is that, while the code compiles without errors or warnings, the simulator balks at a download with error: "C0367 Internal error 3 prohibiting online change! Clean application and download necessary". Cleaning the application makes no difference. I have been unable to track down the cause of the error and was hoping to find some help from someone who might have a better grasp of OOP principals as applied to CODESYS. There is a possibility of a call to an un-instantiated object, but i haven't found where.

    An additional question i have is about the CODESYS "NULL" definition. The code compiles with NULLs, but the editor doesn't appear to recognize it as a defined symbol. I have tried replacing all the NULLs with a numeric '0' - this also compiles without errors, but made no difference to the download.

    Any clues to getting this running would be appreciated.
    Thanks,
    Jeff

    EDIT 1: Changed attached file to .project
    EDIT 2: Corrected .project file attached

    Fuzzy_eFFL r024_A.project [183.92 KiB]

     
  • shooter - 2019-01-22

    a null is not equal to a zero, null is nothing mostly 00 hex and a null is a symbol

     
  • eschwellinger

    eschwellinger - 2019-01-23

    Hi,

    you need to attach the .project file not the opt files…!
    BR
    Edwin

     
  • truly-bent - 2019-01-23

    Thanks Edwin.
    Find attached .project file in the edited post above

     
  • truly-bent - 2019-01-29

    It took a bit of head scratching, but the solution presented itself eventually.
    In a few cases, I was creating new objects like this:

    IF ((aux := __NEW(fuzzySetArray)) = 0) THEN
    // do something
    END_IF

    If the object creation is taken out of the IF statement, like this:

    aux := __NEW(fuzzySetArray);
    IF (aux = 0) THEN
    // do something
    END_IF

    ...then the download fault disappears and the simulator is ready to run.

    Find the corrected (..._A.project) file attached to the first post above.
    Jeff

     

Log in to post a comment.