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

Remote connection to Raspberry Pi PLC target

krazykyran
2019-03-28
2019-03-29
  • krazykyran - 2019-03-28

    Hi Everyone,
    I am struggling to make a remote connection over a cellular network between my laptop and a Raspberry Pi 3 PLC target.
    I am using m2m (machine to machine) SIM cards, and connect to a private cellular network.
    For example, my laptop has IP address 10.11.12.13, and my Raspberry Pi 3 has IP address 10.11.12.113 (these IP addresses are examples).
    Windows firewall on laptop has been temporarily disabled.
    I can ping the remote IP address (10.11.12.113).
    I did a 'sudo netstat -ltunap' to show the list of TCP and UDP ports associated with the Pi, and tried configuring the IP address and port numbers listed here, in the Communication settings of the PLC device. I tried each and every IP address and port number combination listed with the netstat command. To no avail.

    Does anyone know how to make a remote connection over different subnets / different networks using Codesys IDE and a PLC device?

    Kind Regards
    Kyran McGlasson
    SAGE Automation

     
  • krazykyran - 2019-03-29

    I think I found the answer to my question.

    After looking at one of the port numbers the codesyscontrol process on the Pi was listening to, port 1217, looked similar to the port configured on the gateway.
    So I created a new gateway (Gateway-2) and set the IP address 10.11.12.113 (of the Pi) with port 1217.
    Then I selected Gateway-2 from the gateway drop down list.
    Then I clicked the "Scan Network ..." button (top left in the window) and lo and behold it detected the remote PLC device.

    So I hope this helps others wondering how to do it.

    Regards,
    Kyran McGlasson
    SAGE Automation

     

Log in to post a comment.