×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 109740471, Entry date: 09/05/2017
(3)
Rate

Why does the internal PC communication with the S7-1500 Software Controller not function without a connection Ethernet cable?

  • Entry
  • Associated product(s)
Internal PC communication connections can be established via the PC's network interface without using a network cable. For this to work properly you must disable the "Media Sensing" function.

Description
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.


Fig. 1

Note
Basic example of communication via OUC are available in Entry ID 109747710. Another example of communication of an S7 CPU with a Syslog Server is available in Entry ID 51929235.

Validity

  • Microsoft Windows 7

Cause
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.

Remedy
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.

Option 1
Disable the "Media Sensing" function as described in Table 01 below. This prevents the network interface from recognizing the connection status.

StepDescription
1.Open the Registry editor.
Start > Run > type "Regedit" > Enter
2.

Navigate in the Registry to the this Registry code:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters

3.

Add a new DWORD (32-bit) value with the name DisableDHCPMediaSense to the code from Step no. 2 and set the value to 1.



Fig. 2 Add new registry value.
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.

Option 2
As alternative to the first option you can also disable the "Media Sensing" function as follows.

StepDescription
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".
4.

Execute the following two commands one after the other:

netsh interface ipv4 set global dhcpmediasense=disabled
netsh interface ipv6 set global dhcpmediasense=disabled

5.

After executing both commands you check the result with the following two commands:

netsh interface ipv4 show global

netsh interface ipv6 show global

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

Warning

  • 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:
https://support.microsoft.com/en-us/kb/239924.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
http://www.siemens.com/industrialsecurity.