Connect to Beckhoff PLC using RLDialUp & SEARCHoverIP
This document describes the method to connect to a Beckhoff PLC using a unique feature in RLDialUp called SEARCHoverIP.
Red Lion Control's RA50C, RA70S and RA70K
When trying to connect to a Beckhoff PLC using the TwinCAT software many times a user will need to "Broadcast Search" to the connect to the PLC. If that PLC is across a VPN tunnel this broadcast search does not work as broadcast traffic does not natively travers a VPN tunnel. Our SEARCHoverIP feature allows broadcast to travers the tunnel and users to use this "Broadcast Search" feature in the software.
To connect to a Beckhoff PLC using our TwinCAT software of our VPN tunnel you'll need the latest version of RLDialUp. Once you've got RLDialUp downloaded and installed, you'll need to enable SEARCHoverIP for the RA50 or RA70 remote gateway.
When the SEARCHoverIP function is activated, the "remote maintenance network" (Remote Client) is connected one to one to the LAN network on the device (router) via Layer2.
- Under certain circumstances, this can lead to IP address conflicts.
- Network disturbances on the remote maintenance side (Remote Client) or router LAN side can occur.
The execution of broadcasts and multicasts on the remote maintenance side (Remote Client) causes an additional increased data traffic through the VPN tunnel.
Always use the SEARCHoverIP function wisely. Activate the function only for the duration of the action to find and configure a controller in order to minimize the above-mentioned risks and to reduce the data traffic in the VPN tunnel.
After completing the work, deactivate the function again in the LAN settings of the router.
1. Enable SEARCHoverIP by clicking the Edit button for the LAN Configuration for your RA50 or RA70. Then click the checkbox next to SEARCHoverIP. Next click save and Synchronize the changes.
2. Disable SNAT on the Firewall (LAN) options
The SNAT functionality normally makes sure the PLC sends back its response to the LAN interface of the router, without the need of entering the LAN IP as the gateway in the Beckhoff PLC. Unfortunately, the PLC seems to have problems handling with the SNAT option and therefore it needs to be disabled in the router’s configuration
3. Connect to your remote gateway by clicking the "Connect to" button (in this case, Connect to Site4)
4. Once connected ensure that SEARCHoverIP is working properly. Indicated by a yellow status at the bottom or RLDialUp.
5. Open your TwinCAT software and establish a connection to your Beckhoff PLC by clicking "Choose destination" then "Search(Ethernet)". Attempt to Broadcast Search for the PLC.
If you are not able to see the PLC listed after a Broadcast Search attempt, increase the "Connection Timeout".
If you are still not successful after making the Timeout changes you'll need to modify the registry setting for the TwinCAT software as follows.
Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to re-install Windows to correct them. Red Lion Controls cannot guarantee that any problems resulting from the use of a Registry Editor can be solved. Edit the Registry at your own risk.
6. Modifying TwinCAT registry and control.ini settings. When having a connection with bad signal quality or slow transfer rate and latency, it can help to decrease the data blocks. If out of the TwinCAT PLC Control a project needs to be transmitted through a slower connection, the data block size can be reduced by the following options:
MaxBlockSize HKEY_LOCAL_MACHINE\SOFTWARE\BECKHOFF\TwinCAT\Plc MaxBlockSize (DWORD) By default (even though there is no key in the registry) the packet size is 16KByte. The smallest size possible is 512 Bytes. When transmitting a project, it will be divided in small blocks, therefore it makes sense to configure small sized block when dealing with a slower connection
ConnectionTimeoutMSec HKEY_LOCAL_MACHINE\SOFTWARE\BECKHOFF\TwinCAT\Plc ConnectionTimeoutMSec (DWORD) Default value is 8000 (8 seconds) When dealing with slower connections, increasing this value can help
TwinCAT PLC Control.ini
The file "TwinCAT PLC Control.ini" is located at "..\TwinCAT\PLC"
[TwinCAT PLC Control]
By default (even though there is no key in the INI file) its set to 1024, when using a CX9000 mostly 16K is set, in order to reduce the blocks.