Overview

Speaking about (Embedded-)PC-based control, the topic Remote Access is very extensive.

In this section, the Beckhoff Information System introduces some of the various possibilities.

  • Pure IT solution (tools included in the Operating System resp. 3rd-Party software available on the market)
  • TwinCAT network capabilities in local or Wide Area Networks and in pure Microsoft -based or heterogeneous networks
  • Remote access via Modem
  • Web-based diagnosis and configuration capabilities


BECKHOFF routing via gateway

BECKHOFF routing via gateway PC

Example: ADS Routing via Gateway

This example is used to describe how an ADS device (e.g. TwinCAT PLC Control, TwinCAT System Manager, third-party Scada systems etc...) can communicate with a TwinCAT PLC in a heterogeneous network.

This is the specific scenario: A "service notebook" (SN-PC1 in this example) from IP segment 172.16.5.x is to communicate with a TwinCAT controller (TC-PC3) via a gateway PC (GW-PC2 in this example).

This article describes the required hierarchical ADS routing entries. These can be generated manually or via the "TwinCAT Remote Manager".

ADS routing: Logical ADS destination address and physical (IP) destination address

Background information: ADS is a message-based communication system. An ADS message cannot be sent directly from SN-PC1 to TC-PC3 via entry "ADS-NetID and TCPIP from TC-PC3": The IP address of TC-PC3 is not accessible in the IP segment of SN-PC1.

While, from the perspective of SN-PC1, the "logical destination address" relating to ADS is the ADSNetID of TC-PC3, the "physical transport address" is GW-PC2.

This type of ADS route configuration is documented in detail here:

Requirement for all PCs: TwinCAT 2.10 Build 1244 (or higher)

ADS routing PC settings:

Note: These registry entries can be entered manually, although we recommend using the "TwinCAT Remote Manager" tool

SN-PC1 (Service Notebook)

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\GW-PC2]
"Address"="172.16.5.80"
"AmsNetId"=hex:c0,a8,03,50,01,01  -> 192.168.3.80.1.1
...

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\GW-PC2\TC-PC3]
"Address"="192.168.3.21"
"AmsNetId"=hex:c0,a8,03,15,01,01   -> 192.168.3.21.1.1
...

GW-PC2 (Gateway)

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\SN-PC1]
"Address"="172.16.5.65"
"AmsNetId"=hex:ac,10,05,41,01,01   -> 172.16.5.65.1.1
...

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\TC-PC3]
"Address"="192.168.3.21"
"AmsNetId"=hex:c0,a8,03,15,01,01   -> 192.168.3.21.1.1
...

TC-PC3 (TwinCAT Controller)

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\PC2]
"Address"="192.168.3.80"
"AmsNetId"=hex:c0,a8,03,50,01,01  -> 192.168.3.80.1.1
...

[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Remote\PC2\PC1]
"Address"="172.16.5.65"
"AmsNetId"=hex:ac,10,05,41,01,01   -> 172.16.5.65.1.1
...


BECKHOFF routing via gateway

BECKHOFF routing through a firewall

Scenario: ADS connection through a firewall

This example is used to describe how an ADS device (e.g. TwinCAT Engineering PC, third-party Scada systems etc...) can communicate with a TwinCAT Runtime through a firewall.

Firewallrules/Portfilter settings

You have to configure following rules for incoming connections to your TwinCAT Runtime to establish the ADS communication:

Direction | Port(dec) | Port(hex) | Protocol | Action
Incoming | 48898 | 0xBF02 | TCP | Allow
Incoming | 48899 | 0xBF03 | UDP | Allow