Bitmap live updating

francois
2014-08-01
2014-08-01
  • francois - 2014-08-01

    Hello,

    I am looking for a way to change an image live on the file system and have it updated on the target/web visu.
    It seems that once the runtime has loaded, it will always display a cached version of the image on the targetvisu.
    I have tried unregistering/registering the file, but it does not seems to do anything.

    BmpPoolUnRegister(IMAGE_POOL_ID);
    BmpPoolRegister(szFile := IMAGE_FILE_LOCATION, szId := IMAGE_POOL_ID);
    

    I have also tried registering a new file under a new ID without any luck.
    Changing the page does not help either.

    Is there a way to do this without restarting the runtime in 3.5.4.x?

    Thanks!

     
  • eschwellinger

    eschwellinger - 2014-08-01

    Hi,

    this is only possible with a setting:

    in webvisu.cfg.json in /visu "NumCachedImages": 0

    Code:

    {
    "UpdateRate": 200,
    "PlcAddress": "0000.9ED4.C1D5",
    "UseLocalHost": true,
    "Application": "Application",
    "StartVisu": "SendTweetVisu",
    "NumCachedImages": 0,
    "BestFit": true,
    "LogLevel": "INFO",
    "CommBufferSize": 50000,
    "HasKeyboard": false
    }

    Then you need to take care that CODESYS doen not overwrite webvisu.cfg.json on every download - make it readonly or change the name in CODESYS to webvisu_my in CODESYS.

    BR
    Edwin

     

Log in to post a comment.