Home AMX User Forum NetLinx Studio
Options

FILE_OPEN Error -14

Sometimes i have an error -14 by FILE_OPEN funktion on NX Serie.
In the help file is this error described as a max. open file error. (max 10 files at the same time)
Is there a way to see what files are in stack or is there a possibility to clear the stack without to reboot the controller?

Thanks for help

Comments

  • Options

    I'm not aware that there is a way to check how much files currently are open.
    You may have to keep track of it by yourself, tracking the file ID handler numbers you get by a FILE_OPEN(), that are needed as ID for any following FILE operations.

    An idea may be to have an SINTEGER array,, where each array element represents the stats of a specific file. Assuming file XYZ.txt is tracked at position 3 of that array, any result of FILE operations related to that file are stored in element 3 of that array. If an element is >0, the corresponding File is currently in use. So before opening a new file, you may loop thru that array, checking of the elements are >0, and if found 10 values >0, you know that you currently can't open additional files.

    Just interesting... why you need so much files open?

  • Options
    thomas.judthomas.jud Posts: 44

    There was an error in the code. A FILE_CLOSE was missing deep in the code..
    I found it and fix that.

    by the way it is easy to fix. If the handle is -14. I can close all handles by function FILE_CLOSE(Handle Numer 1-10)

Sign In or Register to comment.