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

Loss of connection via VPN

2020-07-13
2020-07-13
  • alvarochacon - 2020-07-13

    Hello colleagues, I have a big problem with my project, I am working with a PFC200 PLC (750-8202 / 025-002). I am using the e!Cockpit software, which is based on Codesys 3.5.

    To access this PLC, I must do it through a VPN, since the project involves different places (Solar Farm).

    The basis of the project is as follows, The User Enters a Hosted Application on a WEB page, this API (Master) communicates with the PLC through Modbus TCP (Slave), and this PLC (Now MASTER) communicates with a TESLA battery (Slave).

    Everything Works Perfect as long as the VPN service on the PLC is working. I don't know why, but the VPN service in the PLC stops (Although the VPN continues to work without a problem). Here comes the big problem, someone must go to the PLC Site and Restart it, or we must connect via TeamViewer to a PC in the same Local Network of the PLC and restart it through WBM. While all this is happening, the PLC remains isolated from the API.

    Already in context, this would be my great concern:
    How can I restart or reboot the PLC through Programming?

    I can ping the Server regularly from the PLC and when it stops responding for a while I can hook a Boolean, now I only need the Important part, how do I restart the PLC with that contact.

    Or how can I programmatically re-establish the service in the VPN?

     
  • eschwellinger

    eschwellinger - 2020-07-13

    .. not tired of preaching that exactly this is a typical task for using CODESYS Automation server.
    There is one important restriction - at the moment this does not work with e!Cockpit.

    Till then, you might use CODESYS V3 on PFC side and CODESYS V3 as development system. Later if implemented you could switch back to e!COCKPIT - ( missing UserManagement - on Automation server side).

    You could reach the webvisu via Automation server and you could login via the Automation Server to the PFC's. ( no Teamviewer needed no VPN needed)
    https://www.youtube.com/watch?v=Kyf9bCpPa6s&t=1s
    https://www.youtube.com/watch?v=8KLywg51Xyk

    Just install the Edge Gateway on the PFC and add the PFC plc to the Automation server.
    I would give this a try.

    By the way, not sure if this works on PFC with e!COCKPIT - SysProcessExecuteCommand - from SysProcess lib should work to reboot the PFC's.

     

    Last edit: eschwellinger 2020-07-13

Log in to post a comment.