The TwinCAT PLC software has a built-in mechanism to manage
 what devices are allowed to establish connections to the
 target. In order to allow access for a given device, a
 TwinCAT route must be configured on the PLC. The procedure
 for adding a route varies depending on the type of TwinCAT
 device.
Configure the route from Windows CE based TwinCAT 2 to the node
- Download the remote desktop software from Beckhoff
 and connect to the PLC. This software can be downloaded
 at this Beckhoff Information System
                        site.
- On the Beckhoff TwinCAT PLC, open a command
 prompt. 
- Type "cd Hard Disk/System" and press the enter
 key 
- Type "TcAmsRemoteMgr.exe" and press the enter key.
 This will launch the route manager.
- Write down your PLC's AMS Net ID. This will be
 required when defining a Beckhoff TwinCAT 2 device
 (Using
 the Workbench to create a Beckhoff device).
- 
                                                    Click the "Add" button. A dialog box will be displayed enter values in the following fields. Field Label Value Name Enter a name that identifies the node. AMS Net ID Enter the IP address of the node where the driver is running. The IP address is followed by .1.1. For example if the node's ip address is 192.168.0.13, the AMS Net ID would be 192.168.0.13.1.1 Address The IP address of the node. This value is the same as the AMS Net ID, without the .1.1 Transport TCP/IP 
- Click the "OK" button to save the new entry.
Configure the route from Windows NT based TwinCAT 2 to the node
- Using the TwinCat 2 display, open the Twin Cat
 System Properties. Click the Twin CAT icon on the
 bottom right and select properties. 
- Click on the "AMS Router" tab and write down the
 "AMS Net ID". This will be required when defining a
 Beckhoff TwinCAT 2 device  (Using
 the Workbench to create a Beckhoff device). 
- Click the "Add" button. A dialog box will be
 displayed enter values in the following fields.Field Label Value Name Enter a name that identifies the node. AMS Net ID Enter the IP address of the node where the driver is running. The IP address is followed by .1.1. For example if the node's ip address is 192.168.0.13, the AMS Net ID would be 192.168.0.13.1.1 Address The IP address of the node. This value is the same as the AMS Net ID, without the .1.1 Transport TCP/IP  
- Click the "OK" button to save the new
 entry. Restart the Twin Cat system by clicking on the
 Twin Cat icon followed by System -> Restart. 
Configure the route from Windows 7 based TwinCAT 3 to the node
- Run the Windows remote desktop utility to connect
 to the TwinCAT 3 PLC.
- Open "Twin CAT System Control". All programs ->
 TwinCAT System -> TwinCAT System Control 
- Open the "AMS Router" tab and write down the PLC's
 AMS Net ID. This will be required when defining a
 Beckhoff TwinCAT 3 device  (Using
 the Workbench to create a Beckhoff device). 
- Open a windows explorer window and navigate to
 "C:\TwinCAT\3.1\Target 
- 
                                                    Open “StaticRoutes.xml” using a text editor. Add a route entry for the DeviceWise node that will be connecting to the PLC. The format for each entry is: XML Attribute Value <Route> <Name> A descriptive name identifying the node. <Address> The IP Address of the node. <NetId> The IP Address of the node followed by .1.1 <Type> TCP_IP </Route> Here is a sample entry. 
 <Route>
 <Name>"Enterprise Gateway Node"</Name>
 <Address>"192.168.0.13"</Address>
 <NetId>"192.168.0.13.1.1"</NetId>
 <Type>"TCP_IP</Type>
 </Route>This is part of a full XML description. An example of the full XML description is shown.   
 
- Put the TwinCAT in config mode by clicking the
 TwinCAT icon on the lower right, followed by the
 System->Config. 
- Start the TwinCat by clicking the TwinCAT icon on the lower right, followed by System->Start/Restart