PlayerByNature
Member
Guys,
I get error ID 'Invalid or unknown file handle' when I want to read a file after opening it in Twincat.
The first time I tried to read it, it worked.
After changing my structure of the ReadBuffer instance(FILEDATA) I get this error.
All my files are in the correct directory.
I see some strange things happening with the 'file handler' address. Everytime when opening the file, the address is different?
Kind regards
I get error ID 'Invalid or unknown file handle' when I want to read a file after opening it in Twincat.
The first time I tried to read it, it worked.
After changing my structure of the ReadBuffer instance(FILEDATA) I get this error.
All my files are in the correct directory.
I see some strange things happening with the 'file handler' address. Everytime when opening the file, the address is different?
Code:
fbFileRead(sNetId:='',
hFile:=hFile,
pReadBuff:=ADR(FILEDATA),
cbReadLen:=SIZEOF(FILEDATA),
bExecute:=bFileRead,
bBusy=>bFileReadBusy,
bError=>bFileReadError,
nErrId=>nFileReadErrorId,
cbRead=>nFileReadCount,
bEOF=>bFileReadEOF);
Kind regards
Last edited: