FileOpenSave Dialog WebVisu

sedoerr
2020-07-21
2021-05-21
  • sedoerr - 2020-07-21

    Hi everybody,

    i use a PLC with CoDeSys 3.5.16 and a Webvisualisation.
    I have two problems:

    1. i use the FileOpenSave Dialog from this example https://store.codesys.com/visu-dialog-st.html
      How is it possible to get the filesystem from my hostsystem where i opened the webvisu?

    2. i need to transfer files from my hostsystem, where the webvisu is opened, to my plc. Is it possible with the transfer-function of a button?

    BR

     
  • m.prestel - 2020-07-21

    Hey,

    check out the file transfer example https://store.codesys.com/visu-file-transfer-example.html.

    I think this is what you need for your use case.

    Watch out, you need to enable this via CODESYSControl.cfg

    [CmpWebServerHandlerV3]
    AllowFileTransferServices=1
    

    Best regards,
    Marcel

     
    πŸ‘
    2
  • sedoerr - 2020-07-21

    Hi Marcel, thanks for your answer.

    Do i need to add both lines to CODESYSControl.cfg?
    Then FileTransfer will work on all devices with webvisu opened or only when a gateway is open?

    Yea, this example for filetransfer is the next one i wanted to check. but i think i first need to know which file the user wants so tranfer. Thats the reason i need the fileopensave dialog.

    EDIT: btw i have a real PLC not a simulated

     

    Last edit: sedoerr 2020-07-21
  • m.prestel - 2020-07-21

    Hey,

    Yes both lines.
    The file transfer works with all webvisu clients, you just need to enable the service in the runtime.

    The user is able to pick a file from his system and upload it to the plc or you can download a file from the plc to the user (the file open dialog will be used for this to show the files on the plc).

    Best regards,
    Marcel

     
  • sedoerr - 2020-07-21

    Thanks a lot. So i will check the example for the file transfer.

    Just to be really clear. With this both lines this service will be activated?
    And you mean this file? \CODESYS 3.5.16.0\GatewayPLC\CODESYSControl.cfg

    cause with windows search i found more than one of this files.

     
  • m.prestel - 2020-07-21

    No, I do not mean the file located in C:\Program Files\CODESYS 3.5.16.0\GatewayPLC\CODESYSControl.cfg

    This file however contains something like this:

    [SysFile]
    Windows.WorkingDirectory=C:\ProgramData\CODESYS\CODESYSControlWinV3\ABCD\
    

    You then have to open the following file:

    C:\ProgramData\CODESYS\CODESYSControlWinV3\ABCD\CODESYSControl.cfg

    In there you have to add the lines described at the start.

    Best regards,
    Marcel

     
  • sedoerr - 2020-08-03

    Hey Marcel,

    i tried your solution, but i get always a Error ID 7. Maybe you know something witch can solve this?

    BR
    Sebastian

     
  • m.prestel - 2020-08-03

    Hello,

    this error code indicates that the file transfer is not enabled.

    As described before you need to enable this service.

    Best regards,
    Marcel

     
  • sedoerr - 2020-08-03

    Hey Marcel,
    yes i know and i made this change. For me, my WorkingDirectory is

    C:\ProgramData\CODESYS\CODESYSControlWinV3x64\F11FFF3A\

    there, i added this line you wrote above, to CODESYSControl.cfg

    But what i don't understand. Why do i need to change a file for CODESYSControlWin when i use a real Hardware-PLC?

     
  • m.prestel - 2020-08-03

    Well you did only mention the ControlWin.
    How am I supposed to know you mean a hardware plc?

    Of course you need to change the configuration on the hardware plc

     
  • sedoerr - 2020-08-03

    Sorry, i wrote it in my second post, but i added it a little later, so maybe it was not really clear.

    Maybe you know how it is possible so change configuration on a hardware plc. i looked in my filesystem on the plc by sftp, but i can't find any config file there.

     
  • m.prestel - 2020-08-03

    What os are you using?

    On Linux is most often located at /etc/CODESYSControl.cfg

     
  • sedoerr - 2020-08-03

    do you mean OS of my PC, where i am running CoDeSys or do you mean OS of the HardwarePLC?

    OS of my PC is Windows 10
    PLC is a TURCK TBEN-L5-PLC-11 (seems to be Linux)

     
  • m.prestel - 2020-08-03

    OS of the plc.

    Pls check if there is a file located at /etc/CODESYSControl.cfg
    Otherwise ask the OEM of your plc.

     
  • sedoerr - 2020-08-03

    Hey Marcel,

    thanks a lot for your reply. Unfortunatly there is no such directory nor this file. So i will contact the OEM for help.

    BR
    Sebastian

     
  • koma - 2021-05-21

    Hello, is this forum still active?

    Just like Sebastian, I also want to choose file in the client device (tablet)
    by dialog.
    VisuDialogST example can choose only file in the plc.

    Does anyone know?

    Koma

     
  • koma - 2021-05-21

    Thank you for your quick reply.

    I will try it.

    Koma

     

Log in to post a comment.