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

How to implement IVisuStreamReader

  • ryusoup - 2023-03-01


    I am working on downloading a file exists on remote controller over WebVisu.
    Following the file transfer example , I prepared a FB implements IVisuStreamReader to use file transfer feature on Visu as the screenshot attached, and it works with some small files enough to read whole content in 1 scan.
    But with larger file, downloaded file contains only the end part of the original file.

    Does anyone know how to fix this?

    Best regards,

  • ryusoup - 2023-03-02

    Self resolved.

    readLen := SysFileRead(hFile:=hFile, pbyBuffer:=pbyBuffer, ulSize:=udiMaxNrBytes, pResult:=ADR(error));


    readLen := SysFileRead(hFile:=hFile, pbyBuffer:=pbyBuffer, ulSize:=udiMaxNrBytes-10, pResult:=ADR(error));

    cleared the problem.
    But still, I don't understand why that happens.


Log in to post a comment.