Why does the internal PC communication with the S7-1500 Software Controller not function without a connection Ethernet cable?
Internal PC Open User Communication (OUC) or S7 connections can be established via the PC's network interface without using a network cable. However, the operating system function "Media Sensing" might hinder this communication, for example, after a restart of the operating system or waking up from hibernation mode.
- Microsoft Windows 7
The "Media Sensing" function provides a mechanism for the network interface to report to the events protocol stack when connecting and disconnecting the network. If you remove the Ethernet cable, Windows disables all protocols of that network interface.
You disable the "Media Sensing" function in order for the protocol stack to remain active after removal of the Ethernet cable and for the internal communication connection to continue using the protocol stack.
Disable the "Media Sensing" function as described in Table 01 below. This prevents the network interface from recognizing the connection status.
|1.||Open the Registry editor. |
Start > Run > type "Regedit" > Enter
Navigate in the Registry to the this Registry code:
Add a new DWORD (32-bit) value with the name DisableDHCPMediaSense to the code from Step no. 2 and set the value to 1.
|4.||Restart the computer.|
Table 01: Disabling Media Sensing in the Windows Registry
After you restart the computer the new parameters should be active and "Media Sensing" inactive.
As alternative to the first option you can also disable the "Media Sensing" function as follows.
|1.||Click the Windows Start icon.|
|2.||In the search field you enter this command: cmd.|
|3.||Right-click "cmd.exe" and in the pop-up menu you select "Execute as administrator".|
Execute the following two commands one after the other:
After executing both commands you check the result with the following two commands:
|6.||Check whether the item "DHCP Media Sensing" is disabled. If the item is disabled, both of the previous commands were executed successfully.|
Table 02: Disabling Media Sensing via the command line
- The behavior of TCP/IP-based applications can change when the "Media Sensing" function is disabled.
- The "Media Sensing" function depends on the network interface. If the network interface does not support "Media Sensing", then the described options have no effect. In this case, you should get in touch with the technical support of the manufacturer of your network interface.
More information about the "Media Sensing" function is available here: